CONTACT US 603.494.4781
« Non-Brand Traffic Reports Made Easy With Regex Filters | Main | Tracking Your Website's Site Search »
Monday
Mar182013

Easy Install of Google Analytics Remarketing & Enhanced Link Attribution Code

Google has made great strides over the past year in simplifying marketers' ability to track and report.   We at PPC-Strategies have definitely felt the pain of having to email a client's IT team yet, one more Remarketing code snippet in order to set up yet another new Audience/List to target with our ads.  Oiy!

That's why we celebrate the EASY implementation of the new Analytics code with Remarketing.  We'll explain everything you need to do in just a few easy steps.  And, in the process show you a BONUS step to incorporate the snippet needed to track Enhanced Link Attribution in the In-Page Analytics reports.  It's like that commercial where the cute kids talk about how doing "two things at once" is so much cooler than just "doing one thing at once"!!

Here we go:

Step 1:  For the "new" Analytics Remarketing, replace this line in your UA async code:  

ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';

 

with this line:

ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js';

Step 2:  Navigate to your Property Settings tab and check the box in the In-Page Analytics section that says "Use enhanced link attribution".  (see image at the end of this post)

Step 3:  For Enhanced Link Attribution tracking, add the snippet in bold immediately after the first line of your code.  It will look like this:

var _gaq = _gaq || [];
var pluginUrl = 
 '//www.google-analytics.com/plugins/ga/inpage_linkid.js';
_gaq.push(['_require', 'inpage_linkid', pluginUrl]);

Step 4:  Send the entire new code snippet to IT (or install it yourself if you're a super ninja!).  The entire new code snippet will look like this (except with the X's being replaced with your property's tracking number):
<script type="text/javascript">
  var _gaq = _gaq || [];
  var pluginUrl = 
   '//www.google-analytics.com/plugins/ga/inpage_linkid.js';
_gaq.push(['_require', 'inpage_linkid', pluginUrl]);
  _gaq.push(['_setAccount', 'UA-XXXXXXXX-X']);
  _gaq.push(['_trackPageview']);
  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
</script>
The awesome result of this "two things at once" move?  You'll now be able to create as many remarketing lists as you want without EVER having to generate or install new code again!  
AND, your In-Page Analytics reports will immediately start to gather click through rates for multiple links on a page that share the same destination, i.e., a "Buy Now" at the top of the page vs. a "Buy Now" at the bottom of the page.  Without Enhanced Link Attribution code, your reports will aggregate the data and you won't know which link is performing better.  This code will work to track buttons, menus, and actions driven by javascript.
Stay tuned for an Analytics blog post that we'll post soon about creating amazing new Remarketing lists that will target just exactly that segment of visitors who really matter vs. just anyone who happened to stumble upon a page with an old Remarketing cookie!  
AND, come back for a separate post about how the new Enhanced Link Attribution code will improve your In-Page Analytics reports.
Need help generating or customizing your code?  Contact Us for help!

 

Google Analytics Enhanced Link Attribution Setting - click to enlarge image

 

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
All HTML will be escaped. Hyperlinks will be created for URLs automatically.

BLOG/TIPS

ONE-ON-ONE TRAINING

CUSTOM REPORTING

SEM RESOURCES

RSS

``I love working with Barb of PPC-Strategies, both as a direct client and as a marketing team member! ''
- Pattie Simone, Founder, WomenCentric.net