# Singular と Unity の統合

> Singular のダッシュボードで Unity Ads 統合をアクティブ化し、完全なデータ共有を有効にしてイベントをマップします。

> **Important:**
>
> 以下のドキュメントでは、Unity が開発、所有、または運用するものではない製品またはサービス ("サードパーティ製品") を取り上げます。
> その情報は、古かったり、不完全であったりする可能性がありますが、利便性のために提供しています。
> サードパーティ製品を使用する際は、その製品の規約に従うものとします。
> Unity はそれらの製品に関して一切保証を行わず、その使用によって生じた損害や損失 (サードパーティプロバイダーのコンテンツ、広告、製品、資料に関する問題を含む) について責任を負いません。

Unity のユーザー獲得キャンペーン用に、Singular をモバイル計測パートナー (MMP) として設定します。統合には以下の設定タスクがあります。

* Singular のダッシュボードで Unity Ads をアクティブ化する。
* データ共有設定を行う。
* インストール後イベントをマップする。

Singular との統合の最新情報については、[Singular のヘルプセンター](https://support.singular.net/hc/en-us/articles/360028964651-Unity-Ads-Attribution-Integration) を参照してください。

## 前提条件##prerequisites

設定前に、以下の要件を満たしていることを確認してください。

* [Unity ユーザー獲得ダッシュボード](https://cloud.unity.com/acquire) に少なくとも 1 つのアプリケーションを[追加する](../../getting-started/add-an-app#add-an-app-to-the-dashboard)。
* User Acquisition (ユーザー獲得) ダッシュボードから [ゲーム ID](../../getting-started/locate-advertiser-credentials#game-id) を取得する。
* 最新バージョンの [Singular SDK](https://github.com/singular-labs/Singular-Unity-SDK) をダウンロードする。

## Unity と Singular の統合##integrate-unity-with-singular

Unity Ads を統合するために、[Singular のダッシュボード](https://app.singular.live/dashboard) で以下の手順を実行します。

### Singular のダッシュボードで Unity Ads をアクティブ化する##activate-unity-ads-in-the-singular-dashboard

1. **Attribution Setup** > **Partner Configuration** に移動します。
2. **Add a Partner** を選択します。**Unity Ads** を検索して選択します。
3. **Unity Ads Game ID** フィールドに広告主の [ゲーム ID](../../getting-started/locate-advertiser-credentials#game-id) を入力します。

> **Note:**
>
> User Acquisition (ユーザー獲得) ダッシュボードに表示されているゲーム ID を正確に入力してください。ゲーム ID が一致しない場合、Unity でイベントを正しく受信できません。

### データ共有設定を行う##configure-data-sharing-settings

データ共有設定を行うには、以下の手順を実行します。

1. **Attribution Postbacks & Settings** タブで、**Attribution Postbacks** テーブルに移動します。
2. **Attribution Event** 列で **Install** チェックボックスをオンにします。
3. 同じ行で、以下のチェックボックスをオンにします。

* **Send View Through**
* **Send All**
* **Send Fraud Postbacks**

![Singular ダッシュボードの Attribution Postbacks & Settings タブ。](/api/media?file=/user-acquisition/media/images/singular-integration-attribution-settings.png)

### インストール後イベントをマップする##map-post-install-events

イベントをマップするには、次の手順を実行します。

1. **In app Events Postback** タブで、**Send all ad monetization events** を **Revenue Events Postbacks** ドロップダウンから選択します。

> **Important:**
>
> Singular は、すべての収益化イベントをまとめて送信できる唯一のモバイル計測パートナー (MMP) です。Singular で広告収益イベントを送信するには、**Revenue Events Postbacks** ドロップダウンから **Send all ad monetization events** を選択し、**SDK Event Name** ドロップダウンから **`__REVENUE__*`** を選択します。

![Singular インテグレーション設定の Revenue Events Postbacks オプション。](/api/media?file=/user-acquisition/media/images/singular-send-all-monetization-events.png)

2. イベントをマップするには、**SDK Event Name** 列で Singular イベントを選択し、**Event Name** 列で Unity イベントにマップします。

| * `__iap__`
* `custom_purchase_event_name` | `purchase`   |                                                                                                                  |
| ------------------------------------------ | ------------ | ---------------------------------------------------------------------------------------------------------------- |
| `__REVENUE__*`                             | `ad_revenue` | Singular で広告収益イベントを送信するには、イベントテーブル上部の Revenue Events Postbacks ドロップダウンから Send all ad monetization events を選択します。 |
| `__SESSION__`                              | `session`    |                                                                                                                  |

3. ユーザーベース全体のデータを共有するには、各イベントの **Send all** チェックボックスをオンにします。
4. **Postback Window Starting Point** 列で、各イベントに対して **Unlimited** を選択します。
5. Singular の [Enterprise](https://support.singular.net/hc/en-us/articles/115000483946-Partner-Configuration-and-Postbacks-FAQ-and-Troubleshooting#in_app_event_postbacks) アカウントがある場合は、**Postback Window (days)** を **Unlimited** に設定します。それ以外の場合は、ウィンドウを `30` 日間に設定します。
6. 各行の **Include Revenue** チェックボックスをオンにします。

![Singular インテグレーション ワークフローの In-app Events Postback タブ。](/api/media?file=/user-acquisition/media/images/singular-in-app-postback-tab.png)
