Custom Client ID + Measurement Protocol

1,706 views
Skip to first unread message

Jon Brown

unread,
May 20, 2013, 6:01:40 PM5/20/13
to google-analyti...@googlegroups.com

I am using Google Universal Analytics with a custom client id, and I am also pushing ecommerce transactions server-side using that custom client id. The transactions show up fine in the ecommerce section of the conversions area. However, I don't think these transactions are actually getting associated back to the original client session, because the sources of the transactions are all shown as direct or organic and with the user agent of my server-side program. Furthermore, they are not getting associated with the Adwords campaigns in the linked Adwords account, which is what I am really trying to do.

Anyone have any ideas on what's going wrong here? Is it because I am using a custom client id? Would this work if I switched to using the default client id? 

FYI, it's actually pretty annoying to switch, but it's possible. I can't parse the cookie server side because there are no further requests going to my server by the user. I guess I'd have to pull the client id in JS and make an ajax call to my server to pass back the id. 

If the problem is the custom client id but this is going to be fixed soon, I'd rather wait for that.

Thanks,

Jon Brown

Lothaire Ruellan

unread,
May 20, 2013, 6:11:08 PM5/20/13
to google-analyti...@googlegroups.com
I think the UA library still uses the utm cookies to track the traffic source of a visit across pageviews/events. If you pass your eCommerce transaction info server side, UA has no way of knowing for which visit this transaction should be attributed to. Using the custom user ID only tells UA which visitor the conversion should be credited to. Therefore, UA attributes all the transaction to undefined traffic source (aka "direct").

Jon Brown

unread,
May 21, 2013, 11:22:59 AM5/21/13
to google-analyti...@googlegroups.com

Hmm. Does that mean it wouldn't work even if I was using the default client id? In that case, there's no way to get offline transactions to show up as conversions for the Adwords campaigns that generated the original traffic?

Lothaire Ruellan

unread,
May 21, 2013, 12:37:31 PM5/21/13
to google-analyti...@googlegroups.com
You can pass via the measurement protocol all your usual campaign information (campaign name, campaign source, etc...).
i guess the trick would be to make sure your server has access to the necessary data so it knows how to correctly send the campaign tracking values along with the ecommerce transaction detail. Not sure how you would be able to do that.
There's even a parameter for campaign ID which I've never heard of in GA. Not sure if it is the same thing as the gclid generated for Adwords campaigns when auto-tagging is on.

Jon Brown

unread,
May 21, 2013, 5:50:51 PM5/21/13
to google-analyti...@googlegroups.com

Ah, perfect. I passed the gclid from the original visit and the transactions are now being associated with the Adwords campaigns. Thanks!

Zvika Jerbi

unread,
May 22, 2013, 1:51:45 AM5/22/13
to google-analyti...@googlegroups.com
Hi Jon, 
Im guessing you get 2 visits registered right? one for the transaction and one for the actual visit right? you can check this by seeing if the visits with transactions have any pageviews... 
This means you probably get 2 visits from each gclid... 
one more question, before you added the gclid parameter, did you see the data being registered correctly in the multi channel funnels? 

Thanks, 
Zvika

Jon Brown

unread,
May 22, 2013, 1:39:26 PM5/22/13
to google-analyti...@googlegroups.com

Zvika,

I don't think I'm getting two visits. I'm seeing odd (not even) numbers for visits, and in the time to purchase section, there are transactions with just 1 visit. It looks correct.

And no, the data was not registered correct in the multi-channel funnels before I added the gclid either.

Jon

Lothaire Ruellan

unread,
May 22, 2013, 2:25:23 PM5/22/13
to google-analyti...@googlegroups.com
Zvika has a good point though. I wonder how GA can tie the conversion passed server side to the visit in which the purchase occurred. Maybe sessionization is done by GA's server, looking at the sequence of hits by the same user with same traffic source information? 

Zvika Jerbi

unread,
May 22, 2013, 2:34:22 PM5/22/13
to Lothaire Ruellan, google-analyti...@googlegroups.com
Thanks guys,
I dont think there should be a need to transfer the traffic source. wasnt that the whole point?  what would someone do if its not a landing page and you dont have the traffic source available? (cookie of universal doesnt store the traffic source anymore)
Ill be looking deeper into this. hope to come back with some answers soon. 

Zvika



--
You received this message because you are subscribed to a topic in the Google Groups "google-analytics-analyticsjs" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-analytics-analyticsjs/PnsLLOqPbtQ/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to google-analytics-ana...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Zvika Jerbi
Tel:               972-3-6253340
Mobile:       972-52-3927675
Email:         zv...@swc.co.il
Web site:       www.swc.co.il

Lothaire Ruellan

unread,
May 22, 2013, 2:52:05 PM5/22/13
to google-analyti...@googlegroups.com, Lothaire Ruellan

If you look at the query string data passed to UA using HTTPFOX, you will see that the analytics.js library is passing for every hit in a visit traffic source information. I’m not quite sure where it is getting this information from, if it's not stored in a cookie, but you can definitely see that the client is sending the utm campaign data with every pageview, event, transaction, item etc…

To unsubscribe from this group and all its topics, send an email to google-analytics-analyticsjs+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 

Brad Townsend

unread,
May 22, 2013, 3:06:24 PM5/22/13
to Lothaire Ruellan, google-analyti...@googlegroups.com
Hi Lothaire,

You are correct that in Universal Analytics, sessionization is done server side. The _utma and _utmz parameters you see in the beacon are only used to support migration of existing campaign data from sites that switch from ga.js to analytics.js. The actual campaign is computed directly from the location (&dl) and referrer (&dr) parameters.

-Brad





--
You received this message because you are subscribed to the Google Groups "google-analytics-analyticsjs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-analytics-ana...@googlegroups.com.

Lothaire Ruellan

unread,
May 22, 2013, 3:20:39 PM5/22/13
to Brad Townsend, google-analyti...@googlegroups.com

Oh ok. In that case, is it necessary to pass any campaign information server side in the case where the pageview data is sent client side and the transaction data is passed server side? If Jon passes the correct cid with his server side call via the measurement protocol, and sessionisation is done server side, then it should not be necessary to pass campaign information for the transaction to be correctly attributed to the right campaign, should it?

Thanks.

 

Lothaire

To unsubscribe from this group and all its topics, send an email to google-analytics-ana...@googlegroups.com.


For more options, visit https://groups.google.com/groups/opt_out.
 
 



 

--
Zvika Jerbi
Tel:               972-3-6253340
Mobile:       972-52-3927675

Email:         zv...@swc.co.il
Web site:       www.swc.co.il

--
You received this message because you are subscribed to the Google Groups "google-analytics-analyticsjs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-analytics-ana...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

 


CONFIDENTIALITY STATEMENT: This message is intended only for the addressee and may contain information that is confidential or privileged. Unauthorized use is strictly prohibited and may be unlawful. If you are not the intended recipient, or the person responsible for delivering to the intended recipient, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. If you have received this email in error, please delete it and inform the sender immediately via email.

Brad Townsend

unread,
May 22, 2013, 6:59:46 PM5/22/13
to Lothaire Ruellan, google-analyti...@googlegroups.com
All hits with the same clientId (&cid) are grouped together during sessionization. Keep in mind that new sessions are created whenever there is a 30+ minute gap in hits, or when a new campaign starts.

Zvika Jerbi

unread,
May 24, 2013, 8:23:54 AM5/24/13
to google-analyti...@googlegroups.com, Lothaire Ruellan
Thank you Brad. This is great! 
What is the traffic source that gets registered to hits with the same cid that passes the 30 min gap? Will it give attribution the the last traffic source? (like what direct visit would do) 
Thanks, 
Zvika

To unsubscribe from this group and all its topics, send an email to google-analytics-analyticsjs+unsub...@googlegroups.com.


For more options, visit https://groups.google.com/groups/opt_out.
 
 



 

--
Zvika Jerbi
Tel:               972-3-6253340
Mobile:       972-52-3927675

Email:         zv...@swc.co.il
Web site:       www.swc.co.il

--
You received this message because you are subscribed to the Google Groups "google-analytics-analyticsjs" group.

To unsubscribe from this group and stop receiving emails from it, send an email to google-analytics-analyticsjs+unsub...@googlegroups.com.


For more options, visit https://groups.google.com/groups/opt_out.
 
 

Brad Townsend

unread,
May 24, 2013, 1:01:29 PM5/24/13
to Zvika Jerbi, google-analyti...@googlegroups.com, Lothaire Ruellan
Yes. The traffic source from the previous session is carried over into the new session.


To unsubscribe from this group and stop receiving emails from it, send an email to google-analytics-ana...@googlegroups.com.

Zvika Jerbi

unread,
May 24, 2013, 2:16:50 PM5/24/13
to Brad Townsend, google-analyti...@googlegroups.com, Lothaire Ruellan
Fantastic! Thank you 


Александр Максименюк

unread,
Jun 13, 2013, 10:28:28 AM6/13/13
to google-analyti...@googlegroups.com, Zvika Jerbi, Lothaire Ruellan
But it doesn't works now.

Some month ago it worked fine but now don't!

пятница, 24 мая 2013 г., 20:01:29 UTC+3 пользователь Brad Townsend написал:

To unsubscribe from this group and all its topics, send an email to google-analytics-analyticsjs+unsubs...@googlegroups.com.


For more options, visit https://groups.google.com/groups/opt_out.
 
 



 

--
Zvika Jerbi
Tel:               972-3-6253340
Mobile:       972-52-3927675

Email:         zv...@swc.co.il
Web site:       www.swc.co.il

--
You received this message because you are subscribed to the Google Groups "google-analytics-analyticsjs" group.

To unsubscribe from this group and stop receiving emails from it, send an email to google-analytics-analyticsjs+unsubs...@googlegroups.com.


For more options, visit https://groups.google.com/groups/opt_out.
 
 


CONFIDENTIALITY STATEMENT: This message is intended only for the addressee and may contain information that is confidential or privileged. Unauthorized use is strictly prohibited and may be unlawful. If you are not the intended recipient, or the person responsible for delivering to the intended recipient, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. If you have received this email in error, please delete it and inform the sender immediately via email.

--
You received this message because you are subscribed to the Google Groups "google-analytics-analyticsjs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-analytics-analyticsjs+unsub...@googlegroups.com.

NIROSHAN SAMUEL

unread,
Jun 13, 2013, 11:16:52 PM6/13/13
to Александр Максименюк, google-analyti...@googlegroups.com, Zvika Jerbi, Lothaire Ruellan
It is working for us perfectly. We are sending offline conversion through measurement protocol within 1 hour time. And adjusted the session time to 1hour using GUA settings. Now we can track paypal offline conversion successfully. Now we are going to send data with same CID after 1 hour and check the visit. - http://www.niroshan-samuel.com/track-paypal-conversion-100-with-google-universal-analytics-with-demography/



To unsubscribe from this group and stop receiving emails from it, send an email to google-analytics-ana...@googlegroups.com.

Oleksandr Maksymeniuk

unread,
Jun 14, 2013, 3:56:29 AM6/14/13
to NIROSHAN SAMUEL, google-analyti...@googlegroups.com, Zvika Jerbi, Lothaire Ruellan
Found, what was the problem. We were using q,u,i,c,k UA snippet, and now changed it to i,s,o,g,r,a,m but missed that they has different ways for setting ClientID, so we were trying to send cid that we were setting, while it wasn't used in site.

Now we have fixed the way of setting ClientID so all works great.

We use it for tracking conversions by phone on our call tracking service http://ringostat.com/ and now it works fine.
Reply all
Reply to author
Forward
0 new messages