Blast Analytics and Marketing

Analytics Blog

Supporting Leaders to EVOLVE
Category: Digital Analytics

Prevent Data Loss when using Google Analytics Remarketing Tag

April 1, 2013

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.

[sourcecode language="js"]
<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>
[/sourcecode]

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.

Olaf Calderon
About the Author

Olaf is the Director of Implementation at Blast Analytics & Marketing. He and the implementation team, handle configuration, installation and training of analytics tools. He spends the majority of time developing tracking code and He loves the challenges that every project presents and is always finding more efficient ways for our clients to collect, read and analyze their data. His passion is developing tools, processes or methods to make everyone's life easier.

Olaf Calderon has written on the Blast Digital Customer Experience and Analytics Blog.

Related Insights