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
4.3K members online now
4.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 with measurement protocol

Follower ✭ ☆ ☆
# 1
Follower ✭ ☆ ☆

Hello

 

I want to know if it is needed to use a cross domain variable when using the measurement protocol (using a <img> tag) for more than one domain.

 

Thanks!

1 Expert replyverified_user

Re: Cross domain with measurement protocol

Rising Star
# 2
Rising Star
Hi Luan,

If you are doing everything via the measurement protocol then no because you control the cid and all other data that is being sent. Cross domain is a solution to a first party cookie problem. You may have to add the ignored referrers in the UI admin, I have not tested this but as long as the hits have the same cid you should be fine.

Best,

Theo Bennett
Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn

Re: Cross domain with measurement protocol

Follower ✭ ☆ ☆
# 3
Follower ✭ ☆ ☆
Theo, what is exactly the CID? Sorry my ignorance.

Thanks for your answer!

Re: Cross domain with measurement protocol

Rising Star
# 4
Rising Star
Hey Luan,

No worries. cid is the Client ID. It's how GA identifies users. In a standard deployment it's stored in a afirst party cookie.

cid is required for each hit that you send via the measurement protocol.

More here:

https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#cid


Best,

Theo Bennett
Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn

Re: Cross domain with measurement protocol

Follower ✭ ☆ ☆
# 5
Follower ✭ ☆ ☆
I see

If I cannot read the cookie and know each user's CID, then my reports will be full of wrong data?

Thanks!

Re: Cross domain with measurement protocol

Rising Star
# 6
Rising Star
Luan,

When doing cross domain, basically the value of the _ga cookie (which contains the client id - cid) is decorated onto the links that are going cross domain. The autolink function does this for you by harvesting the value of the _ga cookie and using a hashed time stamp value with it. If you are doing it yourself, you need to harvest the value of the cookie and use it. Since you are using the measurement protocol for all tracking then you just need to set your own cid or harvest it form the part that is automatically done and then use it in your protocol push.

If this is all web to web you could use autolink but I imagine that you have already explored that and need to use the protocol. The most important thing you can do is to use the proper cid or your attribution will be totally hosed. It's really simple to harvest the value of the cookie and use that -- so no worries. Otherwise, if you have user self identification (log-ins) then you can set your own based on some hash of your backend crm id, etc. You could also pass this to the userid and enable a cross device view.

Best,

Theo Bennett
Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn