# AppsFlyer

Integrating **AppsFlyer** with Zotlo allows you to bridge the gap between your mobile app and web-based checkout flows. This integration ensures that user journeys starting in your app and ending on a Zotlo payment page are accurately attributed and tracked.

## Integration Steps

Follow these steps to activate the AppsFlyer integration within your **Zotlo Panel**:

1. **Navigate to Integrations:** In your Zotlo panel, click the **"Integrations"** tab in the side menu.
2. **Select AppsFlyer:** Find AppsFlyer from the list of available integrations.
3. **Configure OS Settings:** Choose the operating system (**iOS** or **Android**) you want to configure.
4. **Enter Credentials:** Fill in the **App ID** and **App Secret** provided by your AppsFlyer dashboard for the selected OS.
5. **Map Your Events:** Define which Zotlo events (e.g., Trial Converted to Paid,  Payment Page Viewed) you want to send and specify the corresponding event names used in your AppsFlyer setup.
6. **Activate:** Click the **Activate** button to save and enable the data flow.

## Required Parameters

To accurately match mobile users with web activities (App-to-Web redirection), you must pass specific identifiers through the Zotlo checkout URL.

| Parameter          | Required on iOS? | Required on Android? | Description                                                             |
| ------------------ | :--------------: | :------------------: | ----------------------------------------------------------------------- |
| **`appsflyer_id`** |       ✅ Yes      |         ✅ Yes        | Unique ID assigned by AppsFlyer; essential for cross-platform matching. |
| **`idfa`**         |    ⚠️ Optional   |         ❌ No         | iOS Advertising ID; only available if Apple ATT permission is granted.  |
| **`idfv`**         |  🆗 Recommended  |         ❌ No         | iOS Vendor Identifier; provides a stable fallback for matching.         |
| **`gpsAdid`**      |       ❌ No       |         ✅ Yes        | Android Advertising ID (Google Play Services).                          |

## URL Structure & Implementation

To send these parameters to Zotlo, you must include them within the `customParameters[mmp]` array in your checkout link.

**Example Checkout Link with AppsFlyer ID:** `https://zotlo.checkout.com/payment/[YOUR_PAYMENT_ID]?customParameters[mmp][appsflyer_id]=123456789-0123`

**Recommended Minimum Data Set:**

* **For iOS:** Pass `appsflyer_id`, `idfv`, and `idfa` (if available).
* **For Android:** Pass `appsflyer_id` and `gpsAdid`.

{% hint style="success" %}
**Pro Tip:** Ensure that your mobile app correctly captures the `appsflyer_id` and appends it to the Zotlo URL when redirecting users to the payment page. This is the most critical step for successful attribution.
{% endhint %}
