Analytics & Digital Marketing Tips

Prevent Data Loss when using Google Analytics Remarketing Tag

Prevent Data Loss when using Google Analytics Remarketing Tag

April 1, 2013           Google Analytics

Did you know that you could lose up to 70% of your analytics data by implementing the Google Analytics Remarketing Tag?

To implement the Google Analytics Remarketing Tag, the standard Google Analytics tracking code is replaced by a JavaScript file served from the DoubleClick domain. The DoubleClick tracking code (dc.js) uses a third-party cookie to track user activity across websites and the entire domain is blocked by most ad blocking and privacy protection software. When blocked the dc.js tracking code won’t load and no data from that session is sent to Google Analytics.

Depending on the composition of your audience, anywhere from 5% to a whopping 70% of your website visitors block the DoubleClick tracking code and won’t be tracked.

Consider these figures:

  • Ad blocking impacts around 10% of traffic for most websites
  • In Austria, Hungary, and Germany ad blocking is over 19%
  • Multiple sources have reported up to 50% ad blocking
  • In an extreme case, a Google Analytics Certified Partner in Europe reported dc.js tag blocking as high as 70%

With the increasing popularity of the AdBlock browser extension (example shown below) and the announcement that the Firefox browser will block third-party cookies by default (something Apple’s Safari already allows), it is expected that Ad Blocking and Privacy software usage will double within the next 18 months.

Ad Blocker Example

Be aware that these ad blocking numbers are based on our real world experience with clients of various size/type, reports from Google Analytics Certified Partners like us (in the USA, Europe, South America and Japan), and research from third-parties such as ClarityRay (view report of ad blocking with country specific breakdowns).

Losing 10% or more of your analytics data dramatically alters the trustworthiness of your data and will likely cause you to make bad business decisions.  The benefits of remarketing don’t outweigh the risk of compromising your data confidence.

Solution – If Blocked, Fallback to Standard Tracking Code

The good news is that we have a solution for you that has been successfully implemented on our clients’ websites; including some of the highest traffic sites on the Internet.

The code provided below will allow you to detect whether the DoubleClick remarketing tracking code script was loaded, and if not, load the standard ga.js tracking code.  This will prevent you from any substantial loss of analytics data (due to the blocking or failure to load the dc.js script ) and allow you to reap the benefits of Google Analytics Remarketing without substantial data risk.

<script type="text/javascript">
try
{
(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);
 })();

 // doubleclick checker -
(function() {
 var o=onload, n=function(){setTimeout(function(){ if(typeof _gat === "undefined"){
 (function(){ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; 
 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);})();
 _gaq.push(['_trackEvent','GA Remarketing Tag','DC Script','Failed',0,true]);}}, 1000); }
 if (typeof o!='function'){onload=n} else { onload=function(){o(); n()}}
})(window);

}
catch(err){
	//Do nothing
}
</script>

Although AdBlock and AdBlock Plus have been the two most notable ad blocking extensions causing this problem, it is important to know that their latest releases no longer block doubleclick.net and the dc.js script will successfully load by default.

However, other ad blockers are out there that will cause the same effect, and you never know when a new software program, browser extension or browser upgrade will start blocking tracking pixels/cookies.  This type of ad blocking and privacy protection is only expected to increase over time.  Therefore, it is definitely still worth implementing this fallback solution to safeguard your analytics data.

Note: If you are a client of ours and are using the Google Remarketing feature, we’ll use this fallback technique to eliminate potential tracking issues.  If you are not our client, simply have your technical team leverage what we’ve provided.

Invitation to Collaborate with Us

We invite you to add this script to your site and collaborate with us in establishing some statistics for this problem by sharing or sending us your resulting “failed” counts.

If you have any questions or comments about this Google Analytics Remarketing Tag Fallback solution, please don’t hesitate to post them below.

 

  • We have received a few questions via email that we wanted to share with everyone:

    — Do we need to do GA remarketing?
    Yes, please read the ‘Google Remarketing Boosts Conversion’ post http://bit.ly/XDAuBF that discusses the 300-400% increase in conversion you will likely experience and all the other benefits like lower CPC.

    — Does using Doubleclick search put me more at risk?
    Definitely not, the fallback solution provided above completely mitigates the risk associated with using the remarketing tag. To be clear, using Google Remarketing with the DoubleClick tracking tag is not the same as using DoubleClick for Search bid management. DoubleClick for Search, bid management tools do not create this risk or any other risks.

    — Is Blast implementing these workarounds by default when a client uses remarketing?
    Yes.

    — Is Blast proactively seeking out new adblockers that may cause problems before they are problems?
    While we will monitor such things in general, it is not necessary to track each new potential blocker, as the fallback solution we have developed will dynamically detect any blocking/loading issues, and fallback to the default tracking code preventing any problems.

    Let us know if you have any other concerns. We highly recommend remarketing as long as it is deployed strategically and doesn’t become a stalking nuisance to customers. If you are interested in hearing more about this, let us know and we would be happy to write up a post.

  • Kyle Hart

    Olaf, Fantastic Post! However, with analytics moving towards Universal Analytics and tag being implemented in tag manager, you could obviously use a custom HTML tag for the conditional statement, but how would you actually trigger it? Big fan of Blast AM and the work that you all do!

  • Hello Kyle,

    That is an excellent question. However, currently Universal Analytics does not handle remarketing, so as of now, we don’t know how we’ll manage this. I’ll be sure to keep this post updated once Google releases any information about it.

  • Mandar Ashtekar

    Hi, I am concerned over the whole URL that gets pushed to Google Tag Manager. I don’t want the parameters in the URL to be pushed to GTM, only the main URL should be sent. Any solution?

  • happy tester

    Great work! However, can you provide an example that uses trackpageview as well as another example with conversion code?

  • happy tester

    here are screenshot examples of our trackpageview as well as our conversion scripts:

  • Mike van Hoenselaar

    Google handles remarketing with displayfeatures atm. What is the best way to make sure it isn’t blocked now with Universal Analytics?

  • Hello Mike,

    The main difference with the code for Universal so that it handles display features is an additional plugin:

    ga(‘require’, ‘displayfeatures’);

    Since remarketing features use first and third party cookies, some of the users who have third party cookies blocked, will not be included in your remarketing lists. However, the standard tracking which relies on a first party cookie will still continue to work and your regular analytics data will be collected. In short, with Universal Analytics there is no need for a “fallback” option as with Classic Analytics.

  • Lovely post Olaf, the only challenge is that the google analytics replacement tag will also likely be blocked – I think its time there was something a bit more drastic to add to our Google Analytics toolkit. Time to find a new way of tracking

 

Analytics Blog

We're here to help with tips and insight on the following topics:

Subscribe to RSS


Optimize your website and marketing campaigns

Get a constant flow of Google Analytics help and digital marketing tips, case studies and more from Google Certified Partner Blast Analytics & Marketing.




Connect with Blast Analytics & Marketing