AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

Analytics
1.3K members online now
1.3K 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

Cross domain tracking to a subdomain

J B
Visitor ✭ ✭ ✭
# 1
J B
Visitor ✭ ✭ ✭

When cross-domain tracking to another site's subdomain, would the code be:

 

A)

 

 ga('linker:autoLink', ['example-1.com'] );

 

B)

 

 ga('linker:autoLink', ['subdomain.example-1.com'] );

 

or C)

 

 ga('linker:autoLink', ['example-1.com', 'subdomain.example-1.com'] );

 

 

Reason for asking is the "Thank you for buying" page is on that other site's subdomain.

1 Expert replyverified_user

Cross domain tracking to a subdomain

Top Contributor
# 2
Top Contributor

Hi,

 

You need to add it as  ga('linker:autoLink', ['subdomain.example-1.com'] );

The linker plugin will decorate with the linker parameter the links pointing to the domain specified.

 

Also make sure that linker is allowed on the other site:

ga('create', 'UA-XXXXX-X', 'auto', {allowLinker: true});

 

Hope this helps.


Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital

Cross domain tracking to a subdomain

J B
Visitor ✭ ✭ ✭
# 3
J B
Visitor ✭ ✭ ✭

Thanks Arnold. I'm really grateful for your reply. When you say make sire it's allowed on the other site, you mean the subdomain site, and the same instructions as in the google documentation (step 3)? Seen here: https://support.google.com/analytics/answer/1034342?hl=en

Cross domain tracking to a subdomain

Top Contributor
# 4
Top Contributor

Hi,

 

Yes, from step 3, you need to add allowLinker: true to the create command on the subdomain site. If you don't link back to site 1 from the thank you page, then you don't need the other two lines on the subdomain site. Let me know if you have more questions.


Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital