Skip to main content
Statamic → AppsFlyerIntegration guide

Connecting Statamic to AppsFlyer

Statamic is a flat-file CMS on Laravel, usually chosen by agencies for content sites where commerce is bolted on rather than central. 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 Statamic or Laravel order record 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

Statamic app sites to AppsFlyer: carry campaign data to the store

A Statamic site's AppsFlyer job is carrying campaign context into store links. Build them client-side with AppsFlyer's Smart Script, which makes a OneLink from the landing URL and works on cached pages, with a plain OneLink as fallback href; server-built links freeze one visitor's parameters. Statamic form sign-ups have no appsflyer_id, so send web leads to ad platforms directly.

A Statamic site in an AppsFlyer setup is the web front door to an app, and its job is to carry campaign context into the store link. The trap is server-side link building: if your template appends incoming UTM or click parameters to App Store and Play links, full static caching freezes the first visitor's parameters into the file and every later visitor's install gets attributed to that one campaign.

Build store links in the browser instead. AppsFlyer's Smart Script is designed for this: it reads the landing URL and produces a OneLink with the campaign parameters attached, client-side, so it works on cached pages. Hard-code a plain OneLink as the fallback href in the template so the button still works if the script is blocked.

Server events are the weak half. A sign-up through a Statamic form has no appsflyer_id, because the person has not installed anything, so the server-to-server events API has nothing to attach it to. If web sign-ups matter, check whether your AppsFlyer plan includes web or people-based attribution; otherwise send the web lead to your ad platforms directly and let AppsFlyer measure only what happens after install.

Statamic → AppsFlyer · what breaks

Why this join usually fails — Statamic → AppsFlyer

  1. 01

    The AppsFlyer device identifier, appsflyer_id never reaches Statamic

    Statamic's static caching serves pre-rendered files with no PHP execution at all, which means anything expecting server-side rendering per request simply does not run.

  2. 02

    Static caching bypassing PHP entirely

    Statamic's full static caching serves a file from disk. No PHP runs, so nothing dynamic happens — and this is invisible because the page looks perfect.

  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.

Statamic → AppsFlyer · the fix

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

Statamic → AppsFlyer · architecture

How Statamic and AppsFlyer actually connect

  1. 1

    Statamic holds the truth

    Because Statamic sits on Laravel, the commercial record is usually a database table your developers defined. That is the source of truth and it is fully under your control.

  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 Statamic or Laravel order record.

  4. 4

    The event source decides reliability

    Fire from the application event. Static caching means the template that rendered the page may never have executed anything.

  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.

Statamic → AppsFlyer · normal or broken

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

Normal, not a fault

  • The AppsFlyer device identifier, appsflyer_id present on the order

  • Sent from your Laravel application's order event

  • 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

    Statamic's static caching serves pre-rendered files with no PHP execution at all, which means anything expecting server-side rendering per request simply does not run.

  • Sent from the browser

    Statamic's full static caching serves a file from disk. No PHP runs, so nothing dynamic happens — and this is invisible because the page looks perfect.

  • 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

Statamic → AppsFlyer · diagnose

Diagnostic order — Statamic → AppsFlyer

  1. 01

    Count orders carrying the AppsFlyer device identifier, appsflyer_id

  2. 02

    Follow one real conversion end to end

  3. 03

    Check whether full static caching is enabled

    If it is, any per-request logic in a template is not running and never was.

  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.

Statamic → AppsFlyer · prove

How it gets proven — Statamic → AppsFlyer

Source of truth

Whatever your Laravel application persists — Statamic's flat files hold content, not transactions.

  • 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 data confirmed persisted on a purchase made while full static caching was active.

Statamic → 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 whether full static caching is enabled
  • Check what share of your revenue happens in the app at all
  • Read the match rate, not the success message

Checked against

Whatever your Laravel application persists — Statamic's flat files hold content, not transactions.

Get my free conversion tracking audit

Free30 minutesNo obligation

Statamic → AppsFlyer · when not to buy

When you don't need this — Statamic → AppsFlyer

  • Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the AppsFlyer device identifier, appsflyer_id.
  • If commerce lives in a separate system entirely, work there — Statamic is the content layer.
  • 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.

Statamic → AppsFlyer · what we deliver

What gets built — Statamic → AppsFlyer

  • Identifier capture into Statamic

    Capture the identifier and persist it through a Laravel event listener into your own order table, entirely outside the static cache path.

  • Event source: your Laravel application's order event

    Fire from the application event. Static caching means the template that rendered the page may never have executed anything.

  • 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

    Whatever your application defines as a refund.

Written guarantee

95%+ tracking accuracy

Measured against Whatever your Laravel application persists — Statamic's flat files hold content, not transactions.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

Statamic → AppsFlyer questions, answered

Your template is probably building store links server-side, and static caching froze the first visitor's parameters. Build OneLinks client-side with Smart Script.

Free · 30 min

Get Statamic and AppsFlyer joined properly

Free30 minutesNo obligation