Month: July 2015

Cross domain tracking – some notes

Implementing cross domain tracking should be relatively straightforward, however this note is to record one issue that arose when the second domain is held within an iframe embedded in the primary site.

Cross domain tracking via an auto link in GTM basically detects links to a second domain and then decorates them in such a way to transfer the appropriate cookie values for user ids and associates the two together.

This doesn’t seem to happen automatically when you have the second domain in an iframe, you need to auto-generate the iframe code to include the decoration:

http://www.knewledge.com/en/blog/2013/11/cross-domain-tracking-for-iframes-with-gtm/

List of other resources:

https://support.google.com/tagmanager/answer/6106951 (Cross domain in GTM)

https://support.google.com/analytics/answer/1034342?hl=en#GTM (GA setting up Cross Domain)

https://support.google.com/analytics/answer/1009612?hl=en (Setting up ecommerce tracking)

https://support.google.com/tagmanager/answer/6107169 (Ecommerce in GTM)

The debugging route I took from this (although not exhaustive) was in Chrome, using the GA debug extension – switching on the javascript console (Ctrl+Shift+J) and then loading the page, and checking through the GA variables passed for each of the accounts being managed (once of course clarifying both sites had the appropriate settings noted on the various google knowledge base articles).

As the page loads, keep a log of the various cid or visitor id values for each of the properties and make sure they add up between the domains.

Advertisements