> For the complete documentation index, see [llms.txt](https://docs.buildnatively.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.buildnatively.com/natively-platform/features/analytics/appsflyer.md).

# AppsFlyer

## What is AppsFlyer?

AppsFlyer is a mobile attribution and marketing analytics platform that helps you understand where your app installs come from and how users move through their journey after installing. It supports campaign management, conversion attribution, audience segmentation, and retention tracking.

{% hint style="info" %}
iOS attribution via **SKAdNetwork** is supported, letting ad campaigns be linked to iPhone installs in compliance with Apple's attribution requirements.
{% endhint %}

{% hint style="danger" %}
If you have In-App Purchases enabled, AppsFlyer automatically tracks them - this cannot be disabled.
{% endhint %}

## Prerequisits

{% hint style="success" %}
This feature requires the **Unlimited** or **Lifetime** plan. [See all plans](/getting-started/subscription-plans.md)
{% endhint %}

* An [AppsFlyer](https://www.appsflyer.com/start/) account.
* Your iOS and/or Android app [published](/natively-platform/app-info.md) in the Natively Dashboard.

## AppsFlyer Configuration

{% tabs %}
{% tab title="Android" %}

1. Go to [My Apps](https://hq1.appsflyer.com/apps/myapps) in AppsFlyer and click **Add app**.
2. Select the **Android, AndroidTV, Fire** platform.
3. Indicate your app's Google Play status:
   * **In Store** - select this and enter your app's Google Play URL.
   * **Pending approval/not published** - select this and enter your **Package ID**, found in the Natively Dashboard under **Publish** > **Android Build** > **Bundle Identifier**.
4. Select your app's currency, and whether it's targeted at a kids audience.
5. On the success screen, copy the generated **Dev Key**.

{% hint style="warning" %}
The **Dev Key** is the same for both iOS and Android - if you support both platforms, you only need to enter it once, but you must rebuild each app separately.
{% endhint %}

<div><figure><img src="/files/gssf2rCRYv9OByTIMPe1" alt="" width="188"><figcaption><p>Step 1</p></figcaption></figure> <figure><img src="/files/vYm5tVseDVb8BJobpBWC" alt="" width="188"><figcaption><p>Step 2-3</p></figcaption></figure> <figure><img src="/files/Aizj0K3keXunIfRmJgLv" alt="" width="188"><figcaption><p>Step 4</p></figcaption></figure> <figure><img src="/files/iuWZFGrxJ9ajHmuxGRCK" alt="" width="188"><figcaption><p>Step 5</p></figcaption></figure></div>
{% endtab %}

{% tab title="iOS" %}

1. Go to [My Apps](https://hq1.appsflyer.com/apps/myapps) in AppsFlyer and click **Add app**.
2. Select the **iOS, tvOS, MacOS** platform.
3. Indicate your app's App Store status:
   * **In Store** - select this and search for your published app.
   * **Pending approval/not published** - select this if your app isn't live yet.
4. Select your store country, then enter your **App ID** - found in the Natively Dashboard under **Publish > iOS Build > App Store App ID**, or directly in App Store Connect.
5. Select your app's currency, and whether it's targeted at a kids audience.
6. On the success screen, copy the generated **Dev Key**.

{% hint style="warning" %}
The **Dev Key** is the same for both iOS and Android - if you support both platforms, you only need to enter it once, but you must rebuild each app separately.
{% endhint %}

<div><figure><img src="/files/CAaiY1v58SgSuSwTp9xY" alt="" width="188"><figcaption><p>Step 1</p></figcaption></figure> <figure><img src="/files/rUkdne9A5gPWv9vmIsoX" alt="" width="188"><figcaption><p>Step 2-4</p></figcaption></figure> <figure><img src="/files/TDlyiJ9uP6lhzgT3ZjGs" alt="" width="188"><figcaption><p>Step 5</p></figcaption></figure> <figure><img src="/files/PZhqt1KHCRJgSrl1oAYL" alt="" width="188"><figcaption><p>Step 6</p></figcaption></figure></div>
{% endtab %}
{% endtabs %}

## Natively Dashboard Setup

1. Open your Natively app dashboard and navigate to **Features** > **Analytics** > **AppsFlyer**.
2. Toggle the feature to **Enabled**.
3. Enter the **Dev Key** you copied from AppsFlyer.
4. *(iOS only)* Enter the **Permission Description**.
5. Click **Save**.
6. Rebuild your app(s).

{% hint style="info" %}
The **Permission Description** is the text shown to iOS users when the OS asks them to grant tracking permission (App Tracking Transparency). This field only applies to iOS. Explain clearly why your app needs this permission - for example: "We use your data to provide personalized advertisements that are relevant to your interests."
{% endhint %}

{% hint style="warning" %}
You must rebuild your app for these changes to take effect.
{% endhint %}

## Implementation

Natively doesn't expose a dedicated AppsFlyer-specific method - app install tracking and attribution happen automatically once configured, with no additional call required.

For any event beyond the automatic install event - such as `registration_completed` or `profile_completed` - you must send it yourself using [Custom Event](/natively-platform/features/analytics/custom-event.md). These events **cannot** be configured entirely within the AppsFlyer or Meta dashboard; the dashboards can map, report, and optimize on events, but your app must actually send each event at the moment the action happens.

{% content-ref url="/pages/bhZtyuAB014fEBKEjDEi" %}
[Custom Event](/natively-platform/features/analytics/custom-event.md)
{% endcontent-ref %}

### How to use

{% hint style="warning" %}
AppsFlyer's dashboard data isn't real-time. Standard dashboard data typically takes 8–20 hours to appear. iOS attribution via SKAdNetwork is delayed further - installs are reported 72–120 hours after first app open, and up to 13 days for Google Ads specifically. Don't assume a missing install or event is broken until you've allowed for this delay.
{% endhint %}

#### Track installs automatically, no setup needed

Once configured, AppsFlyer tracks app installs and attribution on its own - you don't need to call any method for this to work.

#### Use Custom Event for everything beyond installs

For engagement, feature usage, or funnel tracking, use [Custom Event](/natively-platform/features/analytics/custom-event.md) - it's forwarded to AppsFlyer automatically once configured.

#### Verify your integration before launching campaigns

Use AppsFlyer's [SDK Integration Test](https://support.appsflyer.com/hc/en-us/articles/360001559405-Testing-the-SDK-integration-for-marketers) tool (see [Testing](/natively-platform/features/analytics/custom-event.md#testing) on the Custom Event page) to confirm installs and events are actually reaching AppsFlyer before you spend budget attributing campaigns to it.

## Troubleshooting

<details>

<summary>Installs aren't showing up in AppsFlyer</summary>

Go through this checklist:

* Confirm the feature is enabled and the Dev Key is correcly entered in the Natively Dashboard.
* Confirm the app has been rebuilt.
* Confirm you've allowed enough time for data to propagate.

</details>

<details>

<summary>Installs or events stop appearing after working previously</summary>

Check whether your AppsFlyer **Welcome Package** has expired or been exhausted. New AppsFlyer accounts get 12,000 free conversions usable within their first 12 months - once that window closes or the conversion limit is hit, tracking on the Zero plan may stop or require a plan upgrade. Check your plan status under **AppsFlyer** > **Account** > **Plan** before assuming the integration itself is broken.

</details>

<details>

<summary>Not working in a web browser or the Natively Preview app</summary>

This is a native feature and does not work in a standard web browser or in the Natively Preview app. Test on a real device using a full Natively build.

</details>
