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
- 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.
- 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.
- 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.
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
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
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 Statamic or Laravel order record.
- 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
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
- 01
Count orders carrying the AppsFlyer device identifier, appsflyer_id
- 02
Follow one real conversion end to end
- 03
Check whether full static caching is enabled
If it is, any per-request logic in a template is not running and never was.
- 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.
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.
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.
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.
Not through the in-app events API, because a web sign-up has no device ID. Check whether your plan includes web attribution.
Almost always because the AppsFlyer device identifier, appsflyer_id never reached the Statamic or Laravel order record. 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. 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.
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.
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 Statamic → AppsFlyer
- Statamic → Google AdsConnecting Statamic to Google Ads
- Statamic → MetaConnecting Statamic to Meta Conversions API
- Statamic → GA4Connecting Statamic to GA4
RELATED GUIDES
Where Statamic → AppsFlyer fits in the rest of your tracking
- Craft → AppsFlyerConnecting Craft CMS to AppsFlyer
- Sitecore → AppsFlyerConnecting Sitecore to AppsFlyer
- Sanity → AppsFlyerConnecting Sanity to AppsFlyer
- B2BConversion tracking for B2B, from first touch to closed-won
- Umbraco → AppsFlyerConnecting Umbraco to AppsFlyer
- AEM → AppsFlyerConnecting Adobe Experience Manager to AppsFlyer
- Contentful → AppsFlyerConnecting Contentful to AppsFlyer
- Ghost → AppsFlyerConnecting Ghost memberships to AppsFlyer
Free · 30 min
Get Statamic and AppsFlyer joined properly
Free30 minutesNo obligation
