Shopify
Connect your Shopify store to track orders and customers, and attribute e-commerce revenue to ad campaigns.
The Shopify integration connects your online store to Atribu. It tracks orders and customer data so you can see which ad campaigns drive the most sales.
What you get
- Orders recorded as conversion events with revenue data
- Customer information (email, name) linked to Atribu's identity graph
- Attribution of e-commerce revenue to specific ad campaigns
- Full storefront tracking via the Atribu theme extension (engagement, scroll depth, video, forms, web vitals)
- Checkout event tracking via the Shopify Web Pixel (add to cart, checkout started, purchase)
- Webhooks for
orders/paid,orders/create, andcheckouts/create
How the dual-track setup works
Atribu uses two complementary extensions on your Shopify store:
| Extension | Where it runs | What it captures |
|---|---|---|
| Theme extension (Atribu Tracker) | Storefront pages (product, collection, home, blog) | Engagement, scroll depth, video, forms, identity, web vitals, UTMs, click IDs |
| Web Pixel | Sandboxed checkout | add_to_cart, checkout_started, purchase with order value |
The theme extension gives you full behavioral analytics on your storefront. The web pixel handles the checkout, where Shopify does not allow external scripts to run directly.
Both share the same anonymous_id and session_id in localStorage, so a visitor's browsing behavior is linked to their eventual purchase.
Why two extensions?
Shopify's checkout runs in a sandboxed environment that blocks external scripts. The Web Pixel API is the only way to track events there. For everything else (storefront pages), the full Atribu tracker provides much richer data than the pixel alone.
Connecting Shopify
Open Integrations
Go to Settings > Integrations in your Atribu workspace.
Enter your store domain
Type your Shopify store domain (e.g., my-store or my-store.myshopify.com) into the Shopify card.
Authorize the app
Click Connect. You will be redirected to Shopify to install and authorize the Atribu app. Atribu requests:
- Read orders and Read all orders -- to track purchases and revenue
- Read customers -- to match buyers to ad clicks via the identity graph
- Write pixels -- to automatically activate the checkout pixel
- Read customer events -- to read pixel event data
Enable storefront tracking
After connecting, click the Enable storefront tracking button. This opens your Shopify theme editor directly to the Atribu Tracker toggle.
- Toggle Atribu Tracker ON if it is not already enabled
- Your tracking key is pre-filled
- Click Save if Shopify shows it as enabled; if Save is disabled while the toggle is already ON, the activation is already saved
Don't skip this step
Without the theme extension, you only get checkout events from the web pixel. You miss storefront page views, form-based identity capture, and UTM/click-ID collection — the data that lets a later purchase be traced back to the ad that drove it.
Verify
Back in Atribu, the Shopify card should show Connected. The web pixel is activated automatically during the connection step.
Check Settings > Customer events in your Shopify admin to confirm the Atribu pixel shows Connected.
What syncs
| Data | Source | Description |
|---|---|---|
| Page views | Theme extension | Every storefront page visit with UTMs and click IDs |
| CTA visibility | Theme extension (opt-in, off by default) | cta_viewed when a tracked call-to-action enters the viewport — the only Features checkbox that creates a real, attributed event |
| Add to cart | Web Pixel | Product added to cart with value |
| Checkout started | Web Pixel | Checkout initiated with subtotal |
| Purchase | Web Pixel + Webhook | Completed order with total value, order ID, checkout token |
| Order details | Webhook | Order amount, currency, customer email/name, product data |
| Customer identity | Theme extension + Webhook | Email from forms (via tracker identify()) and from orders |
How attribution works
- A customer clicks your ad and arrives on your Shopify store (with UTM params or click IDs)
- The Atribu theme tracker records the visit, engagement, and captures the ad attribution data
- If the customer fills out a form (email signup, contact form),
identify()links their anonymous visit to their email - The customer makes a purchase -- the web pixel fires
purchase, and the webhook delivers the order with customer email - Atribu matches the customer's email to the earlier storefront visit
- Revenue is attributed to the ad campaign that drove the original click
The Features checkboxes (Click Quality, Web Vitals, CTA Visibility, Video Tracking)
These are opt-in and off by default. Click Quality, Web Vitals, and Video Tracking emit
display-only engagement events that never become a conversion and never carry
attribution credit — the server drops every event named engagement unconditionally,
regardless of which of these you enable. CTA Visibility is the one exception: it emits
cta_viewed, a real tracked event that becomes an attributed Touch (though never a
conversion on its own — viewing a CTA is an intent signal, not a sale).
Theme extension settings
The Atribu Tracker app embed supports these settings in the Shopify theme editor:
| Setting | Default | Description |
|---|---|---|
| Tracking Key | (required) | Your trk_ key from Atribu Settings > Tracking |
| Tracking Endpoint | https://www.atribu.app/api/tracking/collect | Change only if using a custom domain |
| Tracker Script URL | https://www.atribu.app/atribu-tracker.js | Change only if self-hosting |
| Intercept Meta Pixel | ON | Mirror fbq() events server-side for better Meta CAPI match quality |
| Session Timeout | 30 minutes | Minutes of inactivity before a new session starts |
| Session Mode | Inactivity or source change | Also starts a new session when the visitor arrives from a different campaign |
| Click Quality | OFF (opt-in) | Track rage clicks and dead clicks. Never becomes a conversion or attribution credit. |
| Web Vitals | OFF (opt-in) | Capture LCP, CLS, INP performance metrics. Never becomes a conversion or attribution credit. |
| CTA Visibility | OFF (opt-in) | Track when call-to-action buttons enter the viewport. The only one of these four that creates a real, attributed Touch. |
| Video Tracking | OFF (opt-in) | Track native video, Wistia, and Video.js playback. Never becomes a conversion or attribution credit. |
| Cart Attribution | ON | Stamp the visitor's session and ad-click context as Shopify cart attributes so orders stay attributable when the checkout pixel is blocked |
Manual mode (no app install)
Some stores cannot install a third-party app: agency-managed client stores, or Shopify Plus organizations with an app-approval policy. Those stores can still send Atribu their orders, using webhooks the merchant creates by hand in the Shopify admin. This is a reduced tier — read "What you give up" before choosing it.
Create the endpoint in Atribu
Go to Settings > Integrations, open the Shopify card, and click Connect
without installing the app. Enter the store's .myshopify.com domain (not
your custom storefront domain — Shopify signs deliveries with the
.myshopify.com name) and click Create endpoint.
Atribu generates a webhook URL unique to this store. Copy it.
Create the webhooks in Shopify
In the Shopify admin, go to Settings > Notifications > Webhooks > Create webhook. Create one webhook for each of these events, all pointing at the URL Atribu gave you:
| Shopify event | Why |
|---|---|
| Order creation | Records the order as it is placed |
| Order payment | Records the captured payment — this is the revenue event |
| Refund create | Reverses the sale so ROAS reflects money kept |
For each one: format JSON, and pick the API version Atribu shows on the setup card (it matches whatever the app itself is on).
Paste the store's signing ID
Once at least one webhook exists, Shopify shows a signing ID at the bottom of that same Webhooks page. This is a per-store secret — it is not an app secret, and it is not the same value for any two stores.
Copy it into the signing ID field on the Atribu setup card. Every delivery is verified against it; until it is set, deliveries are rejected.
Add the tracker to your theme
There is no theme app extension without an app install, so the tracker goes in
by hand: Online Store > Themes > Edit code > theme.liquid, and paste the
snippet Atribu shows just before the closing </head> tag.
Skipping this step is not cosmetic. Without the tracker, orders arrive with no ad attribution at all — Atribu can tell you a sale happened, but not which ad caused it.
Verify
Place a test order. The Atribu setup card flips from Awaiting first delivery to Receiving on the first webhook Atribu verifies, and shows the timestamp of the last delivery.
What you give up
| App install | Manual mode | |
|---|---|---|
| Order + refund capture | Yes | Yes |
| Storefront tracking (theme) | App embed, one toggle | Paste into theme.liquid |
| Checkout web pixel | Yes | No — add_to_cart and checkout_started are not captured |
| Product / inventory sync | Yes | No — needs Admin API access |
| Billing | Shopify Billing | Stripe, like any non-Shopify customer |
| Broken-connection alert | App tells us | Silence only — see below |
| Customer data in deliveries | Yes | Yes, unredacted — email, name, addresses, browser IP and user agent arrive exactly as with the app |
Manual mode is not a privacy-lighter option. Admin-created webhooks carry the full order payload — we verified this on a live store: email, customer.*, billing_address, client_details.browser_ip and user_agent are all present. If you chose manual mode to keep customer data out of a third party, it does not do that.
Deleting the webhook in Shopify stops capture silently. Nothing tells Atribu it happened, so nothing can tell you immediately. Shopify also retires an admin-created webhook on its own after repeated delivery failures (and emails the store owner, not us). Atribu's only signal is the absence of deliveries: the setup card flips to Gone quiet after 14 days without one. If you change the store's webhook configuration, check the card afterwards.
Prefer the app install
Every degradation above disappears with the App Store install, and the install takes less time than this setup does. Use manual mode only when installing an app is genuinely not an option.
Troubleshooting
Orders are not syncing
- Check that the connection shows Connected in Settings > Integrations
- Make sure the Atribu app is still installed in your Shopify admin under Settings > Apps and sales channels
- Verify webhooks are registered: Settings > Notifications > Webhooks in Shopify admin
- If you recently changed your store domain, reconnect from Atribu
Web pixel shows "Disconnected"
The web pixel is activated automatically when you connect Shopify from Atribu. If it shows disconnected:
- Reconnect from Atribu (Settings > Integrations > Shopify > Reconnect)
- Check Settings > Customer events in Shopify admin
No engagement data on storefront
- Make sure the Atribu Tracker app embed is toggled ON in the theme editor
- Verify the tracking key is correct
- Check the browser console for errors on a storefront page
Revenue is not attributed to campaigns
For attribution to work, the customer must be identifiable. This requires either:
- The Atribu theme tracker capturing the ad click (UTMs/click IDs) on the storefront visit
- The customer's email matching a previously identified visitor in Atribu
If neither condition is met, the order will be recorded but shown as unattributed.
Deduplication
The web pixel and webhooks may both capture the same purchase. Atribu deduplicates by order_id and checkout_token -- you will never see double-counted revenue.