Analytics
2.2K members online now
2.2K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

Subdomains with separate traking ID's setup

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hello,

 

 

 

I'm requesting some guidance & feedback for my GA implementation.

This is my situation:

Organization has 1 website & GA account (with multiple views & goals) e.g. example.com (we use Universal Analytics)
now we're building 2 separate blogs, each will get a subdomain e.g. blog1.example.com & blog2.example.com

Since using using 1 ID will give problems of self referrals or aggregated data or even mess up the goals I've currently set up, I want to protect the data from my main website.

Therefore I've chosen to use multiple Tracking ID's: the one I already had for my main website, 1 new one for blog 1, 1 new one for blog 2 and 1 new one that overspans the main website & the blogs so I will have the capability to report over the entire domain. Implementation through GTM.

here is an image explaining:
http://s24.postimg.org/jkqwy9gjp/GA_setup_blogs.png


Another reason for doing it this way is because the number of blogs will grow over the next year to 10-15 blogs.

I believe I'll have to exclude self referrals in the GA property that over spans main website and blogs, because I want to be able to see the entire path people took there.
But in my original Main website property I just want sources to be set as Blog 1 & Blog 2. Same for the property of Blog 1 & 2 I want to see source Main website.

Do I need to configuring the cookie field settings in my GA tracking codes (main website & blog use separate cookies for each domain, over spanning property gets 1 cookie to rule them all)? And what other things do I need to watch out for if I want a correct implementation?

e.g.

Main Website: gets original GA ID tracking code & the tracking code with the ID that over spans all domains
Blog 1: gets new GA ID tracking code for blog 1 & the tracking code with the ID that over spans all domains
Blog 1: gets new GA ID tracking code for blog 2 & the tracking code with the ID that over spans all domains

-> I get 4 properties & set the property that over spans all domains to exclude self referrals?

1 Expert replyverified_user

Re: Subdomains with separate traking ID's setup

Top Contributor
# 2
Top Contributor
Hi Marteen,

interesting situation. Lets do GTM first.

You need 2 GA tags (for pageview tracking) where the 1st will be a rollup tracker (all sites) inside the tag you need to set cookieDomain auto - cross domain is not needed if your only having blog subdomain(s). The second tag will serve as a 'local' tracker and the tracking id will be set based on the Page Hostname variable (Lookup table is pretty useful here). Both tags can freely use the All pages trigger.

For more control over which cookie is used for each tracker you can use the Fields to set for the local tracker - cookieName (so you will have 2 cookies).

GA setup
Now this is a bit tricky as you will, by default, have domain.com in the referral exclusion list - I would in your case try and set the local blog tracker properties to blog1.domain.com and leave the main domain to domain.com. Rollup tracker of course has only domain.com in the referral exclusion list.

Kind regards,
Zorin
Web analyst @ escapestudio.net