Atribu
Integrations

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, and checkouts/create

How the dual-track setup works

Atribu uses two complementary extensions on your Shopify store:

ExtensionWhere it runsWhat it captures
Theme extension (Atribu Tracker)Storefront pages (product, collection, home, blog)Engagement, scroll depth, video, forms, identity, web vitals, UTMs, click IDs
Web PixelSandboxed checkoutadd_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.

  1. Toggle Atribu Tracker ON if it is not already enabled
  2. Your tracking key is pre-filled
  3. 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 all storefront engagement data (scroll depth, video views, form interactions, web vitals) that powers engagement-weighted attribution.

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

DataSourceDescription
Page viewsTheme extensionEvery storefront page visit with UTMs and click IDs
EngagementTheme extensionScroll depth, time on page, video views, click quality, web vitals
Add to cartWeb PixelProduct added to cart with value
Checkout startedWeb PixelCheckout initiated with subtotal
PurchaseWeb Pixel + WebhookCompleted order with total value, order ID, checkout token
Order detailsWebhookOrder amount, currency, customer email/name, product data
Customer identityTheme extension + WebhookEmail from forms (via tracker identify()) and from orders

How attribution works

  1. A customer clicks your ad and arrives on your Shopify store (with UTM params or click IDs)
  2. The Atribu theme tracker records the visit, engagement, and captures the ad attribution data
  3. If the customer fills out a form (email signup, contact form), identify() links their anonymous visit to their email
  4. The customer makes a purchase -- the web pixel fires purchase, and the webhook delivers the order with customer email
  5. Atribu matches the customer's email to the earlier storefront visit
  6. Revenue is attributed to the ad campaign that drove the original click

Engagement-weighted attribution

When the theme extension is enabled, Atribu computes an engagement_quality_score (0-100) for each storefront session. This score factors into the engagement-weighted attribution model, giving more credit to ad clicks that drove high-quality visits (deep scrolling, long time on page, video watched, no errors).


Theme extension settings

The Atribu Tracker app embed supports these settings in the Shopify theme editor:

SettingDefaultDescription
Tracking Key(required)Your trk_ key from Atribu Settings > Tracking
Tracking Endpointhttps://www.atribu.app/api/tracking/collectChange only if using a custom domain
Tracker Script URLhttps://www.atribu.app/atribu-tracker.jsChange only if self-hosting
Intercept Meta PixelONMirror fbq() events server-side for better Meta CAPI match quality
Session Timeout30 minutesMinutes of inactivity before a new session starts
Session ModeInactivity or source changeAlso starts a new session when the visitor arrives from a different campaign
Click QualityONTrack rage clicks and dead clicks
Web VitalsONCapture LCP, CLS, INP performance metrics
CTA VisibilityONTrack when call-to-action buttons enter the viewport
Video TrackingONTrack native video, Wistia, and Video.js playback

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 eventWhy
Order creationRecords the order as it is placed
Order paymentRecords the captured payment — this is the revenue event
Refund createReverses 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 installManual mode
Order + refund captureYesYes
Storefront tracking (theme)App embed, one togglePaste into theme.liquid
Checkout web pixelYesNoadd_to_cart and checkout_started are not captured
Product / inventory syncYesNo — needs Admin API access
BillingShopify BillingStripe, like any non-Shopify customer
Broken-connection alertApp tells usSilence only — see below
Customer data in deliveriesYesYes, 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.


On this page