Connecting Shopify to AppsFlyer
Shopify is the system of record for the order, and its admin numbers are the ones the business runs on. AppsFlyer exists because mobile app attribution is a different problem from web attribution, and on iOS a large share of it is now aggregated and delayed by design rather than by accident. The join between them succeeds or fails on one thing: whether the AppsFlyer device identifier, appsflyer_id reaches the Shopify order before the conversion happens, because AppsFlyer can only match a conversion it can tie back to a click it recognizes.
Free30 minutesNo obligation
Specific to this pair
Shopify into AppsFlyer: in-app orders only, never web checkouts
Only orders placed inside your mobile app belong in AppsFlyer. Have the app write appsflyer_id and your customer user ID to the cart as cart attributes, then post the purchase server-side from Shopify's paid-order webhook with revenue in the order's currency. If the app SDK already logs a purchase, drop one source, or revenue doubles.
AppsFlyer attributes installs and in-app events, so the Shopify orders that belong here are the ones placed inside your mobile app, usually a native or app-builder storefront on the same Shopify backend. Those orders exist in Shopify like any other, but the AppsFlyer ID lives in the app SDK, not on the order. The join is to put appsflyer_id and your customer user ID on the cart from the app as cart attributes, so the paid-order webhook can post the purchase server-side with revenue in the order's currency.
Decide one source for the purchase. Many app builders already fire an AppsFlyer purchase from the SDK at checkout success; adding a server event on top doubles every in-app sale, and the duplicate revenue flows on to every network AppsFlyer posts back to. The server route is the better single source because it sees Shopify's real paid total after discounts and catches checkouts that finish in a web view.
What does not belong in AppsFlyer is website orders. If most Shopify revenue is on the web, the useful question is web-to-app: whether installs from a smart banner on the storefront lead to orders later, which is an install-side setup rather than an order feed. Refunds from refunds/create can go as negative revenue if your setup expects it; confirm how downstream networks treat negative revenue first.
Shopify → AppsFlyer · what breaks
Why this join usually fails — Shopify → AppsFlyer
- 01
The AppsFlyer device identifier, appsflyer_id never reaches Shopify
Shopify's checkout is locked down. Custom scripts on the checkout steps are not permitted on standard plans, and the old additional-scripts route is gone, so the identifier has to be captured on the storefront and carried into the order through cart or order attributes rather than read at the checkout itself.
- 02
Checkout extensibility hides what you need
Shopify deliberately restricts what runs during checkout. Setups that assumed free rein there broke when the platform moved to Checkout Extensibility, and many stores have been quietly under-reporting since.
- 03
Web conversions sent to a mobile attribution platform
This is the common error and it produces confident nonsense. A purchase made on your website has no device identifier and no install behind it. AppsFlyer will either discard it or attribute it to nothing, and the revenue disappears somewhere between the two systems without anyone noticing it went.
- 04
Nothing reconciles afterwards
AppsFlyer shows the event on the raw data export with its attributed media source. Check the raw export, not the aggregate dashboard, and confirm the event carries a device identifier rather than landing as organic.
Shopify → AppsFlyer · the fix
What working looks like — Shopify → AppsFlyer
The AppsFlyer device identifier, appsflyer_id on every order
Conversions arriving in AppsFlyer
The event is attributed to the install source, forwarded to whichever networks are configured, and appears in the cohort reporting.
Reconciled against the source
Shopify → AppsFlyer · architecture
How Shopify and AppsFlyer actually connect
- 1
Shopify holds the truth
The order carries line items, discounts, shipping, tax, currency and the customer. Note which figure you intend to report — total, subtotal, or net of shipping and tax — because most mismatches between Shopify and an ad platform turn out to be two people comparing two different numbers.
- 2
AppsFlyer needs a click to match
AppsFlyer needs the device identifier and an event name it recognizes, plus the revenue value for in-app purchases. A server event about a user with no linked device cannot be attributed to an install.
- 3
The identifier is the bridge
The AppsFlyer device identifier, appsflyer_id, captured at the visit and carried into the Shopify order.
- 4
The event source decides reliability
Send when Shopify says the order is paid, from your server. This also covers draft orders, POS, and the customer who closes the tab on the thank-you page — none of which a pixel on the order-status page will ever see.
- 5
Deduplication at the destination
AppsFlyer deduplicates in-app events by its own event identifier. Sending the same purchase from both the SDK and your server produces two events and double-counts revenue in every dashboard downstream, including the ad networks AppsFlyer forwards to.
Shopify → AppsFlyer · normal or broken
Working vs. broken, side by side — Shopify → AppsFlyer
Normal, not a fault
The AppsFlyer device identifier, appsflyer_id present on the order
Sent from the orders/paid webhook
Deduplicated correctly
AppsFlyer deduplicates in-app events by its own event identifier. Sending the same purchase from both the SDK and your server produces two events and double-counts revenue in every dashboard downstream, including the ad networks AppsFlyer forwards to.
Reconciles with the source
Actually broken
The AppsFlyer device identifier, appsflyer_id missing on most records
Shopify's checkout is locked down. Custom scripts on the checkout steps are not permitted on standard plans, and the old additional-scripts route is gone, so the identifier has to be captured on the storefront and carried into the order through cart or order attributes rather than read at the checkout itself.
Sent from the browser
Shopify deliberately restricts what runs during checkout. Setups that assumed free rein there broke when the platform moved to Checkout Extensibility, and many stores have been quietly under-reporting since.
Counted twice, or not at all
This is the common error and it produces confident nonsense. A purchase made on your website has no device identifier and no install behind it. AppsFlyer will either discard it or attribute it to nothing, and the revenue disappears somewhere between the two systems without anyone noticing it went.
Nobody has reconciled it
Shopify → AppsFlyer · diagnose
Diagnostic order — Shopify → AppsFlyer
- 01
Count orders carrying the AppsFlyer device identifier, appsflyer_id
- 02
Follow one real conversion end to end
- 03
Open a recent paid order and read its note attributes
If the identifier is not on the order, nothing downstream can attribute it. Check ten orders, not one — partial coverage is the normal failure, not total absence.
- 04
Check what share of your revenue happens in the app at all
If most purchases are on the web, AppsFlyer is not your conversion destination and the work belongs somewhere else entirely.
- 05
Read the match rate, not the success message
AppsFlyer shows the event on the raw data export with its attributed media source. Check the raw export, not the aggregate dashboard, and confirm the event carries a device identifier rather than landing as organic.
Shopify → AppsFlyer · prove
How it gets proven — Shopify → AppsFlyer
Source of truth
Shopify Admin → Orders, for the same window, in the same currency and on the same timezone.
- The AppsFlyer device identifier, appsflyer_id confirmed present on a live order.
- In-app revenue events reconciled per transaction against your billing system, with the organic share stated rather than assumed away.
- Order totals in Shopify Admin reconciled per order, not on the summed total, over a closed window.
Shopify → AppsFlyer · free audit
What we check in the free audit
- Count orders carrying the AppsFlyer device identifier, appsflyer_id
- Follow one real conversion end to end
- Open a recent paid order and read its note attributes
- Check what share of your revenue happens in the app at all
- Read the match rate, not the success message
Checked against
Shopify Admin → Orders, for the same window, in the same currency and on the same timezone.
Free30 minutesNo obligation
Shopify → AppsFlyer · when not to buy
When you don't need this — Shopify → AppsFlyer
- Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the AppsFlyer device identifier, appsflyer_id.
- Shopify's own native channel integrations already cover simple single-currency stores adequately. If your admin numbers and platform numbers already agree, you do not need this.
- If you have no mobile app, this is not a destination for you. If you have one but sell mostly on the web, send web conversions to your ad platforms directly and use AppsFlyer only for install and in-app events.
Shopify → AppsFlyer · what we deliver
What gets built — Shopify → AppsFlyer
Identifier capture into Shopify
Capture the click identifier on the storefront, write it to a cart attribute so it becomes an order note attribute, and read it back server-side from the order. That path survives the checkout domain hop that breaks cookie-based approaches.
Event source: the orders/paid webhook
Send when Shopify says the order is paid, from your server. This also covers draft orders, POS, and the customer who closes the tab on the thank-you page — none of which a pixel on the order-status page will ever see.
Dispatch to AppsFlyer
The AppsFlyer server-to-server events API, posted from your billing system with the device identifier and revenue.
Reversals where they exist
refunds/create fires with the original order reference, so refunds and cancellations can be reversed at the destination.
Written guarantee
95%+ tracking accuracy
Measured against Shopify Admin → Orders, for the same window, in the same currency and on the same timezone.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
Shopify → AppsFlyer questions, answered
For orders placed in your app, store the AppsFlyer ID on the cart and post the purchase from the paid-order webhook through the server-to-server events API. Website orders should go to your ad platforms directly.
Usually the app SDK and a server integration both send the purchase. Keep one sender, and if both must run, give them the same event identifier.
Almost always because the AppsFlyer device identifier, appsflyer_id never reached the Shopify order. Shopify's checkout is locked down. Custom scripts on the checkout steps are not permitted on standard plans, and the old additional-scripts route is gone, so the identifier has to be captured on the storefront and carried into the order through cart or order attributes rather than read at the checkout itself. Measure coverage before debugging the dispatch.
AppsFlyer assigns its own device ID and matches installs to clicks through referrer data on Android and Apple's frameworks on iOS. There is no durable cross-device identifier. On iOS without ATT consent, attribution falls back to SKAdNetwork, which returns aggregated conversion values on a delay with no user-level detail at all — so a share of your installs will be attributable only in aggregate, permanently.
The orders/paid webhook. Send when Shopify says the order is paid, from your server. This also covers draft orders, POS, and the customer who closes the tab on the thank-you page — none of which a pixel on the order-status page will ever see.
AppsFlyer shows the event on the raw data export with its attributed media source. Check the raw export, not the aggregate dashboard, and confirm the event carries a device identifier rather than landing as organic.
More on Shopify → AppsFlyer
- Shopify POS → AppsFlyerConnecting Shopify POS to AppsFlyer
- Checkout Extensibility → AppsFlyerConnecting Shopify Checkout Extensibility to AppsFlyer
- Shopify → HubSpotConnecting Shopify to HubSpot
RELATED GUIDES
Where Shopify → AppsFlyer fits in the rest of your tracking
- WooCommerce → AppsFlyerConnecting WooCommerce to AppsFlyer
- Squarespace → AppsFlyerConnecting Squarespace Commerce to AppsFlyer
- Gumroad → AppsFlyerConnecting Gumroad to AppsFlyer
- Jewelry ecommerceConversion tracking for jewelry ecommerce, measured in settled orders
- Wix → AppsFlyerConnecting Wix Stores to AppsFlyer
- Medusa → AppsFlyerConnecting Medusa to AppsFlyer
- nopCommerce → AppsFlyerConnecting nopCommerce to AppsFlyer
- Swell → AppsFlyerConnecting Swell to AppsFlyer
Free · 30 min
Get Shopify and AppsFlyer joined properly
Free30 minutesNo obligation
