How to set up server-side tracking on Shopify

Set up Shopify server-side tracking step by step: what Shopify's apps already send, Meta CAPI, Google, server-side GTM costs, deduplication and testing.

Sailesh B
Sailesh B · Founder, Prism
· 9 min read

Key takeaways

  • Start with what Shopify's free Meta and Google apps already send.
  • Pay for a tracking app or server-side GTM only to fill gaps: more platforms, better match rates, or a record of what was sent.
  • Send one shared event ID from browser and server so each purchase is counted once.
On this page
  1. Step 1: Check what you already send
  2. Step 2: Pick a route
  3. Step 3: Set up Meta
  4. Step 4: Set up Google
  5. Step 5: Stop double counting
  6. Step 6: Improve match quality
  7. Step 7: Respect consent
  8. Step 8: Test and monitor
  9. Where Prism fits
  10. Quick answers

Start with what Shopify already gives you for free, then add a tool only for the gaps that are left. Shopify's Facebook & Instagram app can send purchases to Meta's Conversions API, its Google & YouTube app sets up Google tags and enhanced conversions, and many stores already have half a server-side setup without knowing it. The paid routes (a tracking app, server-side Google Tag Manager, or an attribution app that sends conversions) earn their cost when you need more platforms, better match rates or a record of what was sent.

This guide walks through the setup in order: check what's running, pick a route, set up Meta and Google, avoid double counting, improve matching, respect consent, and test. Facts were checked against Shopify, Meta and Google documentation on 7 November 2026.

If you just want the definition first, see what server-side tracking is.

Step 1: Check what you already send

Before adding anything, find out what's live. Two tools sending the same purchase without a shared ID is the most common way server-side tracking makes numbers worse.

  1. Customer events. In Shopify admin, open Settings → Customer events. It lists app pixels (installed by apps) and custom pixels (code added by a developer) (Shopify Help). Note every pixel that sends to Meta, Google, TikTok or Pinterest.
  2. Meta data-sharing level. In the Facebook & Instagram app, check the data-sharing setting. Standard uses the browser pixel only; Enhanced and Maximum add the Conversions API (Shopify Help). Older installs may show different names; one store we work with showed "Conservative" for the pixel-only level.
  3. Meta Events Manager. Open your dataset and look at how each event arrives: browser, server, or both. Server events can come from Shopify, a tracking app, or Meta's own one-click "Conversions API with Meta" if someone turned it on in Events Manager (Meta).
  4. Google & YouTube app. Check which conversion actions it set up (it suggests purchase, add to cart and checkout started) and whether enhanced conversions are on (Google Ads Help).
  5. Old scripts. Tracking code in checkout.liquid or the "additional scripts" box stopped running on the Thank you and Order status pages on 28 August 2025, and script tags on those pages stopped on 26 August 2026 for non-Plus stores (Shopify). If a purchase pixel lived there, it has stopped.

Since 13 January 2026, Shopify turns on automatic data sharing optimization for marketing pixels, which pauses a pixel that shows no signals for days or weeks (Shopify changelog). For a pixel you rely on, set it to "always on" in Settings → Customer events.

Step 2: Pick a route

There are five common ways to get server-side events out of Shopify. Most stores combine two.

RouteWhat it coversCostEffort
Shopify's own ad appsMeta purchases at Enhanced or Maximum; other ad apps varyFreeLow
Meta's own optionsConversions API with Meta (one click in Events Manager) or the Conversions API Gateway in your cloudFree, or your cloud bill for the GatewayLow to medium
Server-side Google Tag ManagerAny platform you can build a tag forGoogle suggests 2+ servers at about $45 a month each; hosts like Stape start freeHigh
Server-side tracking appMany destinations, managed for youFree tiers for very small stores, then about $145 to $300 a monthLow
Attribution app that sends conversionsIts supported platforms, plus channel attributionVariesLow

Shopify's own apps are where to start. They cost nothing and Shopify maintains them. The limit is control: there's little to inspect when numbers look off, and coverage beyond purchases varies by app.

Meta's own options. "Conversions API with Meta" is set up from Events Manager in one click, with no code or setup fees (Meta). The Conversions API Gateway runs in a cloud account you own, on AWS or Google Cloud; Meta charges nothing, but you pay the cloud bill (Meta). Both cover Meta only.

Server-side Google Tag Manager (sGTM) gives you the most control. Google recommends running at least two server instances on Cloud Run, at about $45 a month each (Google). Managed hosts lower that: Stape is free up to 10,000 requests and its Pro plan is $17 a month billed annually (Stape). The real cost is skill. Someone has to build and maintain the tags, the data layer and the deduplication.

Server-side tracking apps such as Elevar, Littledata, TrackBee and Analyzify do the sGTM work for you and send to many platforms, including GA4 and Klaviyo. We compare 12 options by price, destinations and setup effort in the best server-side tracking apps for Shopify.

Attribution apps that send conversions are worth a look if you also need to know which channel earned each order. Check which platforms they send to; most cover fewer destinations than a dedicated tracking app.

Step 3: Set up Meta

  1. Choose your sender. Pick one server-side sender for Meta purchases: Shopify's app at Enhanced or Maximum, Meta's own option, sGTM, or an app. If you add a second, it must share the event ID (Step 5).
  2. Set the data-sharing level. For Shopify's app, choose Enhanced or Maximum. Maximum also uses "Facebook's latest advertising technology", per Shopify.
  3. Re-select the pixel after any change. On a store we work with, switching data sharing off stopped the browser pixel as well as the Conversions API, not just the server events. Turning it back on didn't bring the pixel back until the dataset was selected again in the app's settings. After any change, check Test events in Events Manager.
  4. Keep the pixel. Meta recommends sending the same events through both the pixel and the Conversions API, which it calls a redundant setup (Meta). The browser sees things the server can't, like the fbclid in the landing URL.

