---
title: "Pushwoosh"
description: "AdaptyとPushwooshを統合して、プッシュ通知のトラッキングをシームレスに実現しましょう。"
---

Adaptyはサブスクリプションイベントを使用して[Pushwoosh](https://www.pushwoosh.com/)のプロファイルタグを更新します。以下に説明する簡単なインテグレーション設定を行うことで、プッシュ通知を活用した顧客へのターゲットコミュニケーションが可能になります。

## Pushwoosh インテグレーションの設定方法 \{#how-to-set-up-pushwoosh-integration\}

Pushwoosh との連携を設定するには、[**Integrations** -> **Pushwoosh**](https://app.adapty.io/integrations/pushwoosh) に移動してトグルをオンにし、各フィールドを入力してください。

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

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

1. **App ID** はPushwooshのダッシュボードで確認できます。

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

2. **Auth token** はPushwoosh の設定画面にある「API Access」セクションで確認できます。

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

## イベントとタグ \{#events-and-tags\}

認証情報の下には、AdaptyからPushwooshに送信できるイベントのグループが3つあります。必要なものをオンにするだけです。Pushwooshに送信するイベント名は変更することもできます。Adaptyが提供するイベントの全リストは[こちら](events)でご確認ください。

  <img src="/assets/shared/img/392dc31-screencapture-app-adapty-io-integrations-pushwoosh-2023-08-22-13_31_07.webp"
  style={{
    border: '1px solid #727272', /* border width and color */
    width: '700px', /* image width */
    display: 'block', /* for alignment */
    margin: '0 auto' /* center alignment */
  }}
/>

Adaptyはサーバー間インテグレーションを使用してPushwooshにサブスクリプションイベントを送信するため、Pushwooshダッシュボードですべてのサブスクリプションイベントを確認できます。

:::note
カスタムタグ

AdaptyではPushwooshインテグレーションにカスタムタグを使用することもできます。以下のタグ一覧を参照して、用途に合ったタグをお選びください。
:::

| タグ | タイプ | 値 |
|---|----|-----|
| `adapty_customer_user_id` | String | Pushwoosh側で確認できるユーザーの一意の識別子の値を含みます。 |
| `adapty_profile_id` | String | Adaptyの[ダッシュボード](profiles-crm)で確認できるユーザーのAdaptyプロファイルIDの値を含みます。 |
| `environment` | String | <p>ユーザーがサンドボックス環境または本番環境のいずれで操作しているかを示します。</p><p></p><p>値は `Sandbox` または `Production` のいずれかです。</p> |
| `store` | String | <p>購入に使用されたストアの名前を含みます。</p><p></p><p>設定可能な値：</p><p>`app_store` または `play_store`</p> |
| `vendor_product_id` | String | <p>Apple/GoogleストアのプロダクトIDの値を含みます。</p><p></p><p>例：org.locals.12345</p> |
| `subscription_expires_at` | String | <p>最新のサブスクリプションの有効期限日を含みます。</p><p></p><p>値の形式：</p><p>year-month dayThour:minute:second</p><p>例：2023-02-10T17:22:03.000000+0000</p> |
| `last_event_type` | String | インテグレーションで有効化した標準の[Adaptyイベント](events)の中で、最後に受信したイベントの種類を示します。 |
| `purchase_date` | String | <p>最後のトランザクション（初回購入または更新）の日付を含みます。</p><p></p><p>値の形式：</p><p>year-month dayThour:minute:second</p><p>例：2023-02-10T17:22:03.000000+0000</p> |
| `original_purchase_date` | String | <p>トランザクションに基づく最初の購入日を含みます。</p><p></p><p>値の形式：</p><p>year-month dayThour:minute:second</p><p>例：2023-02-10T17:22:03.000000+0000</p> |
| `active_subscription` | String | 購入または更新イベント時に `true`、サブスクリプションが期限切れの場合は `false` に設定されます。 |
| `period_type` | String | <p>購入または更新の最新の期間タイプを示します。</p><p></p><p>設定可能な値：</p><p>トライアル期間の場合は `trial`、それ以外は `normal`</p> |

すべての浮動小数点値は整数に丸められます。文字列はそのまま維持されます。

定義済みのタグ一覧に加えて、タグを使用して[カスタム属性](segments#custom-attributes)を送信することも可能です。これにより、タグに含めるデータの種類の柔軟性が高まり、プロダクトやサービスに関連する特定の情報のトラッキングに役立ちます。**Send user custom attributes** チェックボックスを[インテグレーションページ](https://app.adapty.io/integrations/pushwoosh)でオンにすると、すべてのカスタムユーザー属性が自動的にPushwooshに送信されます。

## SDK の設定 \{#sdk-configuration\}

AdaptyとPushwooshを連携するには、`HWID` の値を送信する必要があります：

<Tabs groupId="current-os" queryString>
<TabItem value="swift" label="iOS (Swift)" default>
```swift showLineNumbers
do {
    try await Adapty.setIntegrationIdentifier(
        key: "pushwoosh_hwid", 
        value: Pushwoosh.sharedInstance().getHWID()
    )
} catch {
    // handle the error
}
```
</TabItem>
<TabItem value="kotlin" label="Android (Kotlin)" default>
```kotlin showLineNumbers
Adapty.setIntegrationIdentifier("pushwoosh_hwid", Pushwoosh.getInstance().hwid) { error ->
    if (error != null) {
        // handle the error
    }
}
```
</TabItem>
<TabItem value="java" label="Android (Java)" default>
```java showLineNumbers
Adapty.setIntegrationIdentifier("pushwoosh_hwid", Pushwoosh.getInstance().getHwid(), error -> {
    if (error != null) {
        // handle the error
    }
});
```
</TabItem>
<TabItem value="flutter" label="Flutter (Dart)" default>
```javascript showLineNumbers

final hwid = await Pushwoosh.getInstance.getHWID;

try {
    await Adapty().setIntegrationIdentifier(
        key: "pushwoosh_hwid", 
        value: hwid,
    );
} on AdaptyError catch (adaptyError) {
    // handle the error
} catch (e) {
    // handle the error
}
```
</TabItem>
<TabItem value="unity" label="Unity (C#)" default>
```csharp showLineNumbers
using AdaptySDK;

Adapty.SetIntegrationIdentifier(
  "pushwoosh_hwid", 
  Pushwoosh.Instance.HWID, 
  (error) => {
  // handle the error
});
```
</TabItem>
<TabItem value="rn" label="React Native (TS)" default>
```typescript showLineNumbers

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