← All resources Product In review at Shopify

Server-side tracking for Shopify with the Measurebase app

Shopify is where normal tagging setups quietly fall apart. The checkout is a locked environment where you can't place your own scripts, pixels run inside a sandbox that reports the wrong page URL, and by the time a payment provider has bounced the shopper around, the session and its attribution are often gone. The Measurebase Shopify app exists to close exactly those gaps: it connects your store to your own Measurebase tagging host and tracks the whole funnel server-side · storefront, checkout and the order itself.

In review at Shopify

The Measurebase app has been submitted to the Shopify App Store and is waiting for Shopify's approval, so it can't be installed from the App Store yet. This page describes the app as submitted. Want to know the moment it's live? Email info@measurebase.com.

Three surfaces, one stream

The app tracks your store from three places at once, and every one of them reports to the same tagging host with the same identifiers:

Every event the app sends

All events use GA4's standard names and shapes, so they work with your existing tags, audiences and reports without translation. Storefront events, from the theme embed:

EventFires when
view_itemA product page is viewed · with the selected variant's price
view_item_listA collection or search results page is viewed · items with list name and position
select_itemA product is clicked in a collection or search list · works across theme card layouts, including themes that don't wrap the card in a link
add_to_cartAny add to cart · quantity is the amount just added, never the running cart total
remove_from_cartAny cart removal or quantity decrease · computed by diffing the cart
view_cartThe cart page is viewed, with the full cart contents
searchA search results page is viewed · with search_term and search_results
Your custom eventsAnything published on Shopify's analytics bus · a quiz, a wishlist, an app's event · mirrored into the dataLayer under a name you choose

Checkout events, from the app pixel:

EventFires when
begin_checkoutThe checkout is opened
add_shipping_infoThe shipping step is completed
add_payment_infoThe payment step is completed
apply_discount_codeA discount code is applied · with the code and the discount amount
purchaseThe order is placed · event ID is the order ID, replays of the thank-you page are suppressed
nc_purchase / rc_purchaseOptional companions to the purchase for new and returning customers · never counted as a second conversion, only emitted when Shopify actually knows the segment

Server events, from order webhooks:

EventFires when
purchaseThe order is created · as the owning event or as a deduplicated copy, depending on the purchase mode you choose below
refundA refund is issued · classified full or partial by comparing the refunded amount against the order total, so a shipping-only refund never reverses the whole order
subscription_startedA subscription's first order is placed (opt-in)
subscription_renewedA recurring subscription order is billed (opt-in) · as an annotation event, or as a countable purchase if you want renewals in revenue

Every parameter, and why it's there

The e-commerce object

Every commerce event carries the full GA4 e-commerce object: currency, value, transaction_id, tax, shipping, coupon and order-level discount, plus an items array with item_id, item_name, item_brand, item_category, item_variant, price, quantity and per-item discount. The item ID source is configurable · product ID, variant ID, SKU or barcode · and the same choice applies on every surface, so your product feed matches from the first view_item to the server-side purchase. Money is always a clean number, never a formatted string and never floating-point noise.

Identity and matching

Events carry customer identifiers in Google's user-provided data schema, and only ever as SHA-256 hashes, on a server event only when the buyer granted consent · plain email, phone or address never enter the dataLayer and never leave the store:

Identity is seeded into the dataLayer before GTM loads, on the storefront and in checkout alike · so the Google Analytics tag's very first hit already carries the user ID and the match keys, instead of only the events that happen to fire after everything has settled. In checkout, hashes refresh on every step as the shopper fills in more fields, so advanced matching doesn't wait for the purchase.

Click IDs that reach the conversion

Google, Microsoft, Meta and TikTok click identifiers · gclid, gbraid, wbraid, msclkid, ttclid, plus the _fbp/_fbc cookies · are captured on the landing page, stamped onto the cart, and forwarded with checkout and server events. The iOS variants gbraid and wbraid matter most: they exist precisely for the visits where every other identifier has already been stripped, and most setups drop them entirely.

Context on every event

Bookkeeping that keeps the counts honest

One purchase, never two

