Atribu
Integrations

Shopify

Connect your Shopify store to track orders and customers, and attribute e-commerce revenue to ad campaigns.

Shopify

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
  2. Your tracking key is pre-filled
  3. Click Save

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

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