You track conversions on Shopify by combining Shopify's native ad channels (the Google & YouTube app and the Meta channel) with GTM served through a custom theme and the Customer Events sandbox, then adding server-side tracking for durable purchase data. This gives you clean events on product, cart, checkout, and thank-you pages, with deduplicated purchase events that carry value, currency, and order id.
Shopify is a hosted e-commerce platform. Its checkout runs on Shopify-controlled domains and templates, which is why tracking behaves differently from a self-hosted store. This guide covers each method, the shift from editing checkout.liquid to the Customer Events (Web Pixels) API, server-side options, and how to avoid the failures that make Shopify numbers wrong. Get the plumbing right and every dirham of ad spend is attributed to the right channel.
What are the ways to track conversions on Shopify?
There are four practical layers. Most UAE stores use two or three together.
-
Native Google & YouTube app. Shopify's official app connects your store to Google Ads and GA4. It installs the Google tag, sends purchase conversions, and syncs your product feed to Google Merchant Center. Fastest path to Google Ads tracking.
-
Meta channel and pixel. The Facebook & Instagram (Meta) sales channel installs the Meta pixel and can enable the Conversions API, tracking view content, add to cart, initiate checkout, and purchase.
-
GTM via custom theme plus Customer Events. Google Tag Manager (GTM) is a container that fires tags based on rules. You add the GTM snippet to your theme for storefront pages, plus a Customer Events web pixel to reach checkout and the thank-you page. The flexible route for full control over the data layer.
-
Server-side tracking. Shopify sends purchase data straight to Meta (Conversions API) and GA4 (Measurement Protocol) from a server, not the browser. This survives ad blockers, Safari ITP, and browser crashes.
If you run Shopify marketing in Dubai with real budget behind it, treat layers 1 and 2 as the baseline and add 3 and 4 as spend grows.
Why did Shopify checkout historically block GTM?
Shopify's checkout pages have always run on Shopify's own infrastructure, not your theme. On the old model, only Shopify Plus merchants could edit checkout.liquid, and everyone else could not inject scripts into checkout at all. So a GTM container placed in your theme fired on product and cart pages but went silent the moment a shopper entered checkout. Purchase events were the casualty, since the purchase happens on the Shopify-hosted thank-you page.
Merchants worked around this with the Additional Scripts box on the order status page. That box was fragile: it ran only on the final status page, broke with one-page checkout, and Shopify announced it would be removed.
How does Customer Events (the Web Pixels API) solve it?
Customer Events is Shopify's supported system for running tracking code across the storefront and checkout. You register a web pixel that runs in an isolated sandbox. Shopify emits standard events (page_viewed, product_viewed, product_added_to_cart, checkout_started, checkout_completed) and your pixel subscribes to them. Because Shopify controls the sandbox, your code reaches checkout and the thank-you page without touching checkout.liquid.
This is the current, correct approach. The move from editing checkout.liquid to the Web Pixels API is the single biggest change in Shopify tracking. Shopify has been deprecating checkout.liquid and pushing merchants toward checkout extensibility, where checkout is built from apps and Customer Events rather than raw Liquid edits. If your setup still relies on checkout.liquid or Additional Scripts, it is on borrowed time and should be migrated.
Add a Customer Events pixel under Settings, Customer events, Add custom pixel. This minimal pixel reads a completed checkout and pushes a purchase event to the GTM data layer.
// Customer Events custom pixel (runs in the sandbox)
analytics.subscribe("checkout_completed", (event) => {
const checkout = event.data.checkout;
const order = checkout.order;
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
event: "purchase",
transaction_id: order ? order.id : checkout.token, // order id for dedup
value: checkout.totalPrice.amount,
currency: checkout.currencyCode, // "AED"
items: checkout.lineItems.map((li) => ({
item_id: li.variant.product.id,
item_name: li.title,
quantity: li.quantity,
price: li.variant.price.amount
}))
});
The sandbox is isolated, so a GTM container loaded inside a Customer Events pixel does not share the same window as your theme. Many teams run one GTM container in the theme for storefront events and a second, checkout-scoped setup inside the pixel.
How do you set up GA4 on Shopify?
GA4 (Google Analytics 4) is Google's analytics platform built on events. Two clean paths:
- Native path. Install the Google & YouTube app and connect your GA4 property. Shopify handles the tag and sends e-commerce events. Least effort, less control.
- GTM path. Load GTM in your theme, add a Customer Events pixel for checkout, and configure GA4 event tags that read the data layer. Full control over event names, parameters, and consent.
Do not run both the native GA4 connection and a manual GTM GA4 tag for the same events. That is the classic cause of doubled sessions and purchases. Pick one owner per event.
How do you set up Google Ads conversion tracking on Shopify?
The native Google & YouTube app is the shortest route. It installs the Google tag, reports purchases to Google Ads automatically, and links Merchant Center for Shopping and Performance Max.
For more control, import GA4 conversions into Google Ads, or fire the Google Ads conversion tag from GTM using the purchase event from your Customer Events pixel. Either way, send only one purchase conversion per order. A store running e-commerce PPC in Dubai lives or dies on this number being clean.
How do you set up the Meta pixel and Conversions API on Shopify?
Install the Facebook & Instagram sales channel, connect your Meta Business account, and select your pixel. The channel installs the pixel and, when enabled, the Conversions API (CAPI), Meta's server-side channel that sends events from Shopify's servers directly to Meta.
Run browser pixel and CAPI together. The pixel captures browser signals, CAPI captures the reliable server signal, and Meta merges them. Correct Meta ads tracking in Dubai needs both sides firing with a shared event id so Meta can deduplicate.
What are the server-side options?
Server-side tracking sends conversions from a server instead of the shopper's browser. It is more resilient and less exposed to ad blockers and browser tracking limits.
- Meta Conversions API. Enabled through the Meta channel, or built custom against Shopify order webhooks. Send
event_id,value,currency, and hashed customer data. - GA4 Measurement Protocol. GA4's server-side API. Send a
purchaseevent with themeasurement_id, anapi_secret, a matchingclient_id, and the sametransaction_idused on the web. Theclient_idmatch stitches the server hit to the browser session. - Google Ads. Enhanced Conversions or the Google Ads API can send conversions server-side with hashed identifiers.
Server-side is not a replacement for browser tags. It is a second, sturdier reporting path for the same events. The deduplication keys below let both paths coexist without inflating numbers.
How does purchase deduplication work?
Deduplication stops one order being counted twice when the browser and server both report it. Each platform has its own key.
- Meta. Send the same
event_idon both the pixel and CAPI events. Meta drops the duplicate. Use the Shopify order id. - GA4. Send the same
transaction_id(the order id) on every purchase hit. GA4 keeps one transaction per id. - Google Ads. Use the order id as the conversion transaction id so an imported and a tag-fired conversion are not both counted.
The rule across all platforms: the Shopify order id is your deduplication key. Attach it to every purchase event, browser or server.
How do you pass value, currency, and order id correctly?
For UAE stores, currency is AED and value is the order total as a plain number.
window.dataLayer.push({
event: "purchase",
transaction_id: "6821048320123", // Shopify order id, the dedup key
value: 349.00, // number, not "AED 349.00"
currency: "AED", // ISO code
tax: 0,
shipping: 25.00,
items: [ /* line items with item_id, price, quantity */ ]
});
Three rules keep the money accurate:
-
Value is a number. Never send
"AED 349"or a string with a symbol. Send349.00. -
Currency is the ISO code
AED. If you also sell in USD or SAR, readcheckout.currencyCodedynamically, never hardcode it. -
Decide gross or net once. Pick whether value includes tax and shipping, then apply that choice on every platform so ROAS reconciles.
If your Shopify build itself needs work before tracking can sit on top of it, that is an e-commerce development job first.
How do you test Shopify conversion tracking?
Test before you trust a single report. Run every check on a real end-to-end order.
- Customer Events preview. Place a test order and watch events fire. Shopify's Bogus Gateway lets you complete checkout without real payment.
- GA4 DebugView. Confirm one
purchasewith the righttransaction_id,value, and currencyAED. - Meta Events Manager, Test Events. Confirm the pixel and CAPI purchase both arrive and show as deduplicated, not doubled.
- Google Tag Assistant. Confirm the Google Ads conversion and GA4 tags fire once each.
- Reconcile. Compare a day of Shopify orders against each platform. Counts should line up within a small margin.
A performance marketing program should treat this reconciliation as a monthly habit, not a one-time setup.
What are the most common Shopify tracking failures?
These four account for most broken Shopify setups.
- Double purchase counting. The native channel and a GTM tag both fire purchase, or a pixel and CAPI event lack a shared
event_id. Fix with one owner per event and the order id for dedup. - Thank-you page not firing. Old setups relied on the order status page script, which one-page checkout and checkout extensibility broke. Move purchase tracking into a Customer Events pixel on
checkout_completed. - One-page checkout skipping steps. Shopify's newer checkout can collapse the flow, so
checkout_startedfires differently than expected. Subscribe to Shopify's standard events rather than guessing at URLs. - Wrong or missing currency and value. A hardcoded currency, a string value, or a zero value all corrupt ROAS. Read
totalPrice.amountandcurrencyCodefrom the event.
Frequently Asked Questions
Do I still need to edit checkout.liquid to track Shopify purchases?
No. Editing checkout.liquid is deprecated and Shopify is removing it as part of checkout extensibility. Purchase tracking now belongs in a Customer Events web pixel that subscribes to checkout_completed, which runs in Shopify's sandbox and reaches the thank-you page without any Liquid edits. If your store still depends on checkout.liquid or the Additional Scripts box, migrate it before Shopify forces the change.
Why is Shopify counting my purchases twice?
Double counting comes from two systems reporting the same order, such as a native Google or Meta channel firing purchase while a GTM tag also fires it, or a pixel and CAPI event that do not share an event_id. Fix it by giving each event one owner and attaching the Shopify order id as the deduplication key: transaction_id in GA4, event_id in Meta, and the conversion transaction id in Google Ads.
Can I use Google Tag Manager on Shopify checkout?
Yes, through Customer Events. You cannot inject a raw GTM snippet into checkout pages, but you can fire tags from a Customer Events custom pixel that runs in Shopify's sandbox and subscribes to Shopify events. Note the sandbox is isolated from your theme, so a checkout container does not share window with your storefront container.
How do I send AED value and currency to my ad platforms?
Read the total and currency from the checkout event, do not hardcode them. Send value as a plain number like 349.00 with no symbol, and currency as the ISO code AED. If you sell in more than one currency, pull currencyCode from the event. Decide once whether value includes tax and shipping, then apply that rule everywhere so ROAS reconciles.
What is the difference between the Meta pixel and the Conversions API?
The Meta pixel is browser-side tracking that runs in the shopper's browser. The Conversions API (CAPI) is server-side tracking that sends the same events from Shopify's servers directly to Meta. The pixel can be blocked by ad blockers and browser privacy limits while CAPI is not, so running both gives Meta the most complete signal. Send a shared event_id on both so Meta deduplicates.
How do I test that my Shopify tracking actually works?
Place a real end-to-end test order using Shopify's Bogus Gateway so you reach the thank-you page. Verify GA4 DebugView shows one purchase with the correct transaction_id, value, and currency AED, and Meta Events Manager Test Events shows the pixel and CAPI purchase deduplicated. Use Google Tag Assistant to confirm tags fire once each, then reconcile a day of orders against each platform.
Which Shopify tracking method should a UAE store start with?
Start with the native Google & YouTube app and the Meta sales channel, since they deliver Google Ads, GA4, and Meta pixel plus Conversions API with the least setup. As budget grows and you need more control over events and consent, add GTM through your theme with a Customer Events pixel, then server-side tracking via CAPI and GA4 Measurement Protocol.
Related
Sources & References
Official references used in this article.
Frequently Asked Questions
Q. Do I still need to edit checkout.liquid to track Shopify purchases?
No. Editing checkout.liquid is the deprecated approach and Shopify is removing it as part of checkout extensibility. Purchase tracking now belongs in a Customer Events web pixel that subscribes to checkout_completed, which runs in Shopify's sandbox and reaches the checkout and thank-you page without any Liquid edits. Migrate any store still relying on checkout.liquid or Additional Scripts.
Q. Why is Shopify counting my purchases twice?
Double counting comes from two systems reporting the same order, such as a native channel and a GTM tag both firing purchase, or a Meta pixel and Conversions API event without a shared event_id. Give each event one owner and attach the Shopify order id as the deduplication key: transaction_id in GA4, event_id in Meta, and the conversion transaction id in Google Ads.
Q. Can I use Google Tag Manager on Shopify checkout?
Yes, through Customer Events. You cannot inject a raw GTM snippet into checkout pages, but you can fire tags from a Customer Events custom pixel that runs in Shopify's sandbox and subscribes to Shopify events. Note the sandbox is isolated from your theme, so a checkout container does not share window with your storefront container.
Q. How do I send AED value and currency to my ad platforms?
Read the total and currency from the checkout event instead of hardcoding them. Send value as a plain number like 349.00 with no symbol, and currency as the ISO code AED. If you sell in more than one currency, pull currencyCode from the event. Decide once whether value includes tax and shipping, then apply that rule everywhere so ROAS reconciles.
Q. What is the difference between the Meta pixel and the Conversions API?
The Meta pixel is browser-side tracking that runs in the shopper's browser, while the Conversions API sends the same events from Shopify's servers directly to Meta. The pixel can be blocked by ad blockers and browser privacy limits, but CAPI is not, so running both gives Meta the most complete signal. Send a shared event_id on both so Meta deduplicates.
Q. How do I test that my Shopify tracking actually works?
Place a real end-to-end test order using Shopify's Bogus Gateway so you reach the thank-you page. Verify GA4 DebugView shows one purchase with the correct transaction_id, value, and AED currency, and confirm Meta Events Manager Test Events shows the pixel and CAPI purchase deduplicated. Use Google Tag Assistant to check tags fire once each, then reconcile a day of orders against each platform.
Want a complimentary audit of your Google Ads or Meta Ads account?
30-minute call. We review your account, point out the 3 biggest leaks, and tell you exactly what to fix, whether you hire us or not.
Google Partner · UAE & KSA · Arabic + English