With three surfaces able to see the same order, the thing that matters most is that your reports only ever count it once. The app gives every purchase one event ID · the order ID itself · across all three surfaces, and lets you choose who owns the purchase:

Reloaded thank-you pages, double-pasted pixels and replayed webhooks are all suppressed · defence in depth on every surface, not an assumption that nothing ever goes wrong.

Why this is such a strong setup

Each piece above is useful on its own; the strength is what they add up to. A few claims most Shopify tracking can't make, and why this setup can:

Built for your GTM setup, not around it

You keep your own web and server containers. The dashboard generates a ready-to-import GTM template in Shopify mode: every e-commerce field mapped explicitly (the checkout sandbox ignores the usual "read from dataLayer" shortcut), a user-provided-data variable wired to the hashed fields, and the real page URL mapped in so checkout events report the checkout page rather than Shopify's internal sandbox address.

Shopify Markets is handled per storefront: a shop with multiple domains tags each one through its own host, resolved automatically · one app, one pixel, every market first-party.

Anything your store publishes through Shopify's own analytics events · a quiz completing, a wishlist add, an app's custom event · can be mirrored into the dataLayer under a name you choose, from the app's Events tab. And Enhanced Ad Blocker Protection extends into the checkout: container traffic leaves masked there too.

Seeing what's happening

The app's Test tab shows every event that reached your tagging host in the last 30 minutes · which surface sent it, its value, its products item by item, and every parameter it carried, including traffic that left through the ad-blocker mask. A console debug mode and a server-preview header are one toggle away, and both switch themselves off automatically after 24 hours, so a debugging session can't silently degrade your production data. The Setup page continuously checks each piece · embed, pixel, webhooks · and tells you when something needs attention.

With or without a Measurebase account

The app works on its own: in standard mode it loads your web container from googletagmanager.com and pushes the same storefront events, without any Measurebase account. Connecting an account unlocks the first-party part: your own tagging domain per storefront, the checkout events from both pixels and the server-side purchase. A store with several Shopify Markets domains gets a tagging host per storefront, matched automatically.

Billing through Shopify

An account created from the app chooses and pays its plan in Shopify, with the same tiers and prices as on measurebase.com; the Plan row on the app's Setup tab opens the pricing page. An existing Measurebase customer who links a store keeps the billing they have.

Keep the checkout pixel always on

Since January 2026 Shopify's default data access for app pixels is "Optimized", which lets Shopify pause a pixel it judges not to be driving results, without telling anyone. Set it to Always on: Shopify admin → Settings → Customer events → Measurebase → data access. The Setup tab watches for it as well: when the storefront keeps sending events but nothing has arrived from the checkout pixel for 24 hours, it warns you, and a paused pixel shows "Data access paused" in that screen's activity log.

Cost prices for Profit Tracking

With the Profit Tracking power-up on for your domain, the app can send your products' unit costs to Measurebase every night, so every purchase event carries the profit next to the revenue and Google Ads and Meta can bid on it. It asks for Shopify's inventory permission the first time you switch it on.

Same-Origin Tracking and Shopify

Shopify's app proxy strips cookies in both directions, so a path on your storefront cannot carry tracking cookies and Same-Origin Tracking is not available on Shopify. Your tagging subdomain, set up with an A record, is the first-party route; on Safari that means Cookie Keeper's re-issued cookies are capped at 7 days there, as on every tagging subdomain.

Getting started

  1. Install the Measurebase app on your store once Shopify has approved it. Without an account it starts in standard mode straight away.
  2. Connect your Measurebase account from the Setup tab, or create one there, and pick the tagging domain for each storefront. New to Measurebase? The domain and its DNS record follow the server-side tagging setup guide; the checklist in the app does not block on them.
  3. Turn on the theme embed in your theme editor for storefront events, and set the checkout pixel to Always on.
  4. Import the generated GTM template from your dashboard (Shopify mode), or map the events into your existing containers.

The checkout pixel installs itself with the app, and order webhooks are registered automatically. From the first page view to the purchase and its refund, everything flows through your own domain · first-party, deduplicated and EU-hosted like everything else on Measurebase.

Continue reading

Ready to improve your tracking setup?

Start free, no credit card required. Live in about 15 minutes.

Start free