Custom dimension not populated by GTM - google-tag-manager

I have two sites set similarly, where I have a 'hit' level custom dimension in Universal Analytics. In GTM I have a tag which populates this custom dimension with a time stamp.
In one of the sites, the custom dimension gets populated. In the other it doesn't. In the screenshot you can see the GTM debug pane for the fired tag in the site that's not working. It seems like GTM is sending the data over - but for some reason I can't see it in Google Analytics (and in the other site it is)

Related

Google Analytics Custom Dimension Not Tracking Accurately

I have two custom dimensions set at the session-scope level within GA to capture an article's content category and subcategory in the blog of the site. GA populates these values about 60% of the time, with the rest not being set, and of the 60% that are populated, they're not always the proper category/subcategory for that blog post, but rather a different one.
You'll notice in the screenshot that the custom dimensions are being pushed, but the first GTM tracker (gtm2) is showing them as undefined, while the second tracker (gtm7) populates them from the datalayer.
Console Screenshot
I'm using GTM to push the custom dimensions into the datalayer with the Google Analytics Settings variable. Tag Manager Implementation
Have any suggestions on why the dimensions aren't populating properly within Google Analytics at the pageview level?
It is likely that at the time of loading the GTM (gtm.js) the value of those variables is not yet available, while at load (gtm.load) it is.

Implementing User-ID With Google Tag Manager

