Navigate to your site, and then trigger the events that you want to test.
In the extension, click the on the Google Tag Manager tag. The Data Layer section should display the payload of the event that was triggered.
Any other tags that are loaded by Google Tag Manager are also listed in the extension. You can click these tags to review the data that was sent to them.
Iāve flagged this to the Help Docs team - but in future, for feedback on the merchants docs Iād recommend reaching out to support directly to flag content issues.
I couldnāt help but laugh (and grimace) at this āupdate.ā Itās as if Shopify is saying, āHereās a glimpse of our eventāenjoy watching it, but if youāre relying on GTM, good luck!ā It feels like a half-measure that leaves us high and dry rather than offering any alternative solution.
Hi Zamartz, the Shopify pixel helper will tell you which events were subscribed to properly by your GTM custom pixel and let you know about runtime errors.
To understand what GTM is doing after receiving the event from Shopify, there are a couple options. You can use the tag assistant to tell you which Google tag are loaded by GTM, there are chrome extensions for the specific pixel you are tracking (Facebook, TikTok, etc) or you can look at specifc network calls in the dev console. In the update, the link to the Shopify pixel helper pages has more detailed instructions on different ways to test your custom pixel.
@Dave_Strang sorry for coming in there so hot, but both Google and Shopify havenāt been particularly helpful on anything between the two.
Sadly for GTM there is no ātest modeā so while we can put tiktok, google analytics, pinterest⦠etc⦠in test mode and see the data capture on their sides the sandbox and removal of legacy tag assist knee-capped the ability to do any real QA with GTM though shopify. Itās working in the dark now.
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.
@Dave_Strang that is certainly interesting but itās not what we need really. GTM side shows what tags were able to use that data, if they were missing details for a specific tag and more⦠just knowing what event pushed isnāt enough.
@Dave_Strang adding to what @zamartz has mentioned, even following your approach from the test view of Shopify, when firing a custom DataLayer event, it is not registering on the console. we can see it in the fired events on Shopify but not the console.
I understand that this may not meet your needs, but as previously mentioned, Tag Assistant is not fully compatible with custom pixels.
Many of our largest brands successfully utilize GTM with custom pixels, and they inspect network calls to debug their GTM tags. Iāve done this myself, and while it can be effective, itās a tedious process and lacks the comprehensive insights provided by Tag Assistant.
Shopify is actively advocating for Google to make their tool compatible with custom pixels, but unfortunately, it hasnāt been prioritized.
Google will recommend that you do not use GTM in custom pixels and instead use their Google and YouTube app and other apps in the Shopify app store.
If you canāt live without tag assistant for debugging, I would recommend you look at alternatives to GTM on Shopify.
Totally hear you dave. Everyone wants their own thing to work their own way.
Normally Iād say fine and rely on the big companies of Shopify and Google to play well together with their āofficial appsā but that is the other problem. The app doesnāt play well either and is limited to previous functions.
The discount bug is something I might actually be able to help with. I sent it over to my Google counter part and will report back on the other tread what I find. Thanks for pointing it out.
Hi @zamartz - we are close to a resolution. The subtotalPrice field includes both line-item and order level discounts on the old Thank-you page. On the new Thank-you page, the subtotalPrice field only includes line-item discounts.
The current plan is to make a change so the subtotalPrice field is consistent and includes both order-level discounts and line-item discounts on both TYP.
Let me know if this makes sense from your perspective.