Tracking code changes needed

The changes you need to make depend on which tracking code you’re using. See if you have Classic Analytics (ga.js) or Universal Analytics (analytics.js).

Tracking code change for Universal Analytics (analytics.js)

To implement Display Advertising features for Universal Analytics, insert the bold line into your existing tracking code between the 'create' and 'send' commands, as seen in this example:

<script>

(function(i,s,o,g,r,a,m){i[‘GoogleAnalyticsObject’]=r;i[r]=i[r]||function(){

(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),

m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)

})(window,document,’script’,’//www.google-analytics.com/analytics.js’,’ga’);

ga(‘create’, ‘UA-XXXXXX-XX’, ‘example.com’);

ga(‘require’, ‘displayfeatures’);

ga('send', 'pageview');

</script>

 Tracking code change for Classic Google Analytics (ga.js)

To implement Display Advertising features for Classic Google Analytics, replace the bold text in this example:

<script type="text/javascript">

var _gaq = _gaq || [];

_gaq.push([‘_setAccount’, ‘UA-xxxxx-y’]);

_gaq.push([‘_trackPageview’]);

(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);

})();

</script>

with the bold text in the example below:

<script type="text/javascript">

var _gaq = _gaq || [];

_gaq.push([‘_setAccount’, ‘UA-xxxxx-y’]);

_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>

You can also generate an updated basic code snippet that includes the change by going to Admin > property > Tracking Info, and turning on the Display Advertiser Support option.