I need to fetch some data from dataLayer in the Custom Javascript variable, but when I inspect dataLayer, it's always empty even that I have pushed values to dataLayer before I run the GTM script. Does anyone know if its possible to get values from dataLayer in custom javascript variable?
-
So is your problem that you do not know how to access the variable (then see Numm3ns answer), or is your problem with the push since you are saying that the dataLayer is empty (which btw. should never happen, there should be at least GTMs default events). Can you show the code that you use to push values ?Eike Pierstorff– Eike Pierstorff2015-11-09 08:14:01 +00:00Commented Nov 9, 2015 at 8:14
Add a comment
|