# Integrate Tenjin with Unity

> Activate the Unity Ads integration in the Tenjin dashboard and enable full data-sharing.

> **Important:**
>
> The following documentation discusses products or services (“Third-party Products”) not developed, owned, or operated by Unity.
> This information might be outdated or incomplete and is provided for your convenience.
> Your use of any Third-party Product is subject to its own terms.
> Unity makes no warranties regarding these products and isn't liable for any damages or losses arising from their use, including issues related to content, advertising, or materials from Third-party providers.

Set up Tenjin as your Mobile Measurement Partner (MMP) for Unity User Acquisition campaigns. Integration includes the following setup tasks:

* [Copy credentials from the Unity Dashboard](#copy-credentials-from-the-unity-dashboard).
* [Activate Unity Ads in the Tenjin dashboard](#activate-unity-ads-in-the-tenjin-dashboard).
* [Configure data-sharing settings](#configure-data-sharing-settings).

For the most up-to-date Tenjin integration information, consult the [Tenjin Help Center](https://docs.tenjin.com/docs/unity-ads).

## Prerequisites

Before setup, ensure you meet the following requirements:

* [Add](../../getting-started/add-an-app#add-an-app-to-the-dashboard) at least one app in the [Unity User Acquisition dashboard](https://cloud.unity.com/acquire).
* Enable **Organization Owner** or **Organization Manager** access in the Unity Dashboard. Refer to [User types, roles and permissions](/cloud/organizations/roles-and-permissions.md) for more information.
* Download the latest version of the [Tenjin SDK](https://github.com/tenjin/tenjin-unity-sdk).

## Integrate Unity Ads with Tenjin

Complete the following steps to integrate Tenjin with your User Acquisition campaign:

### Copy credentials from the Unity Dashboard

You need the following Unity account credentials to complete your Tenjin integration:

1. **Game ID**

   #### Game ID

   To retrieve your [Game ID](../../getting-started/locate-advertiser-credentials#game-id) from the **Apps** page of the **User Acquisition** dashboard, follow these steps:

   1. From the dashboard left navigation menu, go to **Apps**. The provided table lists each of your organization's apps. Following each app name, the dashboard displays the app platform and Game ID.
   2. Select the **Copy** symbol next to the ID to copy it to your clipboard.
   3. Optionally, hover over the app name to copy the **Campaign Set ID** and **Store ID** as well.

   > **Note:**
   >
   > Enter your Game ID exactly as shown in the User Acquisition dashboard. Mismatched Game IDs prevent Unity from receiving events correctly.

2. **Secret Key and Key ID**

   #### Secret Key and Key ID

   > **Note:**
   >
   > Only **Organization Owners** or **Organization Managers** can create service accounts and secret keys. Refer to [User types, roles and permissions](/cloud/organizations/roles-and-permissions.md) for more information.

   To retrieve your Secret Key and Key ID from the **User Acquisition** dashboard, follow these steps:

   1. From the left navigation menu, go to **API Management**.
   2. Select **Advertising Management API** > **Service account**.
      ![The API Management page of the User Acquisition dashboard](/api/media?file=/user-acquisition/media/images/api-service-account.png)
   3. If you don't have a service account, select **+ New**. If you have a service account already, select it from the table.
   4. In the service account page, go to the **Keys** section.
   5. Select **+ Add key** to generate both keys.
   6. Select the copy buttons following the **Key ID** and the **Secret key** to copy both credentials.

3. **Organization core ID**

   #### Organization core ID

   To retrieve your Organization core ID from the **Settings** page of the User Acquisition dashboard, follow these steps:

   1. Go to the **Organization** section of the **Settings** page.
   2. Copy the numeric ID next to **Organization core ID**.

   > **Note:**
   >
   > Ensure that you copy the numeric **Organization core ID**, not the the alphanumeric **Organization ID**.

### Activate Unity Ads in the Tenjin dashboard

To integrate Unity with Tenjin, follow these steps in the [Tenjin dashboard](https://dashboard.tenjin.com/):

1. Go to the **Configure** tab and select **Channels**.
2. Search for **Unity Ads** in the **Marketing Channel Name** field.
3. In the **New Marketing Channel** setup for Unity Ads, enter the Unity account credentials you copied from the Unity dashboard and give your account a name.
4. In the Tenjin navigation menu, go to the **Campaigns** tab and select **Create Campaign**.
5. Select **Unity Ads** from the **Marketing Account** dropdown.
6. Choose your app from the **App** dropdown and give your campaign a descriptive **Name**.
7. When the system prompts you with a **Callback to be created** message, follow the provided link to continue and generate an attribution link.

### Configure data-sharing settings

With Tenjin, configuring the data-sharing settings also maps your in-app events. To configure data-sharing settings and map events with Tenjin, do the following as you finish the activation workflow:

1. After you follow the link in the **Callback to be created** message, select **Unity Ads** from the **Channels and Partners** dropdown.
2. In the **Channel callbacks** section, activate  the following toggles:

* **Unity Ads ad revenue**
* **Unity Ads app open**
* **Unity Ads IAP**
* **Unity Ads install**

> **Important:**
>
> Don't map ad revenue events as **In-App Purchase** events. If your Tenjin account supports ad revenue data-sharing, send this data as a dedicated **Ad Revenue Impression** event.
>
> If your account doesn't support ad revenue data-sharing, don't send ad revenue as a different event type, as this event mismatching can cause campaign optimization to stop working.

3. For each event callback, select **all users** from the **User filter** dropdown.

![The Channel Callbacks page of the Tenjin integration setup](/api/media?file=/user-acquisition/media/images/tenjin-channel-callbacks.png)
