Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Long time GTM user whose looking to get my ecommerce legs under me. As such, I've built a demo store that I'm using as a proving grounds. Appreciate any time invested in providing guidance in advance. Here's the scenario:
I've built out all requisite ecommerce trigger events in GTM using a regex matching custom event that fires when the corresponding event and data is passed to the Data Layer. Triggering the custom events from the shopify side has proved challenging however. Specifically, I'm looking to trigger a data layer push when site visitors visit my collection pages.. I've written the following script that ***I think*** should trigger the pass to the data layer and fire the corresponding custom event tag but I'm not sure where and how to install. Any assistance would be greatly appreciated.
Shopify store: https://andrews-test-store-4037.myshopify.com/
"Specifically, I'm looking to trigger a data layer push when site visitors visit my collection pages"
The code you have does not belong in the theme or for tracking page views - it is for tracking sales on the order status page.
You could just use Google Analytics to track site page views
Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025