"Google Analytics Tip 2: tracking visitors on different domains or subdomains" was posted by Marianina Manning and received 19 commented
John Soames said,         
August 28 2007

Hi Marianina, Where do I add the variables? Should I add them inside the tracking tag and if so where exactly? John

Marianina Chaplin said,         
August 30 2007

Hi John, thanks so much for commenting. Yes you do add it inside the standard google analytics tracking tag and you add the variables inside the tag after your UA account number for example,
_uacct = “UA-accountnumber”;
_udn=”none”;
_uhash=”off”;
_ulink=1;
urchinTracker();

If you have programmers who are doing this for you or adding tags with an include file, make sure to brief them. Hope thaat helps.

Dean Whitbread said,         
September 2 2007

Nice to meet you Marianina.

Ari said,         
September 10 2007

Thanks for the writeup – just working on a similar issue right now (checkout page on secure.X.com, display page on http://www.x.com, advertising points to http://www.y.com), and your page helped out!
Ari

Marianina Chaplin said,         
September 12 2007

Hi Ari, Thanks so much for commenting and glad that you found it useful. Google analytics can be a fantastic tool but you have to be so careful because your site stats could end up being completely wrong if the website isn’t tagged correctly and google’s documentation isn’t always as clear as it could be.

The information you need » Google Analytics Tip 2: tracking visitors on different domains or subdomains said,         
September 17 2007

[...] Marianina Chaplin wrote an interesting post today onHere’s a quick excerpt [...]

Joel said,         
September 18 2007

Hi Marianna,
do you have to adjust your Analytics profile to deal with this “udn” variable? Or does it just work?

thanks

Joel

Marianina Chaplin said,         
September 19 2007

Hi Joel,
You don’t need to adjust your profile or add extra filters – you just need to add your udn variables inside your google analytics tracking tag. If for example you have an ecommerce website then you need to tick the box in your profile setting to allow ecommerce details to be caught. But in this instance we are talking about making sure we don’t overinflate site visits by treating navigation between domains or subdomains as one visit. Hope that makes sense. So you just need to add the udn variables on your google analytics tracking tag.
Cheers, Marianina

Brendan Halloran said,         
September 20 2007

Hi Marianina,

I have heard of this customisation before, but I was under the impression that you also had to add the “__utmLinker()” function to the onclick event of all links between domains. Is this true?

Best regards,

Brendan.

Joel said,         
September 20 2007

Thanks Marianina,
the situation is that the final steps of the purchase path are on a separate sub domain (e.g. http://www.domain.com and secure.domain.com). Oddly enough I HAD actually seen some goal conversions before which I am suprised at because I had not previously set up the UDN variable and thought that GA would not track it properly without this. Odd eh?

Also, http://www.google.com/support/analytics/bin/answer.py?answer=27268&ctx=sibling indicates that _udn needs to be the same as the website url in the main GA profile. I would have thought it was just an arbitrary string for association pruposes.

thanks

Joel

Marianina Chaplin said,         
September 20 2007

Hi Brendan, Yes you are absolutely right. You need to add the utmlinker every time someone goes from one domain to another – I did write this in my post re- “You also need to make sure you add these extra variables to every webpage/tag where visitors can navigate from one domain or subdomain to another.”
but it probably wasn’t clear enough that you would be adding the udn variables eg utmlinker to the on-click function if this is the way that one is navigating from one page on one domain to another page on another domain via a clickable button for example.
Hope that’s ok.
Hi Joel – thanks so much for commenting. I think that we can all agree that official google analytics documentation is not as clear as it could be.

Brendan Halloran said,         
September 21 2007

Thanks for your response Marianina.

Manually adding utmlinker tags to every link between our multiple domains and subdomains would be a very time consuming task.

Would it be possible to create some JavaScript code to automate this process? I am aware of other JavaScript code that is available for Google Analytics that automates the tracking of other onclick events such as outbound link and file download tracking.

Your thoughts on this would be much appreciated.

Thanks,

Brendan.

Marianina Chaplin said,         
September 21 2007

Hi Brendan, Multi-domain tracking in a realistic way is difficult with Google analytics because it uses first party cookies. I don’t know any javascript snippet for passing cookies between domains, although they may exist.
Other ways I don’t think work eg if you try passing GA domains in the header via header direction then it may not work because the checksum that is created may not match therefore a new set of cookies would be created (whereas utmlinker attaches the checksum to the url).
One website I worked on had so many domains and links between them that we went for a paid for solution in the end – primarily just because of this utmlinker issue. The paid for solutions track first and third party cookies so you don’t have this problem (no need to add utmlinkers at all) – there are solutions such as clicktracks or indextools that start at very reasonably prices.
Otherwise, it will just take a very long time with google analytics to add utmlinkers to every single link!
Sorry I couldn’t be of more help. Marianina

Juan Damia said,         
September 26 2007

Hi Marianina, I had a problem regarding this issue some time ago and was terrible to get some help.
I’ve solved the problem in a different way, but this one seems to be more effective. Just one question. With this solution if we have the following structure:
1- product.com/index.php
2- store.company.com/index.php
3- company.com/index.php
Will Google analytics count all the index.php pages together? or as three different pages?

Thanks Marianina!!!

Marianina Chaplin said,         
September 27 2007

Hi Juan,
As you correctly identified, Google analytics will treat index.php as one item – unless you you set up an advanced filter which allows the whole host name or uri to be viewed within google analytics. If you go to this post, it show exactly how to add the advanced filter.
http://marianina.com/blog/2007/07/28/google-analytics-tip-1-naming-your-webpages/
Thanks,
Marianina

Andrés said,         
October 2 2007

Hi Marianina,

There is no reference to the _uhash=off line in GA support. Are you sure multiple domain tracking in a single account will fail if this variable is set to on.

thanks,

Andrés

Marianina Chaplin said,         
October 2 2007

Hi Andres,
Thanks so much for your question. What GA documentation does is tell us what do if we either have subdomain OR multi-domains. To track across multiple domains AND subdomains, you have to use this extra _uhash variable in your tracking.

But if you only have subdomains or if you only have different domains then you don’t need to use _uhash and only need to use udn and ulink.
Does that help?
Marianina

Erica said,         
October 9 2007

Hello! I’ve been going crazy trying to figure this out, regarding which “UA-XXXX-X” code to use in multiple subdomains…

Situation: we have http://www.company.com and register.company.com.

“www” is the main site and has the UA code XXXX-1.

“Register” is a secure site for subscriptions, and has the UA code XXXX-4.

From what I’ve read, we need to add the _udn=”company.com” line to all the pages on both subdomains to view data in one report.

But, do we keep the UA code XXXX-1 or XXXX-4? Then, do we apply that code to both sites? Or do we leave them as-is, with each subdomain having its own UA code, but with the _udn code, rolling up to the http://www.company.com domain?

Thank you very much for your insights!

Marianina Manning said,         
October 11 2007

Hi Erica
Thanks so much for commenting and for your question. I have been away with work so quite tied up.

Anyway, in answer to your question. I’ll post a response on my blog tomorrow morning.

Re But, do we keep the UA code XXXX-1 or XXXX-4? Then, do we apply that code to both sites? Or do we leave them as-is, with each subdomain having its own UA code, but with the _udn code, rolling up to the http://www.company.com domain?

I don’t know all the details here, but in essence it could be simpler to only use one UA code for both http://www.company.com and register.company.com – and then set up different profiles to track for example just one part of the site(s) using the advanced filters you can access from within google analytics.
Because it would be alot easier to see overall site traffic, navigation etc, for all subdomains, if it was on one google analytics account.
and then set up the _udn=”company.com” to all pages on both subdomains etc

Is there a specific reason why there are separate UA codes set up for the different subdomains when they are I believe the same website?

Hope that makes sense
Marianina

Sorry, the comment area is Closed or not available to non-members

Introduction

With web analytics, we can transform the way we see and act on our marketing performance to make it, our site and conversion rates better. My blog shares my experiences on how to get good insights and put them into action.

Tags

Subscribe

    Add to Technorati Favorites
  • Add to My Yahoo!

Calendar

August 2007
M T W T F S S
« Jul   Sep »
 12345
6789101112
13141516171819
20212223242526
2728293031