Analytics
2.6K members online now
2.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

Catching the Client ID in a custom variable with GTM

Follower ✭ ☆ ☆
# 1
Follower ✭ ☆ ☆

I've been trying for a while now to retrieve the Client ID into a custom variable so I can use it in reports.

I used Simo's methods:

https://www.simoahava.com/analytics/improve-data-collection-with-four-custom-dimensions/

- https://www.simoahava.com/analytics/access-the-tracker-object-in-your-page-view-tag/ 

 

The advantage for me is that I wouldn't neccessarily need a webdeveloper to customize the tracking code in the original html source. So I'm trying to make this work.

 

Thanks to the second method, I get no firing errors. But the Client ID consistently returns 'false'. So in my reports, I only have one value in my Client ID variable: false.

 

Does anyone know what might be causing this and how I can fix it?

Catching the Client ID in a custom variable with GTM

Visitor ✭ ✭ ✭
# 2
Visitor ✭ ✭ ✭

Capturing the client ID is possible using tracking code changes; you can refer this article on on this link provided by Google support on how to capture client ID from a cookie.

 

I hope this helps.

Chris

Catching the Client ID in a custom variable with GTM

Follower ✭ ☆ ☆
# 3
Follower ✭ ☆ ☆

I was hoping to avoid having to change the tracking code. But if I do this, do I add this line to the standard GA tracking code? That's not really clear to me.

Catching the Client ID in a custom variable with GTM

Visitor ✭ ✭ ✭
# 4
Visitor ✭ ✭ ✭

If you have Google support account I would recommend connecting with them. 

Catching the Client ID in a custom variable with GTM

Follower ✭ ☆ ☆
# 5
Follower ✭ ☆ ☆

I don't, that's why I'm asking here...