Tenjin

This guide describes how to add and configure Tenjin integration.

Tenjin is a mobile measurement platform that gives you everything you need to test user acquisition for your game or app and then scale it. This integration sends Apphud subscription events to Tenjin and receives Tenjin attribution data back into Apphud for use across every chart.

📘

Revenue Events are mapped as purchase

Tenjin overrides any revenue events and collects them under the purchase event name. This cannot be changed.

How does Integration Work?

This integration works in two ways.

1. Receive Attribution Data from Tenjin

Once you successfully configure the Tenjin integration, Apphud receives attribution data from it. You can view this data on the user's page:

Tenjin - Attribution data on user page

2. Send Subscription Events to Tenjin

Apphud can also send all subscription events to Tenjin, so you can view them in Tenjin and Tenjin can pass this data to its partners. This helps measure the efficiency of your ad campaigns.

How to Add Integration?

Step 1 - Install SDKs

Step 2 - Preparations in Tenjin

In your Tenjin app, you'll need access to the Tenjin API Key. Sign in to Tenjin, open the Apps tab, and note your API key (the same one you use in the Tenjin SDK).

The Custom Callback setup that receives Apphud's events is configured after you've created the connection in Apphud (so you can copy the webhook URL from there).

Step 3 - Authentication

In Apphud, open Connections → Integrations (the All or Attribution tab). Click Add Connection for Tenjin and choose a Source in the pop-up.

  • Paste the Tenjin API Key.
  • Copy the Webhook URL that Apphud generates by clicking on the field — you'll paste it into Tenjin in Step 5.
Apphud - Tenjin API key and Webhook URL

Step 4 - Additional Configuration

Environment and Revenue

Configure generic Environment and Revenue settings as described on Integrations overview → Configuration tab.

Set up filters (optional)

Navigate to Filters tab. Set up filters if needed as described on Integrations overview → Filters tab.

Step 5 - Configure Custom Callback in Tenjin

Tenjin needs a Custom Callback so it can forward events to Apphud.

  1. Sign in to Tenjin, go to app settings in the Apps tab and click New Callback (if you haven't added a Tenjin app yet, add it first).

    Tenjin - New Callback

  2. Click Create Custom Callback.

    Tenjin - Create Custom Callback

  3. On the Custom Callback Creation page:

    • Enter your Webhook name.
    • Paste the Webhook URL copied from Apphud (Step 3) into the URL field.
    • Select HTTP Method as POST.
    • Select Trigger Event as open.
    • Save Callback.

    Tenjin - Custom Callback configuration

Step 6 - Set up Events list

Back in Apphud, review the integration. Open the Events tab — you can enter custom event names or disable some.

❗️

Event name restrictions

Use only lower-case alpha-numeric characters (a–z and 0–9) for in-app event names.

Apphud - Tenjin events configuration

Step 7 - Test connection (optional)

Save the connection.

For the general integration configuration testing flow see Integrations overview → Test connection.

For Tenjin-specific sandbox testing without touching production data, see Testing Integration below.

Step 8 - Enable and save

Once you confirmed the connection works — Enable integration and Save.

Collect Device Identifiers (required)

iOS: Call setDeviceIdentifiers(idfa: String?, idfv: String?) method immediately after the SDK initialization. If the advertising identifier (IDFA) is not available, pass only the IDFV.
When IDFA becomes available, you can call setDeviceIdentifiers(idfa: String?, idfv: String?) again.

Android: Call Apphud.collectDeviceIdentifiers() method after the SDK initialization.
When targeting Android 13 and above, you must also declare AD_ID permission in the manifest file.

For more details, refer to Device Identifiers guide.

Request IDFA Consent (required)

Starting iOS 14.5, access to IDFA requires user consent. You should request IDFA manually using the AppTrackingTransparency framework and pass it to Apphud. Read more here.

Testing Integration

You can enter your production bundle ID or package in the test field. However, your sandbox events will be sent into the production Tenjin app.

To test Tenjin without touching your production account:

  • Create a new app in Tenjin with a different test bundle ID / package name.
  • Enter the sandbox bundle id / package name on the Tenjin configuration page in Apphud.
  • Change the bundle ID / package name of your app to the test one.
  • Create a new app in App Store Connect / Google Play Console with the test bundle ID / package name.
  • Create subscriptions for the test app.
  • Delete the app and reset the advertising identifier.
  • Run the app and make a test purchase.


Did this page help you?