How to test data layer variables in Google Tag Manager?

后端 未结 2 736
情话喂你
情话喂你 2021-02-14 07:06

In Google Tag Manager, I have some data layer variables set up. How can I test that the data is coming in through these variables as I expect? So, I want to verify that the data

2条回答
  •  醉酒成梦
    2021-02-14 07:45

    The console is your friend. What I would do is type dataLayer into the console after dataLayer.push, then click on the last object in the array and you'll see your values.

    For instance, I put the dataLayer.push on an onclick event and ran dataLayer and was able to see this come through. Granted they are static values, but you get the idea.

    enter image description here

    UPDATE:

    Google Tag Manager has updated their debugger, allowing you to see both Names or Values being passed into GTM.

    enter image description here

提交回复
热议问题