> 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)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.smaq.io/documentation/connections/appsflyer.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
