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:

List of other resources: (Cross domain in GTM) (GA setting up Cross Domain) (Setting up ecommerce tracking) (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.