How to check whether you are tracking visitors (and conversions) across your websites in Google Analytics (aka cross-domain tracking)

, Monday, October 29th, 2012

When a site visitor goes from your main website to your donation page, is Google Analytics (GA) tracking their visit across each of your domains as one visit, or a series of separate visitors? If you don’t have cross-domain tracking enabled, your campaign goals aren’t accurately being attributed to the correct source, preventing you from seeing which channels are performing best / worst.

Imagine a visitor arrives to your main website, http://www.my-site.com, from a paid search ad. After visiting a few pages on your main site, they decide to make a donation, clicking a link leading to your donation site http://mysite.donations.com, and complete the donation. If you haven’t set up cross-domain tracking, you’ll be able to see which ad copy and keywords produce the most clicks, but you can’t tell which ads are performing best at bringing visitors that will reach the end of the funnel (completed donations or sales, for example).

cross-domain flowchart

Your ad dollars should be allocated based on conversion rate, rather than click-through rate, so if you don’t have cross-domain tracking, you could be missing an opportunity for massive optimizations of your advertising ROI.

How do you check if you have cross-domain tracking enabled?

About one year ago Google added cross-domain tracking to occur across subdomains (i.e. www.my-site.com and second.my-site.com) without requiring any additional effort by users. Tracking across different domains (www.my-site.com and www.my-other-site.com), however, requires additional action on your part.

UTM Parameters added to URL

If you’re clicking between different domains you’ll see a string of paramaters added to URLs when you switch between domains if cross-domain tracking is set up correctly. When you click from one domain (www.my-site.com) to another (www.my-other-site.com), links to the second site will look something like this:

http://www.my-other-site.com/?__utma=227028104.1194490724.1350051197.1350051197.1351514166.2&__utmb=227028104.11.10.1351514166&__utmc=227028104&__utmx=-&__utmz=227028104.1350051197.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)&__utmv=-&__utmk=195017774

If you’re curious, you can see what each of the GA utm tags signify.

Testing for cross-domain tracking using Google Analytics Debugger

Even if you’re seeing the long links, it’s possible that the second site isn’t capturing the cross-domain visit correctly. To definitively confirm the cross-domain tracking is working, you can use Google’s Analytics Debugger. After downloading and enabling the debugger you can see several details about your visit, including your visitor ID.

google analytics debugger cross-domain tracking demonstration

As you traverse your domains, your visitor ID shouldn’t change. If it changes, cross-domain tracking isn’t working correctly.

Tracking visit count with a test campaign

Another way of checking your analytics is by using Google Analytics URL Builder to view your site using a test campaign code, such as the following:

http://my-site.com/?utm_source=test&utm_medium=test&utm_campaign=cross-domain-test

In that URL, our visit will be tracked under a campaign called “cross-domain-test”. When you look at your Google Analytics campaign traffic, you’ll be able to view details specific to your test visit. After you’ve clicked on the test campaign-encoded URL, click through to your second domain. The visit will generally appear in Google Analytics within a few hours (or up to 24 hours later in some cases), and wil show if your journey across domains registered as a single visit:

google analytics campaign listing

How do you set up cross-domain tracking?

Google has instructions for setting up cross-domain tracking, but that will require special HTML coding for each cross-domain hyperlink. You’ll need to add a few extra lines to your GA script as well. Alternately, there are scripts that automatically track across domains (plus several other features). For nonprofit organizations, there are additional tracking features that can be added, such as automated tracking of Convio donations as eCommerce transactions.

While it may take a little more work upfront to set up cross-domain tracking, the ROI can be very substantial.

