I’m having an issue with my Viewed Product and Added To Cart metrics being recorded twice for a single Shopify event which is playing havoc with my flows. I have the standard Shopify integration live which pulls through everything perfectly, but I’m also getting a duplicate metric recorded which doesn’t have the variables I need or has them formatted in an unusable way.

Klaviyo support were able to identify the source of the other metric as coming from this line of code, which is the Shopify native tracking solution Trekkie.

This code is added via {{ content_for_header }} in the theme.liquid, which inserts this tracking code plus a whole lot of other core functionality to the site as well, so I can’t just get rid of it. Any suggestions on how I can resolve this? I don’t understand how this can only be happening with me when the Trekkie script is installed on all Shopify sites?