Server-side tracking for Shopify
Connect your store and ROASaurus registers the order webhooks, captures every ad click on your storefront and sends each paid order to your ad platforms from the server.
| Shopify at a glance | |
|---|---|
| Install | Shopify app install from Add a store › Shopify |
| Storefront | Theme app embed: click ids, visitor id on the cart, page views, product views, adds to cart |
| Checkout | ROASaurus web pixel; optional custom pixel for browser pixels, Google Ads and Klaviyo |
| Purchases | Sent from the orders/paid webhook, or on order creation for COD and external checkouts |
| Order matching | Cart attributes, cart and checkout tokens, and the checkout pixel |
| Consent | Reads Shopify's customer privacy settings |
How Shopify connects
Go to Add a store › Shopify, enter your .myshopify.com domain, click Install app and approve it. ROASaurus registers the order webhooks and its checkout pixel. Then switch on the ROASaurus app embed in the theme editor. It loads the tracking script on every page, captures ad click ids and stores the visitor id on the cart as a cart attribute.
Storefront events go through Shopify's app proxy on your own domain, so ad blockers see a first-party request and you don't need a CNAME.
Why matching is most direct on Shopify
Shopify carries the ROASaurus visitor id on the cart, and ROASaurus also links cart and checkout tokens. When the order webhook arrives, it knows which visitor and ad click the order belongs to, without guessing from email or IP.
When purchases are sent
With Shopify checkout, purchases are sent from the orders/paid webhook, held 20 seconds so the browser checkout event (IP, user agent, fbp) can be joined first. With External / COD checkout, for cash on delivery or checkouts like Checkify and CheckoutChamp that create Shopify orders, they are sent when the order is created.
The optional checkout pixel
Paste the custom pixel snippet in Settings › Customer events to add browser pixels in checkout, Google Ads enhanced conversions and the Klaviyo booster.
Profit and LTV from the same install
Order, refund, product, inventory and dispute webhooks feed profit analytics, including Shopify's cost per item and exact Shopify Payments fees. The same orders build lifetime value and cohorts.
Markets, POS, headless and the Shopify admin
Pixels can be routed per Shopify Market, with their own ids and tokens per market. Point of Sale and draft orders are kept apart per destination, and in-store sales can go to Meta and Google Ads as offline events. Hydrogen and other headless storefronts load the ROASaurus module (see the headless guide). Stores that install from Shopify manage connections and settings in the embedded app in the Shopify admin and pay through Shopify.
Limits
- Turn off "Buy it now" dynamic checkout buttons so Add to cart is always tracked.
- Set Facebook & Instagram data sharing to Standard or off for the same pixel, or Meta counts purchases twice.
- With Respect visitor consent on (the default), visitors who decline marketing cookies get no visitor id, so their ad clicks and visits are not linked to them, and their browser events are not sent to ad platforms. Their paid order is still sent server-side with hashed order data.
Related
Questions, answered
How long does Shopify setup take?
About ten minutes: connect the store, switch on the app embed, optionally paste the checkout pixel, and choose your checkout type. Open your store with ?roasaurus=connected to check the script is live.
Does it work with cash on delivery?
Yes. Choose External / COD checkout in Store settings. Purchases are then sent when the order is created instead of when it is paid.
What happens when a visitor declines cookies?
With Respect visitor consent on, ROASaurus reads Shopify's customer privacy settings. If a visitor declines marketing cookies, they get no visitor id, so their ad clicks and visits are not linked to them, and their browser events are not sent to ad platforms. The paid order itself is still sent server-side with hashed order data.
Every sale, traced to the ad that earned it
Server-side tracking, profit and lifetime value in one app. 14-day free trial, no credit card.
Start your free trial →