Problem tracking products on GA4 and Tag Manager - google-tag-manager

I'm trying to track add to cart event on GA4 and Tag Manager.
The variables currency and value are working perfectly, I receive both when I check it on Debug View on Analytics. But the array of items doesn't work. I can see the variable on Tag manager, as you can check below. Can someone help me to understand why analytics do not receive this items??
array of items on Tag Manager

Related

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

Google Analytics custom event push thru Google Tag Manager

I have Google Tag Manager account created,
And I have Google Analytics account created,
Inside my app I only have GTM included, and after some research, I managed to connect my Google Analytics acc with GTM to track page views.
Now, what I used to do before with just using GA, I was using some custom events inside my app,
So ga('send', 'event', 'Videos', 'play', 'Fall Campaign');
Now I tried to do the same after GTM is connected but I'm not getting any events inside my admin
I also tried doing dataLayer.push with same event arguments and event is still not showing up
Does anyone have an idea of what I'm missing to get custom events working?
Also, I don't want them to be defined inside GTM (that would mean that for every custom event I need to create a trigger if I get it right)
Is it possible to just publish them without any configuration inside GTM?
Thanks!
You have to create Analytics Tag (type event), Trigger and some dataLayer Variables, you can find the guidelines here: https://support.google.com/tagmanager/answer/7679219?hl=en

How to instantly check if GTM Tag created is tracked in Google Analytics?

I created a custom metric in Google Analytics to track users who end up on that page.
This is the metric:
This is my setup in Google Tag Manager:
While I can see from GTM preview that the tag is firing, I don't understand why I don't see anything related to this in the Realtime -> Events (https://i.imgur.com/uLYvyWk.png).
Question 1: why does nothing show up? Do I have to wait until tomorrow for data to be populated in the reports view? If so, is there a way to instantly check whether the tag is tracked by GA? Having to wait 24 hours to know whether the tag is firing sounds abit long.
Question 2: Am I setting up my custom metric correctly? The intention is to track the error rate of users and be able to see which geographies / age range etc they come from.
Thank you!
the GTM tags in your screenshot are Pageview tags, so they wont show in the Real time > Events section. Check the Real time > Content report for your pageview being fired.
If you want to pass the metric with an Event, you need to create an Event tag and add the metric to the Event tag.

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