---
title: "Airbridge"
description: "AdaptyとAirbridgeを連携して、マーケティングとアトリビューションのインサイトを追跡します。"
---

[Airbridge](https://www.airbridge.io/) は、複数のデバイス、プラットフォーム、チャネルから収集したデータを統合することで、ウェブサイトとモバイルアプリの統合マーケティングパフォーマンス分析を提供します。AirbridgeのIdentity Resolution Engineを使用すると、ウェブとアプリのインタラクションから得た断片的な顧客IDデータを統合した人ベースのIDに集約でき、より精度の高いアトリビューションを実現できます。

Adaptyは、ストアからの[サブスクリプションイベント](events)を一元管理できる完全なデータセットを提供します。Adaptyを使えば、ユーザーの行動を簡単に把握し、好みを理解した上で、ターゲットを絞った効果的なコミュニケーションに活かすことができます。

AdaptyとAirbridgeの連携は、主に2つの方向で機能します。

1. **Airbridgeからのアトリビューションデータの受信**  
   Airbridge連携を設定すると、AdaptyはAirbridgeからアトリビューションデータの受信を開始します。このデータはユーザーページで簡単に確認できます。
2. **Airbridgeへのサブスクリプションイベントの送信**  
   Adaptyは、連携設定で指定したすべてのサブスクリプションイベントをAirbridgeに送信できます。これにより、Airbridgeのダッシュボード内でこれらのイベントを追跡できるようになります。この連携は、広告キャンペーンの効果測定に役立ちます。

## 連携の設定 \{#set-up-integration\}

### AdaptyをAirbridgeに接続する \{#connect-adapty-to-airbridge\}

Airbridgeを連携するには、[Integrations > Airbridge](https://app.adapty.io/integrations/airbridge) に移動し、トグルをオンにして各フィールドを入力します。

まず、AirbridgeとAdaptyプロファイル間の接続を構築するための認証情報を設定します。AirbridgeのアプリネームとAirbridge APIトークンが必要です。

  <img src="/assets/shared/img/2b31d90-Untitled-1_1.webp"
  style={{
    border: '1px solid #727272', /* border width and color */
    width: '700px', /* image width */
    display: 'block', /* for alignment */
    margin: '0 auto' /* center alignment */
  }}
/>

どちらもAirbridgeダッシュボードの [Third-party Integrations > Adapty](https://app.airbridge.io/app/testad/integrations/third-party/adapty) セクションで確認できます。

  <img src="/assets/shared/img/5a2f627-Screenshot_2023-02-21_at_11.19.29_AM.webp"
  style={{
    border: '1px solid #727272', /* border width and color */
    width: '700px', /* image width */
    display: 'block', /* for alignment */
    margin: '0 auto' /* center alignment */
  }}
/>

Adapty APIトークンフィールドはAdaptyバックエンドで事前に生成されています。Adapty APIトークンの値をコピーし、AirbridgeダッシュボードのAdapty Authorization Tokenフィールドに貼り付けてください。

  <img src="/assets/shared/img/ff422d1-CleanShot_2023-03-01_at_17.11.412x.webp"
  style={{
    border: '1px solid #727272', /* border width and color */
    width: '700px', /* image width */
    display: 'block', /* for alignment */
    margin: '0 auto' /* center alignment */
  }}
/>

### イベントとタグの設定 \{#configure-events-and-tags\}

認証情報の下には、AdaptyからAirbridgeに送信できる3グループのイベントがあります。

  <img src="/assets/shared/img/eb4e3a9-CleanShot_2023-08-22_at_13.58.472x.webp"
  style={{
    border: '1px solid #727272', /* border width and color */
    width: '700px', /* image width */
    display: 'block', /* for alignment */
    margin: '0 auto' /* center alignment */
  }}
/>

必要なものをオンにするだけです。

### アプリをAirbridgeに接続する \{#connect-your-app-to-airbridge\}

連携のために、以下の例のように `airbridge_device_id` をプロファイルビルダーに渡し、`setIntegrationIdentifier` を呼び出してください。

<Tabs groupId="current-os" queryString>
<TabItem value="swift" label="iOS (Swift)" default>
```swift showLineNumbers

do {
    try await Adapty.setIntegrationIdentifier(
        key: "airbridge_device_id", 
        value: AirBridge.deviceUUID()
    )
} catch {
    // handle the error
}
```
</TabItem>
<TabItem value="kotlin" label="Android (Kotlin)" default>
```kotlin showLineNumbers
Airbridge.getDeviceInfo().getUUID(object: AirbridgeCallback.SimpleCallback<String>() {
    override fun onSuccess(result: String) {
        Adapty.setIntegrationIdentifier("airbridge_device_id", result) { error ->
            if (error != null) {
                // handle the error
            }
        }
    }
    override fun onFailure(throwable: Throwable) {
    }
})
```
</TabItem>
<TabItem value="flutter" label="Flutter (Dart)" default>
```javascript showLineNumbers

final deviceUUID = await Airbridge.state.deviceUUID;

try {
    await Adapty().setIntegrationIdentifier(
        key: "airbridge_device_id", 
        value: deviceUUID,
    );
} on AdaptyError catch (adaptyError) {
    // handle the error
} catch (e) {
    // handle the error
}
```
</TabItem>
<TabItem value="rn" label="React Native (TS)" default>
```typescript showLineNumbers

try {
  const deviceId = await Airbridge.state.deviceUUID();

  await adapty.setIntegrationIdentifier("airbridge_device_id", deviceId);
} catch (error) {
  // handle `AdaptyError`
}
```
</TabItem>
</Tabs>

airbridgeDeviceIdの詳細については、[Airbridgeのドキュメント](https://help.airbridge.io/en/developers/airbridge-device-id-faq)をご覧ください。

サブスクリプションイベント後、AdaptyがAirbridgeのアトリビューションデータを受信するまで最大24時間かかる場合があります。受信後はダッシュボードに即座に表示されます。

## イベント構造 \{#event-structure\}

Adaptyは、[**Airbridge Integration page**](https://app.adapty.io/integrations/airbridge) の **Events names** セクションで設定された内容に従い、選択したイベントをAirbridgeに送信します。各イベントの構造は以下の通りです。

```json
{
  "user": {
    "externalUserID": "user_12345",
    "externalUserEmail": "user@example.com",
    "attributes": {
      "is_premium": true
    }
  },
  "device": {
    "deviceUUID": "550e8400-e29b-41d4-a716-446655440000",
    "deviceModel": "iPhone 14 Pro",
    "osName": "iOS",
    "osVersion": "17.0.1",
    "locale": "en-US",
    "timezone": "America/New_York",
    "ifa": "00000000-0000-0000-0000-000000000000",
    "ifv": "00000000-0000-0000-0000-000000000000"
  },
  "app": {
    "packageName": "com.example.app",
    "version": "1.2.3"
  },
  "eventUUID": "d4f6f1f4-96fb-4a31-bafd-599fef77be90",
  "eventTimestamp": 1709294400000,
  "eventData": {
    "goal": {
      "category": "airbridge.subscribe",
      "customAttributes": {
        "isTrialConverted": true
      },
      "semanticAttributes": {
        "transactionID": "GPA.3383-4699-1373-07113",
        "totalValue": 9.99,
        "currency": "USD",
        "period": "P1M",
        "isRenewal": true,
        "renewalCount": 2,
        "products": [
          {
            "productID": "yearly.premium.6999",
            "name": "yearly.premium.6999",
            "position": 1
          }
        ]
      }
    }
  }
}
```

各パラメータの説明：

| パラメータ                                    | 型       | 説明                                                               |
|:----------------------------------------------|:---------|:-------------------------------------------------------------------|
| `user`                                        | Object   | ユーザー情報。                                                     |
| `user.externalUserID`                         | String   | ユーザーのCustomer User ID。                                       |
| `user.externalUserEmail`                      | String   | ユーザーのメールアドレス（利用可能な場合）。                       |
| `user.attributes`                             | Object   | カスタムユーザー属性。                                             |
| `device`                                      | Object   | デバイス情報。                                                     |
| `device.deviceUUID`                           | String   | AirbridgeのDevice UUID。                                           |
| `device.deviceModel`                          | String   | デバイスモデル（例: "iPhone 14 Pro"）。                            |
| `device.osName`                               | String   | OS名（例: "iOS"、"Android"）。                                     |
| `device.osVersion`                            | String   | OSバージョン。                                                     |
| `device.ifa`                                  | String   | **iOSのみ**。ID for Advertisers。                                  |
| `device.ifv`                                  | String   | **iOSのみ**。ID for Vendors。                                      |
| `device.gaid`                                 | String   | **Androidのみ**。Google Advertising ID。                           |
| `app`                                         | Object   | アプリ情報。                                                       |
| `app.packageName`                             | String   | アプリのパッケージ名 / バンドルID。                                |
| `app.version`                                 | String   | アプリのバージョン。                                               |
| `eventUUID`                                   | String   | Adaptyにおけるイベントの一意ID。                                   |
| `eventTimestamp`                              | Long     | イベントのタイムスタンプ（ミリ秒）。                               |
| `eventData`                                   | Object   | イベントの詳細。                                                   |
| `eventData.goal.category`                     | String   | Airbridgeのイベントカテゴリ（Adaptyイベントからマッピングされる）。 |
| `eventData.goal.semanticAttributes`           | Object   | 標準イベント属性。                                                 |
| `...semanticAttributes.transactionID`         | String   | ストアのTransaction ID。                                           |
| `...semanticAttributes.totalValue`            | Float    | 売上金額。                                                         |
| `...semanticAttributes.currency`              | String   | 通貨コード（例: "USD"）。                                          |
| `...semanticAttributes.period`                | String   | ISO 8601の期間形式によるサブスクリプション期間（例: "P1M"）。      |
| `...semanticAttributes.isRenewal`             | Boolean  | 更新トランザクションの場合は `true`。                              |
| `...semanticAttributes.renewalCount`          | Integer  | 成功した更新回数。                                                 |
| `...semanticAttributes.products`              | Array    | イベントに関与するプロダクトのリスト。                             |
| `...semanticAttributes.products[].productID`  | String   | ストアのプロダクトID（例: "yearly.premium.6999"）。                |
| `...semanticAttributes.products[].name`       | String   | `productID` と同じ。                                               |
| `...semanticAttributes.products[].position`   | Integer  | リスト内のプロダクトの位置（常に1）。                              |