Skip to main content

Aghanim-AppsFlyer Integration

This guide explains how to integrate Aghanim with AppsFlyer to streamline mobile attribution and analytics. By connecting Aghanim with AppsFlyer, you can track player-generated events from the game hub, ensuring precise tracking of user actions across your entire game environment.

info

Aghanim currently sends events to Adjust only when a player successfully completes a payment on the game hub.

Requirements

Step 1: Provide the AppsFlyer API token

Obtain an API token from AppsFlyer to authenticate communication, enabling Aghanim to send events:

  1. Log in to AppsFlyer.
  2. In the dashboard, go to ConfigurationAPI Tokens or Server-to-Server (S2S) Tokens.
  3. If an API token is not already available, generate a new token following the provided instructions.
  4. Copy the generated token.
  5. Proceed to Aghanim Dashboard → App ConnectAppsFlyer and install the plugin.
  6. In the plugin settings, paste the generated token.

For more details, see the AppsFlyer documentation.

Step 2: Add AppsFlyer attributes to player.verify webhook response

To ensure AppsFlyer correctly identifies users and attributes their actions on the game hub, include the AppsFlyer‑specific attributes in the player.verify webhook response:

KeyTypeDescriptionRequired?
attributes.appsflyer_idstringA unique identifier generated by AppsFlyer when the app launches for the first time. This ID links the user's activity within the app to their AppsFlyer profile. Example: 1234567890123-1234567.Yes
attributes.appsflyer_app_idstringThe app identifier as defined in the AppsFlyer dashboard. It links the data to the correct application in AppsFlyer. Example: id123456789.Yes
attributes.appsflyer_event_paramsobjectOptional custom parameters to include in the AppsFlyer event. You can add parameters directly or nest them inside eventValue. Example: {"idfa": "9876F1SS-2983-3855-27RR-2R626772VFNB", "eventValue": {"your_custom_attribute": "456.123"}}.No

For additional details on the attribute values, refer to the AppsFlyer documentation.

Example webhook response:

{
"player_id": "1x1x-xxxx1",
"name": "Molly",
"attributes": {
"appsflyer_id": "1234567890123-1234567",
"appsflyer_app_id": "id123456789",
"appsflyer_event_params": {
"idfa": "9876F1SS-2983-3855-27RR-2R626772VFNB",
"eventValue": {
"your_custom_attribute": "456.123"
}
}
}
}

Alternatively, if you can't send attributes through the player.verify webhook response, like if you do not store this ID on the server, you can pass query parameters in the deep link login URL:

https://<GAME_HUB_URL>/go/login?player_id=<UNIQUE_PLAYER_ID>&attributes.appsflyer_id=<APPSFLYER_ID>&attributes.appsflyer_app_id=<APPSFLYER_APP_ID>

However, we recommend using the webhook method, as it is more reliable and secure.

Need help?
Contact our integration team at integration@aghanim.com