Google Analytics - User-ID tracking

Mouth

Well-known member
Anyone using Google Analytics User-ID tracking?

Enable the User-ID feature
The User-ID lets you associate engagement data from different devices and multiple sessions, so you can discover how users interact with your content over an extended period of time.
[...]
Add the following line to your tracking code to send User-ID data to Google Analytics:

ga(‘set’, ‘&uid’, {{USER_ID}}); // Set the user ID using signed-in user_id.

Where the value of USER_ID is a string and represents the stable and unique ID retrieved from your system.


To add the above into our google_analytics template, would it be;

ga(‘set’, ‘&uid’, {{{$visitor.user_id}}});
 
Back
Top Bottom