Analytics
1.6K members online now
1.6K 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 parameter in backend

[ Edited ]
Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi,

 

I need to implement Google Analytics cross-domain tracking and I am having an issue here. I have found in the docs how to implement it at client side:

var param = ga.getAll()[0].get('linkerParam');
var url = "https://www.mydomain.com/?_ga=" + param;

However, due to the architecture of our systems I need to implement this functionality at the server side. I haven't been able to find at the docs any clue on how to deal with this, neither any API calls nor any library (preferably in Python).

 

Can anyone help?

 

Thanks in advance.

1 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Nicolás G
July

Cross-domain parameter in backend

Rising Star
# 2
Rising Star

Hi Nicolas,

 

What you're doing (in addition to the allow linker) is passing the client id to the 3rd party site. The client id is available as a task from analytics.js or can be parsed from the _ga cookie.  

 

By the way, have you tried to just use the Linker?  if you have straight html links it should work fine.

 

https://developers.google.com/analytics/devguides/collection/analyticsjs/linker


Best,

 

Theo Bennett

Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn

View solution in original post

Marked as Best Answer.
Solution
Accepted by topic author Nicolás G
July

Cross-domain parameter in backend

Rising Star
# 2
Rising Star

Hi Nicolas,

 

What you're doing (in addition to the allow linker) is passing the client id to the 3rd party site. The client id is available as a task from analytics.js or can be parsed from the _ga cookie.  

 

By the way, have you tried to just use the Linker?  if you have straight html links it should work fine.

 

https://developers.google.com/analytics/devguides/collection/analyticsjs/linker


Best,

 

Theo Bennett

Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn

Cross-domain parameter in backend

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Thanks Theo, I hadn't found this way of doing it but has came out as the solution.

Cross-domain parameter in backend

Rising Star
# 4
Rising Star

No problem, glad it worked for you!

 

Cheers,

 

Theo

Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn