
13 June 2026
CRO-Focused Web Development: Why How You Build Affects How You Convert
Read insight ->
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.
product_viewed, product_added_to_cart, checkout_completed) that you map to GA4 recommended events (view_item, add_to_cart, purchase).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.
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.
Map them one to one against GA4's recommended ecommerce events (Google Analytics 4 Help, 2025):
product_viewed maps to GA4 view_itemcollection_viewed maps to GA4 view_item_listproduct_added_to_cart maps to GA4 add_to_cartcheckout_started maps to GA4 begin_checkoutpayment_info_submitted maps to GA4 add_payment_infocheckout_completed maps to GA4 purchaseEach 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).
Follow these steps. This assumes you already have a GTM container and a GA4 property.
<script> and <noscript> HTML tags so you are left with raw JavaScript, because the pixel sandbox does not accept HTML (Analytics Mania, 2025).analytics.subscribe("checkout_completed", ...) and build a GA4 purchase payload from the event's checkout object (order id, total price, currency, line items).product_viewed, product_added_to_cart, checkout_started and the others you want, mapping each to its GA4 event and parameters.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.
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.
These are the failure modes we see most often when a store says its GA4 revenue does not match Shopify.
purchase twice. GA4 deduplicates by transaction_id, so if you do not send a consistent order id you will inflate revenue.currency and value. GA4 silently drops revenue attribution if either is absent, so the event shows up but reports no money.items array. Without item-level data you lose product performance reporting, even though top-line revenue may look right.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.
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.
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.
Related posts