Analytics
1.9K members online now
Discuss regaining access to Analytics accounts, restoring accounts, changing user access levels, and navigating the homepage
 
Guide Me
star_border
Reply

How to get data from GA´s tracker when GA is implemented via GTM?

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I´m trying to get the ClientId from the GA tracker object as described here: Getting the Client ID from the cookie. Google´s page tells me to use the following function:

 

ga(function(tracker) {
 
var clientId = tracker.get('clientId');
});

 

 

This function is not working in my website. I use GTM to implement the GA tracking and not the analytics.js script. And I´m guessing GTM does not create a tracker object. Is there a reliable way to get clientId and other tracking data when using GTM?

 

Thank You

1 Expert replyverified_user

How to get data from GA´s tracker when GA is implemented via GTM?

Top Contributor
# 2
Top Contributor

Hi @Ciro S :-)
You should find the following article helpful in achieving this
https://www.simoahava.com/analytics/improve-data-collection-with-four-custom-dimensions/

 

For further help with GTM, the GTM help forum can be found here:
https://productforums.google.com/forum/#!forum/tag-manager

Bronwyn Vourtis, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here