I have added Google Tag Manager to our site, and using the data layer inserted several custom dimensions, including 'user_id'
Data Layer with user_id shown
The Google Analytics variable in Tag Manager is configured to pass these data layer variables into the coresponding dimensions:
Tag Manager Variable & Dimensions in Analytics
I know this is working as I am able to add this as a secondary dimension in Analytics when viewing reports:
Analytics with Dimension Shown
However, the user view that is created when I have set up the User-Id isnt showing anything:
Creating the User View
We installed Tag Manager using the recommended steps:
Installation of Tag Manager
Do we also need to add the 'Global Site Tag Tracking Code'?
How to Implement the User-ID in your tracking code
If not, what am I doing wrong?
You're actually REALLY close. You actually don't need to create the custom dimension.
The correct way is to set the userId field in your GA tag (I did it through a GA variable so it is applied everywhere).
Yes, that is exactly correct (what #XTOTHEL answered above), but for those who are reading this, I found these two blog posts helpful (esp if you are using GTM):
GA UA: https://www.analyticsmania.com/post/google-analytics-user-id-with-google-tag-manager/
GA4: https://www.analyticsmania.com/post/google-analytics-4-user-id/
And of course, the GA docs: https://support.google.com/tagmanager/answer/4565987?hl=en

One of my Custom Dimensions not showing up completely on Google Analytics?

I created 3 custom dimensions through Google Tag Manager (added them as Data Layer Variables). Then, I added custom fields to my pages for these 3 custom dimensions.
After waiting about 24 hours, I checked the three custom dimensions on Google Analytics and two of them have showed up for all of the pages. The last one is showing up for maybe 4-5 pages, but not all of them. It's now been more than two days and the other pages still haven't populated with the last custom dimension.
Is there a quicker way to see if this third custom dimension is showing up for all of the pages with the designated custom field?
Since this is being done on a test site, most pages have not been visited a ton. Not sure if this can also matter for how long it takes Google Analytics to populate the data.
Get the chrome extension 'GA debugger' and go yourself to the site. On the console you ll see each hit sent to GA and all the fields that are being populated.
PS: Custom dimensions ll show up as 'cdX' where X is the number of the dimension.
I think you are passing the custom dimensions along with pageveiw. you can check the GA tags that are firing in network tab of your browser only to validate
In your browser access inspect element by right cliking on website and select network tab you can check the screenshot mentioned in the below URL to make all setting required to see GA tags in network tab
http://imarunkumar.blogspot.in/2016/08/blog-post.html
And then reload the page and you can see the Google analytics tags firing, check your tags if custom dimensions are being sent in the tags.
I hope you have provided the right custom dimension index number in GTM while creating the tags. Assume you are sending data to custom dimension 1,2,3 the in tag you can see the values sent.
cd1:xxxxxx
cd2:xxxxxx
cd3:xxxxxx
This confirms that Custom dimension tags are being captured on the page and sent through GA tags to Google analytics.
What if you can see these custom dimension beign sent through the tags but you cannot see the same in reports.
Here the custom dimension configuration you did on the analytics property needs to be reviewed.
As you are collecting all the custom dimension at every page the scope for these custom dimensions should be set at "HIT" level.
Let me know if you are facing any issue in checking them according to the instructions provided above.

google analytics & google tag manager : Where to read the data

I had to integrate the GTM and track few data into a webpage and im facing some comprehsion issues. I dont think it's code wise, but i don't get where i'm supposed to see the data that im tracking.
i've successfully added the GTM code into my application and defined some data to be sent inside the dataLayer variable, after that i can go to the GTM admin panel and choose to Preview and Debug, so i can see the data i'm trying to track and everything seems allright. Therefore, i don't know what happens to them next. I don't know where i can see the data that i track, where they are stored. I've linked my GTM account to my GA account so i can see the traffic and other datas, but not the ones i've put inside my dataLayer object.
Anyone know what are the next steps ?
Here's some screenshots of my tag
Thanks
I think Simo Ohava - the GTM "god" - is explaining it quite well:
Datalayer Basics:
https://www.simoahava.com/analytics/data-layer/
Google Tag Manager & Datalayer:
https://www.simoahava.com/analytics/google-tag-manager-data-model/
As far as I understand you, all your questions (including basics and how to access via tag manager - and more) are pretty nice answered/explained there.
I've linked my GTM account to my GA account
What do you mean by this? Where did you "link" the data? GTM tracks data via the tags you define to fire for various interactions on the pages, including pageviews, events, and transactions (all known as "hits"). Each tag that fires in GTM has an associated Universal Analytics property ID that comes from your Google Analytics account. You must include this ID in all your tags. This is where you tell GTM tags to send your data and this is where in GA you will find the reports on your data.
Simply pushing data to the dataLayer does nothing unless
you're also pushing events to it and using those events to trigger tags to fire
You've defined GTM variables to grab the data being pushed in
Your tags are configure to pull that data into your reports
EDIT
To pull data into GTM from the dataLayer, you need to do the following:
Make sure your data is pushed in the following format:
datalayer.push({
'event': 'your event',
'page': 'custom/path/path',
'otherData': 'custom dimension1',
'otherData2': 'custom metric1'
})
Create a Data Layer variable, whose name can be anything, and whose value is the name of the dataLayer key.
Include the Data Layer variable's name in whatever tag you need the data to apply to. For example, if it's a custom dimension you need to associate to your pageview, then go into the Advanced Configuration of the tag and add the data into the Custom Dimension section (remember to configure your CD in GA, and to include the index). You can be associating any kind of data to the specific tag (eg. page path, page title, page name).
Test and then publish your tag!

Enhanced Ecommerce data not showing up in Analytics using Tag Manager

I am trying to implement Enhanced Ecommerce (EE) for Google Analytics (GA) using Google Tag Manager (GTM) but don't see any data showing up in GA.
Using the GTM preview mode, I can see that the data in the dataLayer is correct and that the right Tags are fired. I have also made sure to (correctly) create separate Tags for all the things I want to measure, which are:
measuring the product detail view
measuring the checkout process (both checkout steps and checkout options)
measuring purchases
Perhaps I should also note that I am developing from localhost, but I don't think that should matter (?).
Edit:
When composing this question I was unable to post images, but I later realized I can post links of course. So, for clarification:
Tags that are fired on my Product Detail Page:
http://oi60.tinypic.com/2woeqe8.jpg
The dataLayer containing the ecommerce data:
http://oi59.tinypic.com/6s7yxd.jpg
It turned out working localhost actually was the problem, my solution to this problem is explained here: https://stackoverflow.com/a/29214212, but in short: go to Tags > My Tags > Configure Tag > More Settings > Fields to Set, type in 'cookie' in the Field Name input field, select cookieDomain from the suggestions, and set the value to none.

Resources