> ## Documentation Index
> Fetch the complete documentation index at: https://docs.appdna.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# AppsFlyer

> Connect AppsFlyer to AppDNA in Integrations: the API token, the Push API postback (set up for you or by hand), a test postback, and what the status means.

## Overview

AppsFlyer tells AppDNA where each install came from: the media source, campaign, ad set, ad and channel, and whether the
install was organic. AppDNA receives this as **postbacks** from AppsFlyer's Push API, in real time, one per install,
re-engagement and in-app event. Everything is configured in **Integrations → Attribution → AppsFlyer**.

> [!NOTE]
>
> **Postbacks are required.** AppDNA uses user-level postbacks to join each install to a person. AppsFlyer's Push API is a
> paid feature: if your plan does not include it, AppsFlyer answers "Push API not in subscription" and AppDNA says so when you
> press **Configure for me**. Confirm your plan with AppsFlyer.

> [!NOTE]
>
> **Counting starts after AppsFlyer is confirmed.** Until AppDNA has confirmed AppsFlyer's field mapping against a real
> delivery, postbacks are stored and shown in the status, but not yet counted in reports. They are replayed into reports
> when counting starts, so nothing received in the meantime is lost.

## 1. Connect

You need:

* An **API V2 token**. In AppsFlyer, an admin opens **API tokens** and creates one. AppsFlyer revoked every V2 token created
  before **10 March 2026, 19:00 UTC**; if yours is older, generate a new one.
* The **App ID** as AppsFlyer shows it: `id` followed by the App Store id for iOS (for example `id123456789`), or the package
  name for Android (for example `com.example.app`). Each platform is its own AppsFlyer app, so connect each one you use.

In AppDNA, open **Integrations**, find **AppsFlyer** under **Attribution** and press **Connect**. AppDNA checks the token
against AppsFlyer's app list and that the App ID is one of your apps.

## 2. Set up the postback

After connecting, press **Set up postbacks** on the AppsFlyer card. The panel shows the postback URL and its secret.

### Configure for me (recommended)

Press **Configure for me**. AppDNA uses your API token to add its endpoint to the app's Push API (method `POST`, all fields,
every install, re-engagement, re-attribution and in-app event type) and to set the token AppsFlyer sends with each postback.

> [!WARNING]
>
> AppsFlyer keeps **one Push API token per app**. If the app already sends postbacks to other endpoints, AppDNA asks before
> continuing, because those endpoints will receive AppDNA's token in their `Authorization` header, replacing any token they
> receive now. Your other endpoints are kept. AppsFlyer allows up to 6 endpoints per app.

### By hand

In AppsFlyer → Integration → API access → Push API, add an endpoint with method **POST** and the AppDNA postback URL. Set
the token name to `Authorization` and the value to the **Authorization header value** shown in AppDNA (`Bearer …`). Select
all fields and all event types.

## 3. Send a test postback

AppsFlyer's own **Send test** carries no token, so AppDNA refuses it by design. Press **Send a test postback** in the panel
instead: AppDNA sends an AppsFlyer-shaped test install to your postback URL with your secret and shows whether the secret was
accepted, how it was stored (always as a test, never counted) and which AppDNA event a real postback like it becomes.

Then check with a real device: install your test build, open it once, and the install appears in the status counts within a
few minutes.

## 4. Status

| Line | Meaning |
| - | - |
| Receiving postbacks | A postback arrived in the last 24 hours |
| Waiting for the first postback | Connected less than 24 hours ago and nothing has arrived yet |
| Postbacks not set up | Connected more than 24 hours ago and no postback has ever arrived |
| No postback in 24 hours | Postbacks arrived before, but none in the last 24 hours: check the endpoint is still enabled |
| Refused (wrong secret) | Deliveries whose token did not match. The token changes when the secret is rotated: configure again, or paste the new value |

## Reports: installs and cost

Postbacks are how installs reach AppDNA. Separately, **Sync Now** on the integration page, and a daily pull after
that, reads AppsFlyer's aggregate report through the Master API (installs and cost per media source, campaign and day). The first run reads the last 90 days. Later runs re-read the
last 3 days, because networks correct their cost for a few days.

* **Cost** is used only for campaigns that no connected ad account (Meta Ads, Google Ads, TikTok Ads and others)
  reports. A campaign-day that an ad account covers always takes the ad account's spend, and the AppsFlyer cost for it is
  not added. ROAS and CAC show which source each spend figure came from. Cost in another currency is converted to US
  dollars with the same daily rates as ad spend.
* **Installs received vs reported (last 7 days)** in the status compares the installs AppsFlyer reports with the
  installs AppDNA received by postback. Below 80% a warning appears: a postback is probably not set up for every
  install event.
* If AppsFlyer answers that the Master API is not in your plan, the status says so and nothing is pulled. Cost comes
  from the Master API's `cost` figure, by media source, campaign and day. It is filled only when your AppsFlyer account
  collects cost data (AppsFlyer's ROI360 cost feature). Without it the status says no cost was reported, and AppDNA
  records no spend rather than zero.

## User-level history: the last 90 days

On the first Sync, AppDNA also reads AppsFlyer's raw installs reports (non-organic and organic) for the last 90 days.
Each install becomes an attributed install, exactly as if its postback had arrived. Installs that are joined to a person
show that person's acquisition source in analytics, audiences and experiments. This runs in the background: Sync Now
answers straight away, and the status shows "N of 90 days recovered".

* **Raw data must be on your AppsFlyer plan.** Raw data reports are an AppsFlyer premium feature. If your account
  does not have them, the status says so and only postbacks from now on are used.
* **Your API quota is shared.** AppsFlyer limits how many raw installs reports an app and an account can pull each UTC
  day. AppDNA uses at most 8 calls per app and 40 per account each day, which leaves the rest for your own tools. The
  90 days normally take 4 calls. If the budget is used up or AppsFlyer answers that the limit is reached, the backfill
  continues after midnight UTC.
* **The oldest day can be lost.** AppsFlyer keeps raw data for 90 days, so every day the backfill waits, its oldest day
  ages out. The status then reads "89 of 90 days recovered", for example, and never claims the history is complete.
* **Nothing is counted twice.** An install that already arrived by postback is skipped, and running Sync again does not
  add the history a second time. Installs from the history do not start journeys or emails.

## What AppDNA does with it

Once counting has started, the install source of each person is used across AppDNA:

* **Paid UA**: ROAS at day 7 and day 30, CAC (spend per paying user), LTV:CAC and payback per campaign, from the installs
  AppsFlyer attributes and the revenue those people paid in your app. A figure is shown only once the installs are old
  enough to measure it; until then it says why.
* **Metrics, Dashboards, Funnels and Retention**: split or filter by paid vs organic, media source, campaign, ad set,
  creative and attribution provider.
* **Audiences and targeting**: an audience or a flow, paywall, message or survey can target people by where they came
  from.
* **AI agents and the copilot**: the Paid UA agent reads these figures before it proposes a budget, pause or scale
  change, Recommendations and the copilot quote them, and the analytics questions you ask can be split by acquisition.
  Every figure an agent quotes comes from your data; when a figure cannot be measured yet the agent says
  "attribution unavailable" and the reason, and does not estimate it.

## Privacy

AppDNA removes the IP address from every AppsFlyer postback before storing it. Postbacks never count as sessions, active
users or revenue: in-app revenue AppsFlyer reports is kept apart as reported revenue.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.