> For the complete documentation index, see [llms.txt](https://docs.smaq.io/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.smaq.io/documentation/connections/appsflyer.md).

# AppsFlyer

### What SMAQ pulls

* Installs by media source, campaign, and ad set
* In-app events (purchases, sign-ups, custom events)
* Revenue (paid and organic)
* Retention cohorts
* Re-engagement / re-attribution data

### What you'll need

* An AppsFlyer dashboard account with **Admin** or **Manager** access.
* The AppsFlyer **API V2 token** — generate it in AppsFlyer → My Account → API Token.
* The **App ID** (e.g. `id123456789` for iOS or `com.example.app` for Android).

### Steps to connect

1. **Data Source → Add data source**.
2. Pick **AppsFlyer**.
3. Paste the **API V2 token** and the **App ID**.
4. Optionally select the **events** you care about (purchases, custom events).
5. Name and click **Connect**.

> **\[Screenshot needed]** AppsFlyer connection form with API token (masked), App ID, and events checklist visible.

### Tips

* **Token scopes** — AppsFlyer v2 tokens are scoped to specific apps. If you connect multiple apps, generate a separate token per app.
* **Event names matter.** SMAQ uses your in-app event names verbatim. Keep them consistent across iOS and Android.
* **Cost data** requires AppsFlyer to be ingesting cost from ad networks. If cost is missing, fix in AppsFlyer → Integrated Partners first.

### Troubleshooting

* **"Token rejected"** — confirm you're using a v2 token, not the legacy v1 API key.
* **Revenue mismatch with Stripe/Apple** — AppsFlyer reports gross revenue. Subtract refunds and platform fees separately.

### Related

* [Apple Search Ads](/documentation/connections/apple-search-ads.md)
