To get accurate ecommerce purchase data into GA4 from Shopify in 2026, install Google Tag Manager through a Shopify Custom Pixel (Settings, Customer Events), subscribe to Shopify's standard events such as checkout_completed, and forward them to GA4 as recommended ecommerce events like purchase. The old method of pasting GA4 or GTM snippets into Additional Scripts or checkout.liquid no longer works, because Shopify has retired those boxes in favour of the sandboxed Web Pixels API. Done correctly, this is the only setup that reliably captures purchases, revenue and the full funnel.
We are Enderon, an Auckland web development and ecommerce CRO agency, and tracking is the part of this work we are known for. We have deployed 167 plus tracking containers and reconciled GA4 against more than 4.95 million dollars of tracked ad spend, so the failure modes below are ones we see on real stores every month.
01Why did my old GA4 Shopify tracking stop working?
It stopped working because Shopify deprecated the places your old code lived. Shopify made checkout.liquid unsupported for the Information, Shipping and Payment steps on 13 August 2024, then began sunsetting checkout.liquid, Additional Scripts and script tags for the Thank you and Order status pages. The Plus deadline was 28 August 2025; non-Plus stores have until 26 August 2026 (Shopify Help Center, 2025 to 2026). When that deadline passes Shopify auto-upgrades the store and removes the legacy code, so any GA4 or GTM snippet pasted into Additional Scripts simply stops firing, usually with no warning (Digital Position, 2025).
Purchase tracking is the first thing to break, because the purchase event historically fired on the Order status page. If your GA4 revenue went flat or dropped to near zero recently, this migration is the first thing to check.
02What is the correct way to track ecommerce in GA4 on Shopify in 2026?
The correct way is a Custom Pixel using Shopify's Customer Events (Web Pixels API). Shopify now routes all third-party tracking through this API, which runs your code in a sandboxed environment rather than directly on the page (Shopify Help Center, 2026). You write a small pixel that subscribes to Shopify's standard events and either pushes them to a GTM container loaded inside the pixel, or sends them straight to GA4 via the Measurement Protocol or gtag.
Shopify emits a consistent set of standard events you can subscribe to, including page_viewed, product_viewed, product_added_to_cart, product_removed_from_cart, cart_viewed, collection_viewed, search_submitted, checkout_started, payment_info_submitted and checkout_completed (Shopify Help Center, 2026). Your job is to translate those into GA4's ecommerce vocabulary.
Which GA4 events should map to which Shopify events?
Map them one to one against GA4's recommended ecommerce events (Google Analytics 4 Help, 2025):
product_viewedmaps to GA4view_itemcollection_viewedmaps to GA4view_item_listproduct_added_to_cartmaps to GA4add_to_cartcheckout_startedmaps to GA4begin_checkoutpayment_info_submittedmaps to GA4add_payment_infocheckout_completedmaps to GA4purchase
Each GA4 event needs the right parameters: currency, value, transaction_id (for purchase), and a properly structured items array with item_id, item_name, price and quantity. GA4 will not attribute revenue correctly without currency and value together, and it deduplicates purchases by transaction_id, so always send the Shopify order ID there (Simo Ahava, 2025).
03How do I set it up step by step?
Follow these steps. This assumes you already have a GTM container and a GA4 property.
- In GTM, open Admin, then Install Google Tag Manager, and copy the head snippet. Remove the surrounding
<script>and<noscript>HTML tags so you are left with raw JavaScript, because the pixel sandbox does not accept HTML (Analytics Mania, 2025). - In Shopify admin go to Settings, Customer Events, then Add custom pixel. Name it (for example "GTM"), set the permission and data sale settings, then paste the cleaned GTM loader code.
- Below the loader, subscribe to Shopify's standard events and push a clean object into the dataLayer for each. For example, subscribe to
analytics.subscribe("checkout_completed", ...)and build a GA4purchasepayload from the event'scheckoutobject (order id, total price, currency, line items). - Repeat for
product_viewed,product_added_to_cart,checkout_startedand the others you want, mapping each to its GA4 event and parameters. - Save the pixel and click Connect so it goes live.
- In GTM, create a GA4 Configuration (Google tag) and GA4 Event tags triggered by your custom dataLayer events, with the ecommerce parameters mapped from the dataLayer.
- In your GA4 property, turn off the Enhanced Measurement "Page changes based on browser history events" option if you see duplicated or odd sandbox page paths, and confirm your storefront page_view is handled in one place only (Shopify Help Center, 2026).
- Publish the GTM container and verify (see verification below).
The same pixel covers storefront pages outside checkout (home, product, collection, cart), since Customer Events fire across the whole journey. There is no longer any reason to split storefront tracking from checkout tracking the way checkout.liquid forced you to.
04How do I verify the GA4 purchase event is firing correctly?
Verify in GA4 DebugView, not GTM Preview. This is the single most common point of confusion. Because the pixel runs in a sandbox with its own isolated dataLayer, GTM Preview mode and the GA4 Chrome debugger extension cannot see events pushed inside the pixel (Analytics Mania, 2025). Set debug_mode: true on your GA4 tags (or use your pixel's debug toggle), place a real or test order, and watch the event stream in GA4 DebugView. Confirm that purchase arrives once, with the correct transaction_id, value, currency and populated items array.
Then check, after 24 to 48 hours, that GA4's Monetisation reports show revenue within a few percent of Shopify's own order totals. We treat anything outside roughly two percent variance as a defect worth chasing, and we hold our own installs to 98 percent reconciliation against the source of truth.
05Common mistakes: why your GA4 purchase numbers are wrong
These are the failure modes we see most often when a store says its GA4 revenue does not match Shopify.
- You never migrated off Additional Scripts. The old snippet stopped firing at the checkout extensibility deadline, so purchases simply vanished. This is the number one cause of a sudden revenue drop to near zero.
- Double counting from two purchase tags. A leftover GA4 tag plus a new pixel, or both a Shopify native Google channel and a custom pixel, can fire
purchasetwice. GA4 deduplicates bytransaction_id, so if you do not send a consistent order id you will inflate revenue. - Trusting GTM Preview. Preview mode bypasses the sandbox and shows nothing, leading people to assume tracking is broken when it is actually working, or worse, to "fix" something that was fine. Always confirm in DebugView.
- Missing
currencyandvalue. GA4 silently drops revenue attribution if either is absent, so the event shows up but reports no money. - Thin or missing
itemsarray. Without item-level data you lose product performance reporting, even though top-line revenue may look right. - Consent state not carrying through. Shopify's consent signal does not always survive the storefront to checkout transition, so Consent Mode can flip and quietly suppress tags (Shopify Help Center, 2026; Simo Ahava, 2025). If numbers look low rather than zero, check this.
If any of this sounds like your store, a structured GA4 tracking audit will isolate exactly where the data is leaking before you rebuild anything.
06Next step
If your GA4 revenue does not match Shopify, or you are staring down a checkout extensibility deadline and are not sure what will break, that is exactly the kind of problem we fix every week. Our free conversion audit includes a tracking sanity check, so you will know whether your purchase data can be trusted before you make a single decision off it.
Not sure where your revenue is leaking?
Our free conversion audit surfaces the few specific places between the visit and the order where your site is losing buyers, and what to fix first.
Get a free conversion auditFrequently asked questions
Either works. A Custom Pixel can call gtag and send events to GA4 without GTM. We usually keep GTM in the pixel because it centralises tag logic, consent handling and multi-destination tracking (GA4 plus Meta plus Google Ads), and gives you one place to maintain the ecommerce mapping.
Partly. The native Google channel installs GA4 and basic ecommerce events automatically, which is fine for simple stores. The trade-offs are limited control over event structure and consent, and a real risk of double counting if you also run a custom pixel. For stores that depend on accurate revenue we build the custom pixel so we control every event.
No. The Customer Events / Web Pixels API is the destination Shopify migrated everyone to, so building on it now keeps you on the supported path past both the 28 August 2025 Plus deadline and the 26 August 2026 non-Plus deadline. Server-side tracking via a server GTM container is the next step up for resilience, but it is not required for accurate GA4 ecommerce data.
DebugView confirms the event fires immediately. For reporting, give GA4 24 to 48 hours, then reconcile against Shopify order totals. Within a couple of percent across a full week means the setup is sound.
Sources
- Shopify Help Center, Create a Google Tag Manager custom pixel (2026): https://help.shopify.com/en/manual/promoting-marketing/pixels/custom-pixels/gtm-tutorial
- Shopify Help Center, Non-Plus upgrading your Thank you and Order status pages (2026): https://help.shopify.com/en/manual/checkout-settings/customize-checkout-configurations/upgrade-thank-you-order-status/upgrade-guide
- Shopify Help Center, Plus upgrading your Thank you and Order status pages (2025): https://help.shopify.com/en/manual/checkout-settings/customize-checkout-configurations/upgrade-thank-you-order-status/plus-upgrade-guide
- Google Analytics 4 Help, Measure ecommerce and recommended events (2025): https://support.google.com/analytics/answer/9268036
- Simo Ahava, Google Analytics 4 Ecommerce Guide for Google Tag Manager (2025): https://www.simoahava.com/analytics/google-analytics-4-ecommerce-guide-google-tag-manager/
- Analytics Mania, Install Google Tag Manager and GA4 on Shopify via Custom Pixel (2025): https://www.analyticsmania.com/post/install-google-tag-manager-and-ga4-on-shopify/
- Digital Position, Shopify Checkout Extensibility deadline (2025): https://www.digitalposition.com/resources/blog/ppc/shopify-checkout-extensibility-deadline-august-28-2025-is-coming-heres-how-to-not-screw-it-up/


