Aghanim-Tenjin Integration
This guide explains how to integrate Aghanim with Tenjin to streamline mobile attribution and analytics. By connecting Aghanim with Tenjin, you can track purchases players make on the Game Hub and other sales channels, attributing them to the same installs and campaigns your in-app purchases are attributed to.
Aghanim sends events to Tenjin only when a player successfully completes a payment. Refunds and free item claims are not sent to Tenjin.
Requirements
- A Tenjin account with your app added in the Tenjin dashboard.
- The SDK Key of that app.
- The ability to return Tenjin identifiers from your backend in the
player.verifywebhook response — these come from the Tenjin SDK running in your game.
Step 1: Get your Tenjin SDK Key
- Log in to the Tenjin dashboard.
- Open the app you want to track and copy its SDK Key — the same key your game's Tenjin SDK is initialized with.
For more details, see the Tenjin server-to-server documentation.
Step 2: Install the Tenjin plugin
- Go to Aghanim Dashboard → App Connect → Tenjin.
- Paste the SDK Key into the plugin settings.
- Click Install.
| Field | Description | Required? |
|---|---|---|
| SDK Key | The SDK Key of your app in the Tenjin dashboard. Used to authenticate purchase events sent to the Tenjin S2S Purchase API. | Yes |
| Excluded Sales Channels | Purchase events from the selected sales channels (Game Hub, Checkout, SDK, Checkout links) are not sent to Tenjin. Leave empty to send events for all channels. | No |
Step 3: Add Tenjin attributes to the player.verify webhook response
To ensure Tenjin correctly identifies the install and attributes the purchase, include the Tenjin-specific attributes in the player.verify webhook response. The values come from the Tenjin SDK in your game client and must be stored on your side so they can be returned for the player:
| Key | Type | Description | Required? |
|---|---|---|---|
tenjin_analytics_installation_id | string | The Tenjin analytics installation ID — the unique install identifier generated by the Tenjin SDK. This is what links the purchase to the attributed install. | Yes |
tenjin_bundle_id | string | Bundle ID of your app, as registered in Tenjin. Example: com.tenjin.wordfinder. | Yes |
tenjin_platform | string | The platform of the install. One of ios, android, amazon, android_other. | Yes |
tenjin_developer_device_id | string | The identifier for vendor. | Yes for ios, otherwise No |
tenjin_advertising_id | string | The raw advertising ID of the device. Sent as an empty value when not provided. | No |
tenjin_os_version | string | The OS version of the device. Example: 8.0. Defaults to unknown when not provided. | No |
tenjin_os_version_release | string | The OS release version, when it differs from tenjin_os_version. Example: 14. | No |
tenjin_app_version | string | The version of your app. Example: 1.0.3. | No |
tenjin_build_id | string | The build identifier of your app. Example: UP1B.231005.007. | No |
tenjin_device_model | string | The device model. Example: SM-F731A. | No |
For details on the meaning of each parameter, see the Tenjin Purchase API reference.
Example webhook response:
{
"player_id": "jdabGcerT32_d",
"name": "Molly",
"attributes": {
"tenjin_analytics_installation_id": "29eeb1610fe74997b6d53f02e9711f8c",
"tenjin_bundle_id": "com.tenjin.wordfinder",
"tenjin_platform": "ios",
"tenjin_developer_device_id": "b6bc48fe0ce949e4b229ce6c55663fca",
"tenjin_advertising_id": "f024e65f3dd94f16983726bcef192d68",
"tenjin_os_version": "8.0",
"tenjin_os_version_release": "14",
"tenjin_app_version": "1.0.3",
"tenjin_build_id": "UP1B.231005.007",
"tenjin_device_model": "SM-F731A"
}
}
Events sent to Tenjin
Once the integration is set up, Aghanim sends a purchase event to Tenjin for every successful payment.
Purchases paid entirely with reward points or virtual currency are still sent to Tenjin, but with price set to 0 and currency set to USD, since they carry no real-money revenue.
When no event is sent
A purchase produces no Tenjin event in any of these cases:
- The plugin is installed but no SDK Key is configured.
tenjin_analytics_installation_id,tenjin_bundle_id, ortenjin_platformis missing from the player's attributes.tenjin_platformisiosandtenjin_developer_device_idis missing — Tenjin requires a device identifier for iOS attribution.- The order's sales channel is listed under Excluded Sales Channels.
If Tenjin events are missing for real purchases, the player attributes returned by your player.verify webhook are the first thing to check.
Verify the integration
To verify the setup, complete a test purchase through a sales channel that is not excluded, then check that the purchase appears in your Tenjin reporting for the corresponding app and install.
需要技术支持?
联系我们的集成技术团队: [email protected]