7 Responses to “How to check whether you are tracking visitors (and conversions) across your websites in Google Analytics (aka cross-domain tracking)”

  1. AlexJB Says:

    Great article! There’s a lack of decent documentation around cross-domain, and it’s something that many of us who don’t host our own secure domains have to deal with if we want to see conversion funnels and talk about the real effectiveness of campaigns, etc.

    Two things worth noting on your test-session technique – it can take up to a day for specific data to appear in GA reports. So your testing cycle will be a little slow with this approach.

    Also, it’s generally wise to filter out (aka ignore) traffic from your own org’s network so that you don’t skew your numbers with web visits coming from staff. If you don’t have visibility into the filters that are on your reporting profile, you should check with your administrator, because it will mean you’ll be looking for a test-session that will never show up in GA reports.

    Having tried these approaches, I’ve found the Chrome Debugger to be the best – you get immediate feedback and you’re looking at the data as it was sent to Google, so you don’t have to take filters into account.

  2. Rob Says:

    I totally agree, Alex. I’ve updated the post to reflect several of the points you made.

  3. david Says:

    Hi, i just found this article and I am hoping you could please help me with my cross domain tracking issues.

    Just a quick recap, I buy adwords traffic and send them to http://www.A.com, then from A.com, if they want to buy my product, they go to http://www.B.com. on top of passing cookie data from A to B, I would also like to know which page and link they clicked on A.com that sent them to B.com. I can actually track these parameters by using campaign variables and assigning each link its own campaign tracking links.

    I set up everything pretty much how google told us to set it up. I made sure that i added the code below on my http://www.A.com website to the GA code in my header

    _gaq.push(['_setAccount', 'UA-for http://www.B.com']);
    _gaq.push(['_setAllowLinker', true]);
    _gaq.push(['_setDomainName', 'www.A.com']);

    Then i added the following to my http://www.B.com website GA code:

    _gaq.push(['_setAccount', 'UA-for http://www.B.com']);
    _gaq.push(['_setAllowLinker', true]);
    _gaq.push(['_setDomainName', 'www.B.com']);

    I then add the onClick code to the links i wanted to track ( categorize, and label). I copied one below, please notice the utm campaign variables:

    so when i tested my links by clicking on them and when i was brought to the next page, i was able to see that the URL contained my campaign variables AND the other utm variables such as __utmb and _utmz, etc.

    the only problem is that its not working lol. When i go to the GA account for http://www.B.com, and i look under Advertising >”Adwords” section , i see the number of visitors is correct but everything, and i mean everything is a (not set). I dont know why its not working but its very frustrating.

    Is it possbile to do campaign variable tracking AND cross domain tracking in conjunction ?I hope to get some while i still have some sanity left! thank you so much!

  4. Rob Says:

    Have you linked the Analytics account to the AdWords account that is tracking data for that website? If you haven’t, and if you have auto tagging enabled on the AdWords account, then even though the AdWords visits would be reported as Google (cpc), for security reasons, you would not have access to the Keyword/Campaign and adgroup names.

  5. david Says:

    YUP! that was the issue, but in the proccess of pulling my hair out, i learned a lot

  6. Anat Says:

    Hi Rob, thanks for the great article!
    I am looking for a solution, I’m not sure GA cross-domain can help me with. Thought you might know…
    My software supplies a Javascript code snippet to blogs to create related posts content recommendations at the end of the article.
    I would like to use a 3rd party tracking tool, like GA, to track the number of pageviews my code is located on. I can’t use GA cross-domain, because I am afraid of creating conflicts with the tracking of my hosting page.
    Got any idea what service I should use?
    Thanks!
    Anat

  7. Jen Says:

    Hi Anat,

    If you have a standard GA implementation and do not want to implement cross domain tracking you can track the clicks the same way that you would track external or outbound links.

    Google has a good explanation here with a code sample. https://support.google.com/analytics/answer/1136920?hl=en

    All you need to do is add the sample code snippet to all your pages with related posts and you’ll start seeing clicks on your related posts.

    The downside not implementing cross domain tracking is that once the user moves from your site to your blog the user will be issued a new Google Analytics cookie. You’ll see that the user was referred from your site, but you won’t be able to see how the user behaved across all properties as one visit.