Home > Integrating AdWords with SnapEngage

Categories:


(Last Updated On: September 13, 2018)

AdWords (Google AdWords) is an advertising service for businesses wanting to display ads on Google’s advertising network. The AdWords service enables businesses to set a budget for advertising and only pay when people click the ads. The ad service is largely focused on keywords. You can read more about AdWords here.


If you have set up some AdWords campaigns, you might want to track your campaigns’ conversions to “chat with SnapEngage”, so that you can also see how your campaigns are performing. After the web-visitor has clicked on your AdWords advertisement and landed on your page, you can offer them your chat option both with a proactive chat invite and / or with displaying your chat button allowing them to initiate a chat manually.

One great tool that has rich reporting capabilities for conversion tracking and allows you to track SnapEngage chat events is Google Analytics. Google Analytics will empower you to analyze the number of chats you receive, where they came from (eg. AdWords campaign), as well as additional user behaviors.

Linking a Google Analytics property to your AdWords account can help you analyze customer activity on your website after an ad click or impression. This information can shed light on how much of your website traffic or business comes from AdWords, and help you improve your ads and website.

However, to be able to analyze the impact of your AdWords campaigns more effectively, you will want to send all that information to your CRM (Salesforce, Zendesk, Desk.com, Hubspot, UserVoice, MS Dynamics and Jira). All those tools have their own reporting capabilities that can assist you greatly in managing your Sales funnel. Combining them with Google Analytics can improve the quality of your leads and give you much more powerful insights regarding your sales funnel.


Implementing the Integration

When Google Analytics send campaign and traffic source data, they use five key fields to describe where a customer came from. Those are: Campaign Source, Campaign Medium, Campaign Name, Campaign Content and Campaign Term.

1. Setup the following five fields in your CRM:

  • Medium
  • Source
  • Campaign
  • Content
  • Term

2. Place the following code on every page on your website that collects data via Google AdWords, before the closing </body> tag.

<script type=”text/javascript”>
var z = _uGC(document.cookie, ‘__utmz=’, ‘;’);
var GA_Campaign_Source = _uGC(z, ‘utmcsr=’, ‘|’);
var GA_Campaign_Medium = _uGC(z, ‘utmcmd=’, ‘|’);
var GA_Campaign_Term = _uGC(z, ‘utmctr=’, ‘|’);
var GA_Campaign_Content = _uGC(z, ‘utmcct=’, ‘|’);
var GA_Campaign_CampaignName = _uGC(z, ‘utmccn=’, ‘|’);
var gclid = _uGC(z, ‘utmgclid=’, ‘|’);
if (gclid !=”-“) {
GA_Campaign_Source= ‘google’;
GA_Campaign_Medium = ‘cpc’;
}

var csegment = _uGC(document.cookie, ‘__utmv=’, ‘;’);
if (csegment != ‘-‘) {
var csegmentex = /[1-9]*?\.(.*)/;
csegment = csegment.match(csegmentex);
csegment = csegment[1];
}

else {
csegment = ”;
}

function _uGC(l,n,s) {
if (!l || l==”” || !n || n==”” || !s || s==””) return “-“;
var i,i2,i3,c=”-“;
i=l.indexOf(n);
i3=n.indexOf(“=”)+1;
if (i > -1) {
i2=l.indexOf(s,i); if (i2 < 0){ i2=l.length; }
c=l.substring((i+i3),i2);
}
return c;
}

</script>

3. In the Admin Dashboard, go to Settings > Options, and place the five variables:

GA_Campaign_Medium
GA_Campaign_Source
GA_Campaign_CampaignName
GA_Campaign_Term
GA_Campaign_Content

in the “Collect additional information” field > “JavaScript variables”:

adwords

Please remember to Save changes!

4. In the Admin Dashboard, go to Settings > Integrations > “Map and send custom data” section and map these five JavaScript variables to the corresponding five fields from step 1.

A note about Salesforce users: If you want to measure the impact of your AdWords campaigns, you might notice that in Salesforce all of the Keywords, Content, and Campaign information is missing. This would mean that your AdWords is set to use autotagging. In this case, the implementation provided above will not be able to pass anything more detailed, because the AdWords information is hidden in the GCLID, which is not decoded until later in Google Analytics.

If this information is important you have two options:

  • You can disable autotagging and use manual tagging
  • You can customize our code to accept customer parameters, which you can append to all of your destination URLS.

We’d like to credit E-Nor for their work here

 

Did you find this article helpful?

Not HelpfulNeeds WorkSo-soHelpfulVery Helpful (3 votes, average: 2.67 out of 5)
Loading ... Loading ...

Published August 3, 2016