Post purchase scripts in shopify-tag manager integration

Hi, i want to implement purchase event through tag manager on ga4 in shopify, I have been following this tutorial but the vents are not showing up on ga4 events. Should I add tag manger code on post purcahse scripts in checkout here:

This is the tutorial I am following: https://www.youtube.com/watch?v=dJmiFgOohOU&t=4s

Please guide? I have tag manger code in online store> preferences, what should I do to track purchase event?

If you have upsells, then yes, you need to track purchase events on the post-purchase page. Another consideration with it is adjustments of tracking to the order status page so purchases are not double tracked.

I spent last month creating a free Google Tag Manager container and post-purchase page tracking code to solve this problem, which you can easily get and learn more about at https://www.digitaldarts.com.au/google-analytics-shopify

I created the solution so it’s the only guide that shows you to do it for free that I’m aware of.

2 Likes

Hi your solution seemed very good but the purchase tag in the imported container is not working, I have followed the tutorial but it is not working.

Hi Josh,

Thank you for your great solution. I have encountered non-plus store with Honeycomb upsell app and trying to implement GA4 ecommerce tracking. The question - does this solution only work for stores with native upsell implemented or with upsell from apps (Honeycomb etc.) also?

I have tried to put the GTM script on the Post-purchase page scripts in Checkout&Settings but when reached post-purchase page, it was not tracked by GTM although it should be.

Or should I add script for post-purchase to the Custom JS section inside Honeycomb settings?

And there is also an option with creating new order for Upsell in Honeycomb settings, how can it influence your solution?

Appreciate you help and any experience you have.

Hi Josh,

You post makes me feel like I’m a noob. Good stuff.

Quick question as I’m a noob to Shopify.

Should I be seeing my GTM tags firing on /information, /shipping, and /payment pages? I see the tag there, but it’s not firing or rendering the datalayer.

It seems like they are blocking it for securing blah blah blah or something. Everything is working before and after those pages for me.

Shopify doesn’t allow editing the code in the checkout section so according to my information, you won’t be able to fire the tag on the specified pages. If you need to setup any event, just make thank you page as the trigger. But as Google Sales Channel app now supports ga4, so most of the vents will be tracked automatically for you.