Sub-domain Tracking w/ Universal Analytics and Google Tag Manager

DanAntonson picture DanAntonson · Jan 13, 2014 · Viewed 7.9k times · Source

I am having a difficult time getting sub-domain tracking to work with Google Tag Manager and Universal Analytics. Here is the scenario (I've tried about 25 different setups and I simply cannot get it to work). My issue is I am still getting SELF-REFERRALS from traffic moving between the sub-domains.

I have one site, with 2 sub-domains (so I have example.com, 1.example.com and 2.example.com) . Given the nature of the each sub-domain, I have chose to utilize 3 separate containers for each site due to the type of tags each site will need and who will be managing it.

In each container, I have my Universal Analytics pageview tag. Each with the SAME UAID. I can assure you the tags are identical.

For each UA tag, I have Cookie Domain set to example.com (I have also tried putting 1.example.com and 2.example.com in their respective tags - that didn't fix it either.)

Next, I have Auto Link Domains setup with 'example.com,1.example.com,2.example.com.' I do NOT have AutoLinker enabled because it should not be required with sub-domains. (I have also tried enabling the autolinker, and can see it working, but I am STILL getting self-referrals). I have also tried leaving the Auto Link Domains field BLANK and that didn't fix it either.

The scenario above still results in a TON of self-referrals.

Any ideas? I'm hoping it's something obvious.

UPDATE: I read online elsewhere that using a CUSTOM HTML tag seems to resolve the issue. I've tested that solution and it has appeared to fix it. However, this seems to defeat the purpose of Tag Manager. Hoping someone else out there has a better solution than a CUSTOM HTML tag.


I've done plenty of research online, and to be honest, I can't find ANYTHING about how to configure this. I'm starting to wonder if anyone has done it.

Thanks in advance!

Answer

Eike Pierstorff picture Eike Pierstorff · Jan 15, 2014

I had the same problem. I 'solved' it by adding the subdomain to the referral exclusion list in the property settings. To test that the original campaign data is preserved (since I wasn't sure if excluded referrers would not show up as direct traffic) I created an url with dummy campaign (utm) parameters that called the subdomain; from there I navigiated to the main domain. Then in my data view I created a segment based on my dummy campaign. Since that segment showed pageviews both on the main- and the subdomain it seems to me that campaign data is preserved.

It does not feel right that I would have to use exclusion settings for a subdomain, but as far as I can tell it works.