This is my first time working with Google Analytics beacuse of client requirement and after getting the values, I have no idea how to show data in Reports/Realtime Preview. Could someone help me as noone at my office knows how this works. Pointing me to a documentation or how-to would be helpful too as I don't have much time and deadline is a day away from me
Asked
Active
Viewed 23 times
1 Answers
1
Then you test it like so on the site's console while running it in GTM preview:
dataLayer.push({event:"test", eventModel: {event_category: "pew-pew-pew"}});
Then you go back to the preview, find your test event, go in it, switch to variables and there you'll see your variable like so:
Now you can reference it in UI.
Note: this only works in DLV v2. Won't work in version 1. But it's not like you normally need the version 1. And you still can go deeper in version 1, but using CJS. Don't use v1 unless you know what you're doing.

BNazaruk
- 6,300
- 3
- 19
- 33
-
Although that wasn't exactly what I needed but it was the right direction so I got everything working after a few tweakings, I just needed to know that dataLayer.push() function. Thanks @BNazaruk – Zaffer Abbas Apr 16 '23 at 05:14
-
It's quite rare for someone to now know about the push, but know about the rest. Also, complete answers are better since someone who finds your question may have a problem in a different spot. – BNazaruk Apr 16 '23 at 16:10