Testing Steps (#2) no longer work for "Create a Google Tag Manager custom pixel"

Hey @zamartz , I appreciate your feedback and agree that debugging GTM in a sandbox is not easy.

Since the release of custom pixels, Shopify invested in the debugging problem by building the Shopify pixel helper which will let you know if your custom pixel loaded properly and if the events were subscribed to properly.

To get visibility into what is happening between GTM and the pixels/tags GTM is loading, I’d recommend look at the network activity. You will be able to see if GTM loads the pixel/tag via the dataLayer.

In the example above, the green dot in the Shopify pixel helper indicates the event was successfully delivered to the sandbox. You can open the chrome developer tools and look at the network tab. Search for “datalayer” and you’ll be able to see activity related to it. In the example, it shows that GTM is loading a gtag.

Alternatively, you can add console.log to your pixel code to see where errors occur. For example, place a “console.log” in your code after a data layer push is complete. If it show up in the console log while test, you know that piece of code executed.


In the screenshot above, the green dot on the shopify pixel helper shows that the “checkout_completed” event was successfully subscribed to and was received by the sandbox without runtime errors. In the console log, the string “check_completed_pushed_to_dl” indicates that the code above this in the custom pixel executed without error.

I admit that if “test mode” worked with the sandboxed custom pixel, debugging would be much easier. Shopify invested in trying to make test mode work but we were unsuccessful in finding a solution that didn’t compromise the security of the sandbox.

I hope the above helps with your debugging of GTM in the custom pixel.

1 Like