Shopify Conversion Tracking: GA4, Meta CAPI & Google Ads Done Right
If you run ads to a Shopify store and your GA4, Google Ads or Meta numbers never match your Shopify orders, this page is for you. Shopify's checkout now runs on checkout extensibility, so old thank-you page scripts no longer fire and tracking has to live in Customer Events and on the server. I rebuild it so every platform sees the same purchases, with the right value and order ID.
Shopify · Ecommerce
Purchases tracked through Customer Events, not retired thank-you page scripts
Meta Pixel and Conversions API deduplicated with the Shopify order ID
Server-side backup from Shopify order webhooks via Stape or your own sGTM
GA4 and Google Ads values that reconcile with Shopify order reports
Proper Shopify conversion tracking means sending checkout events from a Customer Events custom pixel (or a well-configured app), backing up purchases server-side from Shopify order webhooks, and using the order ID as the transaction and event ID everywhere, so GA4, Google Ads and Meta count each order once, with the correct value and currency.
Tracking flow
How tracking works on Shopify
The events I set up on Shopify, and where each one is sent.
03Google Tag ManagerOne web container for all tags
04Server-side GTMOn your own subdomain
Sent to
GA4Ecommerce and lead events
Google AdsConversions
MetaPixel + Conversions API
TikTokPixel
Why it breaks
Why Shopify tracking goes wrong
Thank-you page scripts are gone
Shopify has been retiring 'additional scripts' on the thank-you and order status pages (Plus stores first, then all plans). Any purchase tag that lived there has quietly stopped firing, which is often why conversions dropped without anyone touching the ads.
Custom pixels run in a sandbox
Customer Events pixels load in an isolated sandbox, so they cannot read your theme's page, click on checkout buttons or rely on GTM Preview mode the normal way. Tags copied from a regular website usually break or send empty values there.
Native apps and manual tags double-count
The Google & YouTube and Facebook & Instagram apps send their own events. Add a GTM setup on top without turning anything off and you get two purchases per order and inflated ROAS.
App limits you can't configure
The native apps give little control over event names, parameters, consent behaviour or which conversion action gets credit, and they don't cover TikTok or custom events like WhatsApp clicks.
Orders the browser never sees
Ad blockers, iOS restrictions and customers who close the tab before the thank-you page loads all mean missed purchases. Only a server-side feed from Shopify's order data catches those.
What I set up
My Shopify tracking setup
Customer Events pixel
Custom pixel subscribed to Shopify's standard checkout events
GA4 ecommerce mapping with item ID, variant, price and quantity
Order ID passed as transaction_id and event_id
Consent wired to Shopify's Customer Privacy settings
Clean-up of old theme and checkout scripts
Server-side tracking
Server GTM container on Stape or Google Cloud
Shopify order webhooks routed into sGTM (Stape app or direct)
Meta Conversions API with hashed email and phone
TikTok Events API purchase and checkout events
Custom tracking subdomain for first-party delivery
Ads platforms
Google Ads purchase conversion with value and order ID
Enhanced conversions using hashed customer data
Decision on keeping or trimming the native Google and Meta apps
Primary vs secondary conversion actions set correctly
Merchant Center feed and conversion linkage checked
QA and handover
Real test orders checked in GA4, Ads and Events Manager
Pixel vs CAPI deduplication verified
Order count and revenue compared against Shopify reports
Short Loom walkthrough and written event map
Event map
Events I track on Shopify
Event
When it fires
Sent to
view_item / ViewContent
Customer views a product page (product_viewed)
GA4, Meta Pixel + CAPI, TikTok
add_to_cart / AddToCart
Product added to cart, including cart drawer adds (product_added_to_cart)
Order completed (checkout_completed), backed up by order webhook
GA4, Google Ads, Meta CAPI, TikTok
refund
Refund issued in Shopify admin (webhook)
GA4
Process
How the setup works
01
Audit
I list every app, theme snippet and pixel that sends data, then compare a week of platform conversions against Shopify orders to see where the gaps and duplicates are.
02
Plan
We agree which native apps stay, which events go to which platform and what counts as a primary conversion, so nothing fires twice.
03
Build
I set up the Customer Events pixel, the server container and the order webhook feed, with the order ID tying browser and server events together.
04
Test with real orders
I place real or test-gateway orders across devices and check each one lands once in GA4, Google Ads and Meta with the right value.
05
Monitor
For two weeks after launch I compare platform numbers against Shopify orders and fix anything that drifts.
Checkout extensibility changed where Shopify tracking lives
On older Shopify stores you could paste a purchase tag into the order status page and be done. That option has been retired. Checkout and thank-you pages are now locked down, and the supported way to track them is Customer Events: a pixel that subscribes to events Shopify itself emits, like checkout_started and checkout_completed.
That is a good thing for reliability, but it means your tracking has to be rebuilt rather than copied. The pixel can't see your page's HTML, so all product and order data has to come from the event payload Shopify provides. I map that payload to GA4's ecommerce format and Meta's standard events, and keep the code short enough that the next person can read it.
Native apps vs a custom setup
The Google & YouTube and Facebook & Instagram apps are fine for a small store getting started. They send purchases, and the Facebook app can send server events too. The trade-off is control: you can't easily change parameters, add TikTok, respect a custom consent banner the way you want, or track things like WhatsApp clicks.
For stores spending seriously on ads, I usually keep the apps for what they do well (catalogue and Merchant Center sync) and move conversion tracking to a custom pixel plus server-side GTM. Either way, the key is that only one source sends each purchase to each platform.
Why order webhooks matter for server-side tracking
A browser pixel only fires if the customer's browser loads the page and nothing blocks it. Shopify's order webhooks fire when the order is created, whatever happened in the browser. Feeding those into a server GTM container, through the Stape Shopify app or a direct webhook, gives Meta CAPI and other platforms a purchase signal that doesn't depend on the thank-you page. Sharing the order ID with the browser event lets each platform deduplicate the two.
Deduplicated Pixel + Conversions API and GA4 enhanced ecommerce for a Shopify loungewear brand, recovering purchases lost to iOS restrictions and ad blockers.
Meta Pixel
Conversions API
GA4 Enhanced eCommerce
Read case study
FAQ
Shopify tracking FAQ
Can I still add tracking scripts to the Shopify thank-you page?
Not for long. Shopify has been retiring additional scripts on the thank-you and order status pages as part of checkout extensibility, Plus stores first and then all plans. Purchase tracking now belongs in a Customer Events custom pixel or an app that uses the same events, ideally with a server-side backup.
Can I use Google Tag Manager on Shopify?
Yes, for your storefront pages you can load GTM in the theme, and you can load it inside a custom pixel for checkout events. Inside the pixel it runs in a sandbox, so Preview mode and click triggers behave differently. I usually keep checkout logic in the pixel and use GTM mainly to route data.
Is the Facebook & Instagram app enough for Meta Conversions API?
It can send Pixel and server events and is a reasonable start. If you need control over parameters, consent handling, extra events or other platforms, a server GTM setup gives you that. Don't run both for the same purchase event, or Meta may count orders twice.
Why don't my GA4 purchases match Shopify orders?
Common causes are retired thank-you page scripts, a purchase event firing from two sources, consent blocking tags, and orders the browser never reported. Some gap is normal because of consent and blockers, but a large one usually means a setup problem I can find in an audit.
Do I need Shopify Plus for this?
No. Customer Events, custom pixels and order webhooks are available on standard Shopify plans. Plus adds checkout customisation options, but conversion tracking itself doesn't require it.
How long does a Shopify tracking setup take?
A typical setup with GA4, Google Ads and Meta CAPI takes a few working days including testing. Adding TikTok, server-side GTM on a custom domain or cleaning up a messy app setup can add a day or two.
What server-side tracking really is, how server-side GTM works, what it fixes and what it does not, and a checklist to decide if your business needs it.