2
votes

I have set up Google Tag Manager and 2 data layer variables: one for tracking userid, to be passed to Google Analytics for synchronizing user sessions, and one to track visitor type.

Both variables are assigned values as expected when previewing Google Tag Manager while using Universal Analytics Tag. The UA tag is configured to fire on Window Load (gtm.load) on all pages but when checking in Analytics, no custom variables are being shown under Audience Reports nor any user id specific synch (this is for a new view) is happening. I have tried firing the UA tag on dom ready and page view as well, but no change in result.

My visitorType variable is mapped to corresponding custom dimension index in Analytics, the custom dimension is in active state in GA . The userid has been defined as Field to Set in Tag Manager and value assigned to data layer value. My Google Analytics has userid views enables and I created a new view to be able to see the analytics for user id.

http://i.stack.imgur.com/WDCo3.png

1
Universal Analytics does not have custom variables, do you mean custom dimensions ? - Eike Pierstorff
Yes, I mean custom dimensions on the Google Analytics side, Not sure, what analogous terms is for the key and value pair pushed into data layer and passed from Tag Manager onwards to Analytics. - V_C
What do you see in the dataLayer when your page loads? Remember that data shows up in your standard reports only after it has been processed, which can normally take up to 24 hours. - nyuen
Hi, the data is coming correctly now. I was expecting to see the custom dimension data under my Audience report within the section custom variables. This custom variable data used to populate automatically earlier when I was running ga.js, as I understand now the custom dimensions have to be explicitly pulled into reports including audience reports - V_C

1 Answers

0
votes

I guess you should first create a dataLayer variable in GTM to tell GTM that the dataLayer variables you are pushing should be mapped with {{uid}} and {{visitorType}} displayed in your IMG.

Example with "uid" : in the container, go to Variables >> dataLayer Variables In the Variable name, you should use uid (as mentionned in the IMG), and in the Data Layer Variable Name, you should use exactly the name of the variable pushed into the dataLayer.