1
votes

i am trying to implement tracking with tag manager in our site....

is there any way to get google universal analytics dimensions through tag manager?

i need similar method like ga.getByName(); in analytics.js

1
what are you trying to do? normally you talk with GTM via dataLayer - is there something specific you'd like to do with tracker object from frontend?Łukasz Rysiak

1 Answers

0
votes

Google Tag Manager

You can create a new Tag of type "Universal Analytics" and then specify your Custom Dimensions under More settings -> Custom Dimensions.

Index must be an integer value (1-20 for Basic version of Google Analytics)

Both Index & Value accept a Makro to dynamically fill in data.

Google Analytics

In Google Analytics you need to specify what Custom Dimensions you expect to get in the Property settings of your account: Custom Definitions -> Custom Dimensions.

The "Index" that you set here has to match with what you specified as index for the dimension in the Tag inside Google Tag Manager.

See the official documentation about details on which scope to choose: https://developers.google.com/analytics/devguides/platform/customdimsmets