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?

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.