Hi All,
I am in the process of configuring tag manager and analytics and have them successfully firing across the site except for the checkout pages.
I know in the documentation Shopify say to edit the checkout.liquid template but if I'm understanding correctly that's only available to enterprise customers on Shopify Plus??
Thanks,
Brad
Hi Brad, For GA to work in the checkout too you'll need to add it through your stores admin settings like this https://help.shopify.com/manual/reports-and-analytics/google-analytics/google-analytics-setup you could try adding tag manager in the settings too like this article describes https://www.getelevar.com/how-to/google-tag-manager-shopify/
Thanks Matt.
Yeah I have GA installed through the admin area. It was more to have GTM firing on the checkout pages to assist with usability tools to map the drop out points of the form funnel etc.
thanks for your advice!
Brad
Brad, you're right in that the checkout.liquid file is only available for Shopify Plus. Like what was suggested, you'll need a fair bit of work to go in to create your own Enhanced Ecommerce analytics through GTM. But if you want to use GTM for checkout usability as opposed to core metrics like Enhanced Ecommerce, you can get it firing on the checkout by adding the following to the "Additional Google Analytics JavaScript" section:
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-XXXXXX');
This isn't working. At least not in Sept 2020. The code we paste in to Additional Google Analytics JavaScript" section is being escaped. That is a " (quote) becomes ". Obviously, that's going to muck things up.
User | Count |
---|---|
5 | |
4 | |
3 | |
3 | |
3 |