Skip to main content

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.

info

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.verify webhook response — these come from the Tenjin SDK running in your game.

Step 1: Get your Tenjin SDK Key

  1. Log in to the Tenjin dashboard.
  2. 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

  1. Go to Aghanim Dashboard → App ConnectTenjin.
  2. Paste the SDK Key into the plugin settings.
  3. Click Install.
FieldDescriptionRequired?
SDK KeyThe SDK Key of your app in the Tenjin dashboard. Used to authenticate purchase events sent to the Tenjin S2S Purchase API.Yes
Excluded Sales ChannelsPurchase 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:

KeyTypeDescriptionRequired?
tenjin_analytics_installation_idstringThe 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_idstringBundle ID of your app, as registered in Tenjin. Example: com.tenjin.wordfinder.Yes
tenjin_platformstringThe platform of the install. One of ios, android, amazon, android_other.Yes
tenjin_developer_device_idstringThe identifier for vendor.Yes for ios, otherwise No
tenjin_advertising_idstringThe raw advertising ID of the device. Sent as an empty value when not provided.No
tenjin_os_versionstringThe OS version of the device. Example: 8.0. Defaults to unknown when not provided.No
tenjin_os_version_releasestringThe OS release version, when it differs from tenjin_os_version. Example: 14.No
tenjin_app_versionstringThe version of your app. Example: 1.0.3.No
tenjin_build_idstringThe build identifier of your app. Example: UP1B.231005.007.No
tenjin_device_modelstringThe 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.

note

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, or tenjin_platform is missing from the player's attributes.
  • tenjin_platform is ios and tenjin_developer_device_id is 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.

Need help?
Contact our integration team at [email protected]