2

I am trying to add dataLayer variable values inside my tag, but when I look at the tag fired inside the Network tab of my console in Chrome, I see that the tag has been populated with undefined values, even though the dataLayer object in console has the right values.

Here is my dataLayer variable in GTM:

enter image description here

This is how I access the value inside the tag:

ORDERID={{ORDERID}}

And this is what I see as dataLayer values in console:

enter image description here

But inside the network tab, I see that the dataLayer variable is undefined:

enter image description here

This is how my Tag Manager's DataLayer in preview mode looks like:

enter image description here Why?? I am pulling my hair over this now. How can I access dataLayer variable values?

gazubi
  • 561
  • 8
  • 32

1 Answers1

6

Your ORDERID variable is correctly defined. Your tag which reads that variable should be fired on the "CHECKOUT: COMPLETE" event, otherwise that variable will be undefined.

nyuen
  • 8,829
  • 2
  • 21
  • 28