Skip to main content
WooCommerce → AppsFlyerIntegration guide

Connecting WooCommerce to AppsFlyer

WooCommerce keeps the order in your own database, which is both the advantage and the reason nobody has wired it properly. 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 WooCommerce 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

WooCommerce to AppsFlyer: send only the orders placed in your app

Don't send web-only WooCommerce orders to AppsFlyer; they have no appsflyer_id. With an app on the WooCommerce REST API, have it write the appsflyer_id to order meta at checkout, including in-app web views, and send server-to-server from woocommerce_payment_complete with total and currency. Pick server or SDK purchases, not both, and report refunds.

AppsFlyer attributes events to app installs, and a WooCommerce web checkout has no appsflyer_id behind it. Posting every web order to AppsFlyer lands as organic noise or disappears, and the ad networks AppsFlyer forwards to receive revenue that never happened in the app. For a web-only store, do not build this.

It applies when a native or hybrid app sits on the WooCommerce REST API and checkout happens in the app or an in-app web view. Then the app writes the appsflyer_id to order meta at checkout, so the server-to-server event fired from woocommerce_payment_complete can carry it with the order total and currency. If checkout opens in an in-app browser, confirm the app passes its device ID into that session, because the web view will not know it otherwise.

The duplicate risk is specific: many app builders log a purchase from the SDK on the confirmation screen, and adding a server post from WooCommerce doubles revenue in AppsFlyer and every partner it forwards to. Choose one source; the server is better because it fires on payment rather than on a screen that may not load. Report WooCommerce refunds back as well, and check AppsFlyer's guidance for the event your account expects for them.

WooCommerce → AppsFlyer · what breaks

Why this join usually fails — WooCommerce → AppsFlyer

  1. 01

    The AppsFlyer device identifier, appsflyer_id never reaches WooCommerce

    WooCommerce sites are usually the most heavily plugged-in of any platform. Caching plugins serve a static page to the visitor, optimization plugins defer or strip scripts, and consent plugins block them entirely. Any of the three will stop an identifier being captured, and they fail silently.

  2. 02

    Caching and optimization plugins eat the tracking

    The page the customer sees is not the page your code assumed. This is the most common cause of WooCommerce tracking that worked at launch and silently stopped after a plugin update.

  3. 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.

  4. 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.

WooCommerce → AppsFlyer · the fix

What working looks like — WooCommerce → 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

WooCommerce → AppsFlyer · architecture

How WooCommerce and AppsFlyer actually connect

  1. 1

    WooCommerce holds the truth

    You own the database, so the truth is exactly as good as the query you write against it. Pin the status set first — whether processing, completed, or both count as a conversion changes the number by a lot and is the source of most arguments.

  2. 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. 3

    The identifier is the bridge

    The AppsFlyer device identifier, appsflyer_id, captured at the visit and carried into the WooCommerce order.

  4. 4

    The event source decides reliability

    Fire server-side from the PHP hook rather than from the thank-you page template. Page caching means the thank-you page cannot be relied on to execute anything, and on many stores it is served from cache to a paying customer.

  5. 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.

WooCommerce → AppsFlyer · normal or broken

Working vs. broken, side by side — WooCommerce → AppsFlyer

Normal, not a fault

  • The AppsFlyer device identifier, appsflyer_id present on the order

  • Sent from the woocommerce_payment_complete hook

  • 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

    WooCommerce sites are usually the most heavily plugged-in of any platform. Caching plugins serve a static page to the visitor, optimization plugins defer or strip scripts, and consent plugins block them entirely. Any of the three will stop an identifier being captured, and they fail silently.

  • Sent from the browser

    The page the customer sees is not the page your code assumed. This is the most common cause of WooCommerce tracking that worked at launch and silently stopped after a plugin update.

  • 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

WooCommerce → AppsFlyer · diagnose

Diagnostic order — WooCommerce → AppsFlyer

  1. 01

    Count orders carrying the AppsFlyer device identifier, appsflyer_id

  2. 02

    Follow one real conversion end to end

  3. 03

    Check order meta on ten recent orders

    Directly in the database or with a meta viewer. Then disable page caching for the checkout path and see whether coverage changes — if it does, caching is your cause.

  4. 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.

  5. 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.

WooCommerce → AppsFlyer · prove

How it gets proven — WooCommerce → AppsFlyer

Source of truth

WooCommerce → Orders (or the wp_wc_order_stats table), for the same window and status set.

  • 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 meta confirmed present on orders placed while full page caching was active.

WooCommerce → 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
  • Check order meta on ten recent orders
  • Check what share of your revenue happens in the app at all
  • Read the match rate, not the success message

Checked against

WooCommerce → Orders (or the wp_wc_order_stats table), for the same window and status set.

Get my free conversion tracking audit

Free30 minutesNo obligation

WooCommerce → AppsFlyer · when not to buy

When you don't need this — WooCommerce → AppsFlyer

  • Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the AppsFlyer device identifier, appsflyer_id.
  • If you run a small store with no caching layer and a single free plugin already reporting accurately, leave it alone.
  • 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.

WooCommerce → AppsFlyer · what we deliver

What gets built — WooCommerce → AppsFlyer

  • Identifier capture into WooCommerce

    Capture the click identifier and persist it as order meta on the order object with a small snippet in the theme's functions or a purpose-built plugin. Order meta lives in your own database, so it survives caching, plugin conflicts and the customer's browser.

  • Event source: the woocommerce_payment_complete hook

    Fire server-side from the PHP hook rather than from the thank-you page template. Page caching means the thank-you page cannot be relied on to execute anything, and on many stores it is served from cache to a paying customer.

  • 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

    The refund hooks carry the order ID, so reversals are straightforward once the identifier is on the order.

Written guarantee

95%+ tracking accuracy

Measured against WooCommerce → Orders (or the wp_wc_order_stats table), for the same window and status set.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

WooCommerce → AppsFlyer questions, answered

Only orders placed in your mobile app, with the appsflyer_id saved on the order. Web orders have no device identifier and should go to your ad platforms directly.

Free · 30 min

Get WooCommerce and AppsFlyer joined properly

Free30 minutesNo obligation