Shopify
On a Shopify storefront the tracker works like anywhere else, with one extra job: Shopify’s checkout and web pixels run in sandboxes that cannot see window.signals, so the session id has to be carried into the order explicitly. The cart is the carrier.
Customer browses -> signals.js tracks the sessionCart bridge -> stashes the session id as a cart attributeCustomer buys -> the id rides the order's note_attributes through checkoutorders/paid webhook -> SnipForm writes the order value onto that sessionTurn on the bridge
Section titled “Turn on the bridge”Add shopify=true to the script URL:
<script src="https://cdn.snipform.io/api/analytics/signals.js?site=YOUR_PROPERTY_KEY&shopify=true" defer></script>Once the session is ready the tracker:
POSTs/cart/update.jswith{ attributes: { _snip_sid: "<session id>" } }, setting the attribute on the cart.- Appends a hidden
properties[_snip_sid]input to everyform[action^="/cart/add"], so items added from then on carry the id as a line-item property. - Watches the DOM and repeats step 2 for add-to-cart forms rendered later (quick-view modals, sticky bars, infinite scroll).
The bridge runs once per page load. debug=true adds [Signals:shopify] console lines showing the cart response and how many forms were stamped.
-
Install the SnipForm app and link the shop to your property. See Shopify integration.
-
Add the storefront script: enable the SnipForm Signals app embed in the theme editor (Theme settings → App embeds) and paste the property key, or add the script tag above to
theme.liquidyourself. Both do the same thing; the embed is the tag plusshopify=true. -
Add the customer events pixel from the integration page (Settings → Customer events in Shopify admin). Checkout runs in a sandbox the tracker cannot enter; the pixel is what reports
add_to_cart,checkoutandpurchaseevents from inside it, reading the session id off the cart the bridge stamped. -
Place a test order. The session in the dashboard shows the funnel events and, once
orders/paidarrives, the order value.
What lands on the session
Section titled “What lands on the session”| Source | Effect on the session |
|---|---|
Pixel product_added_to_cart | An add_to_cart event with the line value and currency |
Pixel checkout_started | A checkout event with the checkout total and item summary |
Webhook checkouts/create | A checkout step server-side even if the pixel was blocked |
Webhook orders/paid | An acquisition with the order total and currency, tagged with the order id |
The pixel’s event set is configurable on the integration page; all three are on by default. The order tag makes the revenue write idempotent: a second delivery of the same webhook updates the same acquisition rather than doubling revenue. The session’s value appears under acquisition_value and value_usd, with value_source set to shopify.
Conversions
Section titled “Conversions”The integration page offers a one-click Shopify Sales conversion, published and ready: All traffic → Added to cart (add_to_cart event) → Checkout (checkout event) → Purchase (session has acquisition value), with the conversion’s value summed from order revenue. Build your own on top of the same events if you want a different shape. See Conversions.
Known limitation
Section titled “Known limitation”Express checkouts that skip the cart (Buy It Now, Shop Pay express buttons) never touch the cart attribute, so those orders are not attributed to a session. Normal add-to-cart-then-checkout flows are unaffected.