# AppsFlyer Analytics & OneLink

AppsFlyer provides comprehensive mobile analytics and attribution tracking. This guide covers both the **OneLink deep linking integration** and **privacy configuration options** available in Zapp.

## Overview

### OneLink Deep Linking

OneLink is AppsFlyer's smart deep linking solution that allows you to create a single, universal link that automatically redirects users to the correct app store, landing page, or in-app content.

For more details on OneLink integration, refer to the [AppsFlyer support forum](https://support.appsflyer.com/hc/en-us/articles/360001250345-OneLink-API).

### Privacy & Data Protection

AppsFlyer offers configurable privacy controls to help you comply with data protection regulations and user consent requirements. These include:

- **Anonymize User & Disable Advertising IDs**: Strict privacy mode that anonymizes user data and disables ad tracking identifiers
- **Block 3rd Party Data Sharing**: Prevent data sharing with third-party partners while maintaining attribution tracking
- **IDFA/Advertising ID Management**: Fine-grained control over advertising identifier collection (requires separate IDFA plugin)

## Prerequisites

- **An AppsFlyer account**. Follow the [Getting Started Guide](https://support.appsflyer.com/hc/en-us/articles/212017846-Welcome-to-AppsFlyer).

- **AppsFlyer dev key**, available in your dashboard, which is used for SDK integration.

- **Branded OneLink domain** setup (for deep linking). This involves:

    - Setting up your custom domain in AppsFlyer.

    - Creating new OneLink URLs using this domain. For detailed instructions, refer to [Brand OneLink with your domain](https://support.appsflyer.com/hc/en-us/articles/360002329137-Brand-OneLink-with-your-domain).

- **AppsFlyer plugin** added to the relevant version.

## iOS Configuration

### Basic Setup

1. Go to the Plugin Configuration section of your **iOS** app and fill in the following fields:

    - **AppsFlyer Key**: Your app's unique identifier from the AppsFlyer dashboard
    - **Apple App ID**: Found in the App Store (also called Bundle ID)
    - **SKAdNetworks**: Leave this field blank
    - **SKAdNetwork Endpoint**: Pre-filled; no changes needed
    - **Plugin Enabled**: Ensure this is enabled

![](./appsflyer-onelink/appsflyer_configs_iOS.png)

### Deep Linking Setup

2. Under the General Settings of your iOS version, add your Universal Links to the **Universal Links** field:

![](./appsflyer-onelink/ios-ulink.png)

## Android Configuration

### Basic Setup

1. Go to the Plugin Configuration section of your Android app and complete the following:

    - **AppsFlyer Key**: Your app's unique identifier from the AppsFlyer dashboard

### Privacy Configuration Options

Zapp provides two privacy-focused toggles for Android:

#### Anonymize User & Disable Advertising IDs

Enables strict privacy mode with the following effects:

- **Anonymizes user data**: All user identifiers are anonymized
- **Disables advertising identifiers**: Prevents collection of GAID (Google Advertising ID)
- **Disables install attribution**: Attribution tracking is disabled
- **When to use**: For apps targeting children (COPPA compliance), sensitive content, or regions with strict privacy requirements

:::note
The effectiveness of advertising ID disabling depends on whether the **IDFA and Advertising ID Management plugin** is also installed and enabled. With the IDFA plugin installed, you can further control advertising ID collection independently.
:::

For more details, see [AppsFlyer Anonymization](https://support.appsflyer.com/hc/en-us/articles/360001422989-User-opt-in-opt-out-in-the-AppsFlyer-SDK#record-install-and-anonymize).

#### Block 3rd Party Data Sharing

Prevents AppsFlyer from sharing user data with third-party partners via:

- Postbacks
- APIs
- Raw data reports

:::important
This setting **only affects third-party sharing** and does **not prevent attribution data collection**. AppsFlyer will continue to track installs and user events for your analytics.
:::

### Additional Privacy Control: IDFA Plugin

For granular control over advertising ID collection, add the **IDFA and Advertising ID Management** plugin. This allows you to:

- Toggle advertising ID collection on/off independently
- Customize the ATT (App Tracking Transparency) prompt on iOS
- Prevent unintended advertising ID collection by third-party SDKs

See the [IDFA Control documentation](../../data-analytics/idfa.md) for detailed setup instructions.

### Deep Linking Setup

2. In the General Settings of your Android version:

    - Add your branded domain to the **App Links Hosts** field.
    - Add `/fake` under the **App Links Patterns** field (required for proper intent filter matching):

![](./appsflyer-onelink/android-ulink-fake.png)

#### Domain Association for Deep Linking

To enable deep linking with OneLink on Android, your app must be associated with your branded domain using [Digital Asset Links](https://developers.google.com/digital-asset-links/v1/getting-started).

You can either:

1. **Self-host** the file at:

   `https://your-domain.com/.well-known/assetlinks.json`

2. **Let AppsFlyer host it** for you.

   In this case, provide AppsFlyer with:

   - The app's package name
   - The SHA256 fingerprint of your app's signing key

   :::note Tip
   To test on Zapp debug builds, use this key fingerprint:
   `65:F4:11:CB:1F:EB:5B:45:73:D6:D8:85:55:01:61:88:17:D5:09:65:E9:D9:72:9A:75:9D:68:47:18:F7:87:78`
   :::

   - For production, find the key in Google Play Console under Release > App Integrity

See: [AppsFlyer Android Deep Linking Guide](https://dev.appsflyer.com/hc/docs/dl_android_init_setup).
