Shopify Trekkie Google Gtag Pixel

aleksv
Shopify Partner
1 0 1

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?

Jay_JUNKbrands
Shopify Partner
5 1 2

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.

Run Google Shopping ads? Get the free definitive guide to Google Shopping for Shopify (no optin required): https://www.digitaldarts.com.au/google-shopping
0 Likes
mrPerezInc
New Member
1 0 1

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. 

KabahCortes
New Member
1 0 0

I have the exact same issue. Is there anyone with the fix? Its giving me a double analytics error

0 Likes

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.

Run Google Shopping ads? Get the free definitive guide to Google Shopping for Shopify (no optin required): https://www.digitaldarts.com.au/google-shopping
0 Likes
Ketul_Patel
New Member
1 0 9

Why not post the answer here, to help the community?

Kneeko
Shopify Partner
6 0 4

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.

CarloMT
New Member
2 0 1

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

Kneeko
Shopify Partner
6 0 4

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.

0 Likes