Skip to content
Advertisement

Tag: google-tag-manager

dataLayer.push() return value meaning

I’m struggling to implement Google Tag Manager at my job, I do have the problem that the administrator console is not available so I got to trust that the configuration is correct. Anyway, I initialized the dataLayer array, I included the GTM script and now some events are getting sent to Google. Enhanced e-commerce is enabled, but if I copy

What is the pattern used by Google Tag Manager in order to observe de `dataLayer` Array?

I observed the dataLayer array and I don’t see any changes to push. No custom methods at all, actually. How is GTM observing the changes to the array? As far as I know, changes to an Array don’t throw any events, do they? Edit: I did some more research and found Google’s library for interacting with the dataLayer: https://github.com/google/data-layer-helper#listening-for-messages I’ll

Advertisement