Analytics
2.7K members online now
2.7K 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 with 3rd party Login

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Curious how to do cross-domian tracking with Universal Analytics and GTM under the following Scenario:

 

There are three domains. www.example.com, secure.thirdparty.com and www.examplestore.com

 

So is there any way to prevent a new session from starting when a user must have the following flow? www.example.com -> secure.thirdparty.com -> www.examplestore.com?

 

Thank you

1 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Roger F
March 2016

Re: Cross-Domain Tracking with 3rd party Login

Top Contributor
# 8
Top Contributor
Hi Roger,

You're right, you need to pass the client id to secure.thirdparty.com and then to pass it to www.examplestore.com. Is it possible to extract the query parameter from the url on secure.thirdparty.com and then to add it to the link that goes to www.examplestore.com?

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

View solution in original post

Re: Cross-Domain Tracking with 3rd party Login

Top Contributor
# 2
Top Contributor
Hi Roger,

You need to set up cross domain tracking between www.example.com and www.examplestore.com and to add thirdparty.com to the Referral Exclusion List in Admin -> Property -> Tracking Info. This will prevent secure.thirdparty.com from triggering a new session.
Returning visitors who have secure.thirdparty.com set as their traffic source and come back as direct they will still have that source set until the campaign timeout is reached. Hope this helps, let me know if you have 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

Re: Cross-Domain Tracking with 3rd party Login

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
By "set up cross domain tracking" you mean Set AllowLiner = true and the Auto Link Domains to www.example.com and www.examplestore.com?

When I do that and add all three domains to the referral exclusion list I still get two separate sessions when going from example.com to thirdparty.com to examplestore.com. The first session has my original source/medium (rftest / rftest) and the second session has (direct) / (none)

I'm not sure how adding auto-link domains would help as the two pages don't link directly to each other, they have to go through thirdparty.com.

Re: Cross-Domain Tracking with 3rd party Login

Top Contributor
# 4
Top Contributor
Hi Roger,

You also need to add a field "cookieDomain" with the value of "auto".
Once added to the referral exclusion list, thirdparty.com will not trigger a new session, the session from www.example.com will be resumed on www.examplestore.com.

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

Re: Cross-Domain Tracking with 3rd party Login

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭
Thanks Arnold,

But that still doesn't seem to make sense. the cookieDomain field sets the domain that the cookie will be saved on. If it's set to "auto" it would set the cookie on "www.example.com" to "example.com" and the cookie on "www.examplestore.com" to "examplestore.com", hence they still won't be able to read/write each other's cookies.

Re: Cross-Domain Tracking with 3rd party Login

Top Contributor
# 6
Top Contributor
Hi Roger,

The point of cross domain tracking is that only a single cookie is set across the domains. The cookie contains the client id. The domains are linked in the tag settings in GTM so GA will know that it is the same session and the third party site won't start a new session. Without setting cookie domain to auto cross domain tracking will not work.
https://developers.google.com/analytics/devguides/collection/analyticsjs/linker#using_a_single_snipp...
This is the non GTM version, but you can see that the cookie domain is set to auto in the code.

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

Re: Cross-Domain Tracking with 3rd party Login

Visitor ✭ ✭ ✭
# 7
Visitor ✭ ✭ ✭
Hi Arnold,

Sorry, but I've been reading up on this the past week and your solution doesn't seem correct. I've implemented it and tested as well and it doesn't work.

The reason I don't think it works is because there's nothing for the autoLInk plugin to do. On www.example.com there are no links to www.examplestore.com. There are only links to secure.thirdparty.com (which doesn't have GA). So when autoLink performs a substring match it will return null. The client id is therefore never passed to www.examplestore.com with your method.

Marked as Best Answer.
Solution
Accepted by topic author Roger F
March 2016

Re: Cross-Domain Tracking with 3rd party Login

Top Contributor
# 8
Top Contributor
Hi Roger,

You're right, you need to pass the client id to secure.thirdparty.com and then to pass it to www.examplestore.com. Is it possible to extract the query parameter from the url on secure.thirdparty.com and then to add it to the link that goes to www.examplestore.com?

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

Re: Cross-Domain Tracking with 3rd party Login

Visitor ✭ ✭ ✭
# 9
Visitor ✭ ✭ ✭
Hi Arnold,

Not without paying them $$$ Smiley Happy

Thanks for your time and patience.