All things Shopify and commerce
Hi, I am very confused, my conversion tracking isnt working, ive tried on google tag assistant, please see below attachment.
Someone please help me on this, doesnt seem to work on the page checkout but works everywhere.
Hi @pnsempire,
I understand your Google Ads conversion tracking isn't working properly in the checkout. Here's the exact solution for Shopify's new Checkout 2.0 system:
1. First, clear your existing Google tag setup:
- Go to Shopify Admin → Settings
- Remove any existing Google Analytics/Google Ads connections
- Clear any custom tracking code you may have added
2. Setup the new tracking:
- Go to Shopify Admin → Settings → Customer Events
- Click "Add Custom Pixel"
- Paste this exact code (just update GTM-XXXXXX with your GTM ID):
``javascript
// Initialize dataLayer and GTM
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer', 'GTM-XXXXXX');
// Subscribe to key checkout events
analytics.subscribe("checkout_completed", (event) => {
window.dataLayer.push({
event: "checkout_completed",
timestamp: event.timestamp,
orderId: event.data?.checkout?.order?.id,
value: event.data?.checkout?.totalPrice?.amount,
currency: event.data?.checkout?.currencyCode
});
});
analytics.subscribe("checkout_started", (event) => {
window.dataLayer.push({
event: "begin_checkout",
timestamp: event.timestamp,
value: event.data?.checkout?.totalPrice?.amount,
currency: event.data?.checkout?.currencyCode
});
});
```
3. Verify the setup:
- Enable Test Mode in Shopify Customer Events
- Make a test purchase
- You should see events firing in your Google Tag Assistant
- Check Google Analytics Real-time reports to confirm data is flowing
The reason your current tracking isn't working is that Shopify Checkout 2.0 uses iFrames and requires Customer Events for proper tracking. This new code works directly with Shopify's system and will track conversions accurately.
Let me know if you need any clarification on these steps.
Best regards,
Shreya | Revize
I used simproysis and belive there might be a tracking through there will this work?
Hi pnsempire,
Thanks for your query.
FYI, GTM cannot be connected with the checkout page. To track the checkout event, you would need to implement Custom Datalayer. Once you have datalayer setup on custom pixel then conversion Tracking will work.
There are some specific steps to be followed to achieve this goal:
1. Datalayer setup on custom pixel
2. Datalayer variable setup on GTM (value, currency, transaction ID, name , email)
3. Create the conversion Action manually and set up the Google tag with the conversion ID and conversion Label
4. Creation of a tag for the purchase event and assigning the variables as event parameters and triggers to fire the event and send it to the ads manager.
How did you configure your conversion tag and trigger?
Feel free to ask if you have any questions.
Thanks
How did you configure your conversion tag and trigger?
Hi,
sorry... for my question... But in preview mode GTM I do not see the GTM code... Preview mode told me... that the the code is missing there.
Thank you very much for your advice,
yours sincerely,
Milan
Hi Litvi,
Thanks for your query.
Maybe you misconfigured the Datalayer and GTM.
You can preview if you have the proper datalayer in the custom pixel and GTM connected. I configure the Datalayer for my clients in the way I can preview it check the tag firing status, variables value, datalayer and event data .
I have added some images that I connected GTM with my shopify website and preview it.
Feel free to ask if you have any questions.
Thanks
I understand you...
I see my GTM tag on the all pages... but If I am on the checkout... there is missing... I do not know why.
Thank you very much,
yours sincerely,
Milan
As i said it depends on the Datalayer .
Different websites require different datalayer to implement tracking and preview.
Maybe I do not understand you... Sorry... please...
I have done hundreds of GTM implementations - but on another platform... Joomla, drupal, etc...
I copy code from GTM and I put to the theme.luquid ... to the head and to the body...
It is a common GTM implementation on another platform... <head> and <body>...
But here on shopify - after implementation is GTM everywhere, but on the checkout NOT... And I do not know why... If you understand me...
Thank you very much,
Milan
one more thing...
I can see through the internal custom pixel, when I click on the TEST... I can see GTM there + event too...
But I can't see it through google tag assistant...
I'm confused about this...
yours sincerely,
Milan
Hi, im having same issue as guy who started the thread, im using simprosys, they automate the conversion tracking and state there is not need for google gtags since its done through them, but for 2 months now ive been trying to fix the issue, they are pretty much useless as they refuse to accept there is an issue.
I can see i have tags firing on my site, but i do not have a google tags account in tags manager, my conversions on google are showing last conversion, but with a value of 0 apart from add to cart, the begin checkout and purchase dont state last recorded conversion.
Simprosys app tell you to add some custom code to customer events, this includes a datalayer, im wondering if you have any kind of solution.
my website is www.luvasmr.co.uk
Thanks for your query.
First of all as you are from EEA or Europe you must have GDPR compliance Cookie Consent Banner. Without That Google Is not gonna count the conversions from Google ads. To configure cookieconsent banner you can consider cookieyes
If you already implemented consent banner v2 then comes to the conversion Tracking. I have no Idea about the apps you are talking about so sorry for that.
What I can suggest you to configure the Google Ads Conversion Tracking with Google Tag Manager GTM. GTM is a very powerful and convenient platform to configure any tracking code and very consistent in Tracking the conversions or e-commerce events.
Further more google tag manager enables us to configure server side tracking with first party domain/subdomain to bypass 3rd party cookie blocking by the ads blocker or browsers.
Feel free to ask if you have any questions.
Thanks
2m ago Learn the essential skills to navigate the Shopify admin with confidence. T...
By Shopify Feb 12, 2025Learn how to expand your operations internationally with Shopify Academy’s learning path...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025