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.