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
1.3K members online now
1.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

How to Track Users through Client ID?

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi!  I am new to Google Analytics and not a techie.  I have tried inserting the indicated snippets but to no avail.  If you could help me please, I want to know how to implement the tracking of users through Client IDs.  Looking forward to your response.

1 Expert replyverified_user

Re: How to Track Users through Client ID?

Top Contributor
# 2
Top Contributor
Hi Deanna,

a basic concept would be to:
1. Create a new custom dimension (user scope) in GA admin property level
2. Create the logic on your site to send the info - custom dimension with a value of clientId
3. Create a custom report with your custom dimension

The hardest part is #2.

An example (there are plenty other options as well):
Inside your tracking script do something like this

// change the tracking id to your property id
ga('create', 'UA-XXXXX-Y', 'auto');

// get the clientId value
var myClientId = ga.getAll()[0].get('clientId');

// set the custom dimension
ga('set', 'dimension1', myClientId);

// send the pageview with the CD
ga('send', 'pageview');

Hope it helps!

Kind regards,
Zorin
Web analyst @ escapestudio.net