Logo

Remove Old Gtag Code

How to remove your old gtag code to avoid duplicate events in GA4 after installing SlideRule Analytics.

If you previously added a gtag code to your Shopify store with the same Measurement ID as the Data Stream connected to SlideRule Analytics you'll need to remove it.

If you see GA4 pageview events in your browser but no View Item or Add to Cart, then you probably have an additional gtag code that you need to remove

It's probably in your theme.liquid and will look like this:

You may also have previously added a gtag snippet and/or purchase event firing on your Checkout setting Order status page. Please remove that as well.