Connecting AfterSell to AppsFlyer
AfterSell works through checkout extensions and post-purchase pages, which puts its offers inside Shopify's sandboxed surfaces where your own scripts cannot reach. 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 AfterSell upsell 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
AfterSell revenue in AppsFlyer for Shopify-built mobile apps
Only for Shopify-built mobile apps. Have the app write its appsflyer_id onto the cart before checkout, read it from the order webhook once the post-purchase offer is answered, and post the final total through AppsFlyer's server-to-server events API. Turn off the SDK purchase, which carries the pre-upsell total. If your app builder can't set cart attributes, there's no join.
AppsFlyer only matters here if your store has a mobile app, usually built with a Shopify app builder, where checkout is often the same Shopify checkout opened inside the app. The SDK can fire a purchase event when that checkout completes, but it fires with the pre-upsell total, because the post-purchase offer is answered afterwards and the SDK cannot see inside it.
Send revenue from the server instead. Have the app write its appsflyer_id onto the cart before checkout opens, read it from the order webhook once the post-purchase offer has been answered, and post the final total through AppsFlyer's server-to-server events API. If the SDK also fires a purchase, you have two events, and AppsFlyer forwards both to every ad network connected to it. Turn off the SDK purchase, or make sure the two cannot both count.
Check whether your app builder lets you pass custom cart attributes before you start. If it cannot write the device identifier onto the cart, there is no join, and server events will arrive with no install to attach to. Web orders from people who have the app but bought on desktop should stay out of AppsFlyer entirely.
AfterSell → AppsFlyer · what breaks
Why this join usually fails — AfterSell → AppsFlyer
- 01
The AppsFlyer device identifier, appsflyer_id never reaches AfterSell
Extension surfaces are isolated by design. Attempting to instrument them client-side does not work and is not supported.
- 02
Trying to instrument a sandbox
Time gets spent attempting to observe checkout extension behaviour from the storefront. It cannot be done, by design, and every hour spent on it is an hour not spent on the server-side path that works.
- 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.
AfterSell → AppsFlyer · the fix
What working looks like — AfterSell → 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
AfterSell → AppsFlyer · architecture
How AfterSell and AppsFlyer actually connect
- 1
AfterSell holds the truth
Checkout UI extensions run sandboxed. Nothing you write can observe them, so the only reliable view of what the customer accepted is the order itself.
- 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 AfterSell upsell order.
- 4
The event source decides reliability
Send the final order total from the webhook, with upsell line items identified.
- 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.
AfterSell → AppsFlyer · normal or broken
Working vs. broken, side by side — AfterSell → AppsFlyer
Normal, not a fault
The AppsFlyer device identifier, appsflyer_id present on the order
Sent from the Shopify order 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
Extension surfaces are isolated by design. Attempting to instrument them client-side does not work and is not supported.
Sent from the browser
Time gets spent attempting to observe checkout extension behaviour from the storefront. It cannot be done, by design, and every hour spent on it is an hour not spent on the server-side path that works.
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
AfterSell → AppsFlyer · diagnose
Diagnostic order — AfterSell → AppsFlyer
- 01
Count orders carrying the AppsFlyer device identifier, appsflyer_id
- 02
Follow one real conversion end to end
- 03
Confirm the conversion is sourced from the order, not from a page
On modern Shopify checkout there is no supported page-based option left, so this is the only correct architecture.
- 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.
AfterSell → AppsFlyer · prove
How it gets proven — AfterSell → AppsFlyer
Source of truth
The final Shopify order total, read from the order record.
- 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.
- Final order totals reconciled from the webhook against imported conversions.
AfterSell → 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
- Confirm the conversion is sourced from the order, not from a page
- Check what share of your revenue happens in the app at all
- Read the match rate, not the success message
Checked against
The final Shopify order total, read from the order record.
Free30 minutesNo obligation
AfterSell → AppsFlyer · when not to buy
When you don't need this — AfterSell → AppsFlyer
- Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the AppsFlyer device identifier, appsflyer_id.
- If your conversions already come from the order webhook, checkout extensions change nothing for you.
- 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.
AfterSell → AppsFlyer · what we deliver
What gets built — AfterSell → AppsFlyer
Identifier capture into AfterSell
Do not try to instrument the checkout surface. Read the order server-side, which is the supported and more reliable path anyway.
Event source: the Shopify order webhook
Send the final order total from the webhook, with upsell line items identified.
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 reverse.
Written guarantee
95%+ tracking accuracy
Measured against The final Shopify order total, read from the order record.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
AfterSell → AppsFlyer questions, answered
If the app uses Shopify checkout and the post-purchase page renders there, yes, but the AppsFlyer SDK only sees the pre-upsell total. Send the final total server-to-server with the stored appsflyer_id.
Commonly because the SDK purchase event fires before AfterSell upsells are added. Compare SDK revenue with order totals for app orders over the same week.
Almost always because the AppsFlyer device identifier, appsflyer_id never reached the AfterSell upsell order. Extension surfaces are isolated by design. Attempting to instrument them client-side does not work and is not supported. 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 Shopify order webhook. Send the final order total from the webhook, with upsell line items identified.
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 AfterSell → AppsFlyer
- Stripe → AppsFlyerConnecting Stripe to AppsFlyer
- PayPal → AppsFlyerConnecting PayPal to AppsFlyer
- Shopify → AppsFlyerConnecting Shopify to AppsFlyer
RELATED GUIDES
Where AfterSell → AppsFlyer fits in the rest of your tracking
- ReConvert → AppsFlyerConnecting ReConvert to AppsFlyer
- Checkout Champ → AppsFlyerConnecting Checkout Champ to AppsFlyer
- CartHook → AppsFlyerConnecting CartHook to AppsFlyer
- BeautyConversion tracking for beauty brands, including the second order
- Zipify OCU → AppsFlyerConnecting Zipify OneClickUpsell to AppsFlyer
- Rebuy → AppsFlyerConnecting Rebuy to AppsFlyer
Free · 30 min
Get AfterSell and AppsFlyer joined properly
Free30 minutesNo obligation
