All things Shopify and commerce
The shopify trekkie script inserts a "Google Gtag Pixel", but I have no idea where it is taking the data from. I would would like to change the values.
Any idea?
I'm not sure I necessarily need to modify its values, but I sure would like some clarification on trekkie. It's loading our global tag in the footer, which concerns me that it won't catch everything before it without our duplicate manual insertion of the global tag. Shopify is frustratingly silent as far as documentation goes for this...
What's the website and the code you're referring to? Shopify does not insert any gtag pixel... unless they've just started to roll something out to a select few stores.
I have a similar issue.
You can see it at https://theboholab.com/
I've removed all instances of Google analytics UA ID, Remarking, google ads codes from the Shopify theme files and checkout additional scripts.
I still get this portion Google Gtag Pixel loading from Trekkie
"Google Gtag Pixel":{"conversionId":"799551677","eventLabels":[{"type":"page_view","action_label":"AW-799551677\/DBcNCICx3owBEL3hoP0C"},{"type":"purchase","action_label":"AW-799551677\/AGReCIOx3owBEL3hoP0C"},{"type":"view_item","action_label":"AW-799551677\/RM0zCIax3owBEL3hoP0C"},{"type":"add_to_cart","action_label":"AW-799551677\/MXisCImx3owBEL3hoP0C"},{"type":"begin_checkout","action_label":"AW-799551677\/S-6SCIyx3owBEL3hoP0C"},{"type":"search","action_label":"AW-799551677\/VFQUCI-x3owBEL3hoP0C"},{"type":"add_payment_info","action_label":"AW-799551677\/agKgCJKx3owBEL3hoP0C"}],"targetCountry":"CA"}
{"Trekkie":{"appName":"storefront","development":false,"defaultAttributes":{"shopId":1027899510,"isMerchantRequest":null,"themeId":32197509238,"themeCityHash":5158894345615873504}},"Performance":{"navigationTimingApiMeasurementsEnabled":true,"navigationTimingApiMeasurementsSampleRate":1.0},"Facebook Pixel":{"pixelIds":["264335211120899","334310230658336"],"agent":"plshopify1.2"},"Google Gtag Pixel":{"conversionId":"799551677","eventLabels":[{"type":"page_view","action_label":"AW-799551677\/DBcNCICx3owBEL3hoP0C"},{"type":"purchase","action_label":"AW-799551677\/AGReCIOx3owBEL3hoP0C"},{"type":"view_item","action_label":"AW-799551677\/RM0zCIax3owBEL3hoP0C"},{"type":"add_to_cart","action_label":"AW-799551677\/MXisCImx3owBEL3hoP0C"},{"type":"begin_checkout","action_label":"AW-799551677\/S-6SCIyx3owBEL3hoP0C"},{"type":"search","action_label":"AW-799551677\/VFQUCI-x3owBEL3hoP0C"},{"type":"add_payment_info","action_label":"AW-799551677\/agKgCJKx3owBEL3hoP0C"}],"targetCountry":"CA"},"Session Attribution":{}}
I want to get ride of them.
I have the exact same issue. Is there anyone with the fix? Its giving me a double analytics error
The code you provided looks to be Google Ads tracking. I suspect that's from the Google Shopping channel/app done by Shopify. Shopify automatically sets up Google Ads tracking when you use it. Remove the channel/app if you don't use it, and I think it should go away.
But the Google app asks for all your account information and you provide it... and it's not what is showing up with the chrome extension.
Did anyone ever solve this or work out where it is getting the code from as it bears no relation to my actual tracking code.
The replace code is not working for me. Anyone have a solution for this issue that works?
Why not post the answer here, to help the community?
Depending on the content you need replacing you can use the replace function within the {{ content_for_header }}
First you would need to comment it out:
{% comment %}{{ content_for_header }}{% endcomment %}
and directly beneath it:
{{ content_for_header | replace:'originalContent', 'replacementContent' }}
wherein originalContent would be the thing you are looking to replace and replacementContent its replacement
For example, if you wanted to disable the Google Gtag Pixel within Trekkie in order to use your own hard coded scripting you could nullify that variable by doing the following:
{{ content_for_header | replace:'Google Gtag Pixel', 'Null Google Gtag Pixel' }}
if more than one thing needs replacing:
{{ content_for_header | replace:'Google Gtag Pixel', 'Null Google Gtag Pixel' | replace:'Facebook Pixel', 'Null Facebook Pixel' }}
and so forth; this essentially renders that code useless within the "Trekkie" script.
It's not an ideal solution but it gets the job done.
Great, it works! But the problem is still present in the checkout page. Basically, using this solution you solve the problem on all the pages excluding the checkout. Do you have any idea about the reason?
Tks
If you are on Shopify Plus: on checkout.liquid the code gets moved from {{ content_for_header }} to {{ tracking_code }}
{% comment %}{{ tracking_code }}{% endcomment %} {{ tracking_code | replace: 'Google Gtag Pixel', 'Null Google Gtag Pixel' }}
If not on Shopify Plus, there is not much that can be done here.
Tks, I'm not on Shopify Plus 😞
@Kneeko I have shopify basic plan, we have ga4 implemented, but shopify also loading the trekkie shopify inbuilt how to disable that ?
Same issue here, have you found any solution?
@Kneeko I added the same code but still shopify was render there ,
trekkie.load(
{"Trekkie":{"appName":"storefront","development":false
@Kneeko @Josh @everyone
i am confirm the we can't modify the header object.
I am sharing the test code with console out put.
{% if content_for_header %}
<script>
let shopi_code = {{ content_for_header | escape | json }}
console.log("Shopify content_for_header:", JSON.stringify(shopi_code) );
let shopi_code2 = {{ content_for_header | replace:'Google Gtag Pixel', 'Null Google Gtag Pixel' | replace:'Facebook Pixel', 'Null Facebook Pixel' | escape | json }}
console.log("Shopify content_for_header:", JSON.stringify(shopi_code2) );
</script>
{% endif %}
We want to take a moment to celebrate the incredible ways you all engage with the Shopi...
By JasonH Oct 15, 2024Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024