Step 4: Set up Google

Google's side works differently. The Google & YouTube app installs Google tags and suggests purchase, add-to-cart and checkout-started conversion actions (Google Ads Help). Then:

  1. Turn on enhanced conversions. They send hashed (SHA-256) email, phone, name or address with each conversion, so Google can match a sale when the cookie is gone (Google Ads Help). Set up through the Google & YouTube app, this runs in the browser tag rather than on a server, but it closes much of the same gap.
  2. Use a transaction ID. Send the Shopify order ID as the transaction ID so Google can drop duplicate conversions (Google Ads Help).
  3. For true server-side sending, use sGTM, a tracking app, or a tool that uses Google's Data Manager API, Google's route for sending first-party data from a server (Google).
  4. For GA4, the Measurement Protocol sends events from a server, but Google says it's meant to add to the browser tag, not replace it (Google).

Google tag gateway, which serves the Google tag from your own domain, is a separate thing (Google). It makes the browser tag harder to block, but the events still come from the browser.

Step 5: Stop double counting

Meta treats a browser event and a server event as the same purchase only when both have the same event_name and event_id and arrive within 48 hours (Meta). Meta also describes a fallback that matches on fbp or external_id, but it only works when the browser event arrives first, so a shared event_id is the method to rely on.

That's where a useful Shopify detail comes in. When we tested this, Shopify's own Meta pixel used Shopify's customer-event ID as Meta's event_id: the checkout_completed event's ID matched the purchase's event ID in Meta's request character for character. In our testing, Shopify also gave that same ID to every pixel on the store, so a server sender that reads the checkout_completed event can reuse it and Meta should keep one purchase instead of two.

Google deduplicates on the transaction ID within a conversion action. If two tools both send purchases to the same action with the Shopify order ID, Google keeps one. If they send to different actions, or without the ID, you'll count twice.

The rule for both: one ID per purchase, shared by every sender.

Step 6: Improve match quality

Sending an event isn't the same as Meta matching it to an ad. Meta scores this as Event Match Quality (EMQ), out of 10, in Events Manager (Meta). To raise it:

  • send hashed email and phone on every purchase, plus name and address where you have them;
  • include the fbp (browser ID) and fbc (click ID) cookies, and the shopper's IP address and user agent;
  • capture fbc when the shopper first lands, because the click ID is in that first URL and may be gone by checkout;
  • format phone numbers with the country code before hashing.

On the Shopify store we send Meta purchases for, purchases score around 9 when most orders carry email, phone and fbp. Add-to-cart and checkout events usually score lower, because the shopper often hasn't given an email yet.

In markets that need consent (usually the EEA and UK), Shopify only runs pixels after the visitor grants the permissions that pixel needs, and new pixels need marketing and analytics permission by default (Shopify Help). Server events need the same care. A server can send what the browser couldn't, but that's not a reason to send what the shopper declined. Make sure your sender checks the consent Shopify recorded before sending.

Step 8: Test and monitor

  • Test events. Use Meta's Test events tool and Google Ads' conversion diagnostics to see events arrive.
  • Check the source mix. In Events Manager, purchases should show both browser and server, with deduplication working.
  • Watch EMQ for two weeks. A drop usually means a missing field or a pixel that stopped.
  • Expect platform numbers to rise. Meta and Google should report more purchases. Shopify's own order count won't change, because server-side tracking changes what the platforms see, not how many people buy.

What it won't do: tell you which channel earned the sale. Each platform still credits itself, so sending Meta more purchases makes Meta's number bigger without making it agree with Google's. That's an attribution job, covered in why ad platforms miss your Shopify sales.

Where Prism fits

Prism is our attribution app for Shopify, and it also does server-side tracking for Meta and Google Ads:

  • it sends purchases to Meta's Conversions API using Shopify's own event ID, so Meta keeps one copy, and can add add-to-cart and checkout events;
  • it sends purchases to Google Ads through the Data Manager API with the order ID as the transaction ID, and updates the value after refunds and cancellations;
  • it logs what was sent, accepted and skipped for every order, and charts Meta's EMQ daily.

It doesn't send to GA4, TikTok, Pinterest or Klaviyo. Plans start at $29 a month with a 14-day free trial (pricing).

Quick answers

Does Shopify have built-in server-side tracking?

Partly. The Facebook & Instagram app adds Meta's Conversions API at the Enhanced and Maximum data-sharing levels, and other ad apps have their own settings. There's no single switch for every platform.

Is server-side GTM worth it for a small store?

Usually not at first. It's free for very low volume with a managed host, then about $17 a month, and much more in setup time. Start with Shopify's apps and move to sGTM or an app when you need more platforms or control.

Do I still need the Meta pixel?

Yes. Meta recommends running the pixel and the Conversions API together, with a shared event ID.

Why did my Meta purchases double after adding server-side tracking?

Two senders are sending the same purchase without the same event_id. Turn one off, or make them share Shopify's event ID.

Will server-side tracking get around ad blockers and consent?

It gets around ad blockers, not consent. If a shopper declines tracking, your server should respect that too.