This is by far the most frustrating issue I've run into with Shopify. I'm trying to optimize a client's site speed by wrapping up all their tracking codes into Google Tag Manager to reduce the total number of outgoing requests. I removed all hardcoded tracking pixels from theme.liquid and placed them in GTM, went through ALL the apps and sales channels and disconnected from accounts, but there are still extra codes being loaded by Trekkie.
I'm using the Shopify Facebook and Google Analytics integrations as recommended, so those are not represented in GTM. Even so, it's still somehow loading 2 Google Analytics, 2 Google Ads and 2 Facebook pixels.
If I remove the facebook pixel id from this screen (Themes > Preferences), then the first pixel will not load, only the second unwanted pixel loads. The same issue persists for Google Analytics and Google Ads, except I cannot see multiple account ids in the source code, I can only see this in the network tab of DevTools and in the Google Tag Assistant.
Hi @plasmablobs , I actually found a solution, hacky though it may be. Comment out the first "content_for_header" instance, and then use a Liquid replace string filter to remove the specific pixel id and replace it with an empty string. It looks like this.
I've just spotted the same on my site. I was trying to stop one pixel from loading as it's unwanted and it cannot be deleted of course. I believe it's slowing down the performance unnecessarily according to Page Insights.
I have the facebook sales channel apps: Facebook Shop, Instagram and Facebook. I've now deleted Facebook as it's not adding any value yet until they combine Facebook Shop and Instagram together. That hasn't sorted it though.
So... I found out that this disease is also on the "Thank you"-Page (Order Status page). There is an old FB Pixel. I meanwhile have a new one pasted in the scripts section (and deleted the old!) but the old one is stil shown in the FB Pixel helper... So, how can I delete this disease?
I implemented the code you provided, and this removed the original instance of the pixel added within trekkie.load(), however the pixel is still showing in Facebook Pixel Helper due to the tags still being present.
If the tag is showing up that means that the script is being loaded from somewhere else via JavaScript since I couldn't find it in the source code. Do you have a facebook app installed on your store? I'd check some Apps you have installed since that might be the culprit.
I had this implemented on our store a week ago and working like a (hacky) dream but this morning it's stopped working. That pixel is still being pulled through. It's like Shopify has locked all the Trekkie stuff away from any filters.
I've seen 3rd party apps inject their own fb pixel. I don't agree with it but I understand it (making sure the data necessary gets loaded). In these cases I've requested the app to not inject it and they've complied.
It turns out that I used the Facebook Shopify app at one point (with the tracking pixel for site B), but then signed out of Facebook in the app. Even though I signed out, the pixel was still being loaded by Shopify onto all of our pages. Deleting the app removed the extra pixel.
as of this writing. I resolved this by going to the Google Sales Channel, disconnecting the google ads account. I guess the connected google merchant center should have the google ads conntected to it already. I'm just using the Google Sales Channel to provide data feed to Google Merchant Center and nothing else so disconnecting the Google Ads wont hurt at all but will resolved the added events on trekkie.load.
b1e95dc632