diff --git a/src/content/docs/ja/sdk/cordova/v5/features/subscriptions.mdx b/src/content/docs/ja/sdk/cordova/v5/features/subscriptions.mdx index 3e4695cf4..657469cae 100644 --- a/src/content/docs/ja/sdk/cordova/v5/features/subscriptions.mdx +++ b/src/content/docs/ja/sdk/cordova/v5/features/subscriptions.mdx @@ -1,37 +1,36 @@ --- -title: サブスクリプション情報を送信する -description: Adjustにサブスクリプション情報を送信するには、これらのメソッドを使用してください。 -slug: ja/sdk/cordova/features/subscriptions -versions: - - label: v5 - value: v5 - default: true - - label: v4 - value: v4 -redirects: - v4: /ja/sdk/cordova/v4/features/subscriptions +title: "サブスクリプション情報を送信する" +description: "Adjustにサブスクリプション情報を送信するには、これらのメソッドを使用してください。" +slug: "en/sdk/cordova/features/subscriptions" +versions: + - + label: "v5" + value: "v5" + default: true + - + label: "v4" + value: "v4" +redirects: + v4: "/en/sdk/cordova/v4/features/subscriptions" --- + - - -以下の手順は、Adjust SDK内でサブスクリプション計測を行う場合にのみ有効です。この機能を有効化するには、[アプリにサブスクリプションを設定](https://help.adjust.com/ja/article/set-up-subscriptions-for-your-app)の手順に従ってください。 - - +以下の手順は、Adjust SDK内でサブスクリプション計測を行う場合にのみ有効です。この機能を有効化するには、[アプリにサブスクリプションを設定](https://help.adjust.com/en/article/set-up-subscriptions-for-your-app)の手順に従ってください。 + App StoreおよびPlay Storeのサブスクリプションを計測し、それぞれの有効性をAdjust SDKで確認できます。ユーザーがサブスクリプションの購入を完了したら、その詳細を含む`AdjustAppStoreSubscription`または`AdjustPlayStoreSubscription`を作成してください。 -## 1\. サブスクリプションオブジェクトをインスタンス化する \{\#instantiate\-a\-subscription\-object\} +1\. サブスクリプションオブジェクトをインスタンス化する \{\#instantiate\-a\-subscription\-object\} +------------------------------------------------------------------------------- 開始するには、サブスクリプション購入の詳細を含むサブスクリプションオブジェクトを作成する必要があります。 - - - + ```ts constructor(price: string, currency: string, transactionId: string) ``` - + 以下のプロパティを含む`AdjustAppStoreSubscription`オブジェクトを作成します。 @@ -39,7 +38,7 @@ constructor(price: string, currency: string, transactionId: string) \| \-\-\-\-\-\-\-\-\-\-\-\-\-\-\- \| \-\-\-\-\-\-\-\-\- \| \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- \| \-\-\- \| \| `price` \| `string` \|サブスクリプションの価格 \| \| `currency` \| `string` \|サブスクリプションの通貨。 [`currencyCode`](https://developer.apple.com/documentation/foundation/nslocale/1642836-currencycode?language=objc)オブジェクトの[`priceLocale`](https://developer.apple.com/documentation/storekit/skproduct/1506145-pricelocale?language=objc)としてフォーマット\| -\| `transactionId` \| `string` \| トランザクションのためのID\| \| +\| `transactionId` \| `string` \| トランザクションのためのID\| \| ```js var subscription = new AdjustAppStoreSubscription( @@ -50,25 +49,24 @@ var subscription = new AdjustAppStoreSubscription( Adjust.trackAppStoreSubscription(subscription); ``` - - + ```ts constructor(price: string, currency: string, sku: string, orderId: string, signature: string, purchaseToken: string) ``` - + 以下のプロパティを含む`AdjustPlayStoreSubscription`オブジェクトを作成します。 -| パラメーター | データタイプ | 説明 | -| --------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `price` | `string` | サブスクリプションの価格 | -| `currency` | `string` | サブスクリプション通貨 | -| `sku` | `string` | プロダクトID | -| `orderId` | `string` | トランザクションID | -| `signature` | `string` | 購入データのシグネチャー | -| `purchaseToken` | `string` | トランザクションの一意のトークン。詳細は[Googleのドキュメント]()を参照してください | +| パラメーター | データタイプ | 説明 | +|-----------------|----------|-------------------------------------------------------------------------------------------------------------------------------------------------| +| `price` | `string` | サブスクリプションの価格 | +| `currency` | `string` | サブスクリプション通貨 | +| `sku` | `string` | プロダクトID | +| `orderId` | `string` | トランザクションID | +| `signature` | `string` | 購入データのシグネチャー | +| `purchaseToken` | `string` | トランザクションの一意のトークン。詳細は[Googleのドキュメント](https://developer.android.com/reference/com/android/billingclient/api/Purchase#getPurchaseToken())を参照してください | ```js var subscription = new AdjustPlayStoreSubscription( @@ -81,21 +79,18 @@ var subscription = new AdjustPlayStoreSubscription( ); ``` - - + -### 購入データを記録する {#record-the-purchase-date} +### 購入データを記録する \{\#record\-the\-purchase\-date\} ユーザーがサブスクリプションを購入した日を記録することができます。SDKはこのデータを返して、レポートします。 - - - + ```ts setTransactionDate(transactionDate: string): void ``` - + サブスクリプションオブジェクトで`setTransactionDate`メソッドを呼び出し、サブスクリプションのタイムスタンプを記録します。 @@ -110,14 +105,13 @@ subscription.setTransactionDate(transactionDate); Adjust.trackAppStoreSubscription(subscription); ``` - - + ```ts setPurchaseTime(purchaseTime: string): void ``` - + サブスクリプションオブジェクトで`setPurchaseTime`メソッドを呼び出し、サブスクリプションのタイムスタンプを記録します。 @@ -133,18 +127,17 @@ var subscription = new AdjustPlayStoreSubscription( subscription.setPurchaseTime(purchaseTime); ``` - - + -### 購入地域を記録する(iOSのみ) {#record-the-purchase-region-ios-only} +### 購入地域を記録する(iOSのみ) \{\#record\-the\-purchase\-region\-ios\-only\} - + ```ts setSalesRegion(salesRegion: string): void ``` - + ユーザーがサブスクリプションを購入した地域を記録することができます。これを行うには、subscriptionオブジェクトの`setSalesRegion`メソッドを呼び、国コードを`string`としてパスします。これは、[`Storefront`](https://developer.apple.com/documentation/storekit/storefront/3792000-countrycode)オブジェクトの[`countryCode`](https://developer.apple.com/documentation/storekit/storefront)としてフォーマットされる必要があります。 @@ -159,18 +152,16 @@ subscription.setSalesRegion(salesRegion); Adjust.trackPlayStoreSubscription(subscription); ``` -### コールバックパラメーターを追加する {#add-callback-parameters} +### コールバックパラメーターを追加する \{\#add\-callback\-parameters\} コールバックパラメーターをサブスクリプションオブジェクトに追加することができます。Adjustは、これらのパラメーターをコールバックURLに追加します。コールバックパラメーターを追加するには、サブスクリプションオブジェクトの`addCallbackParameter`メソッドを呼び出してください。このメソッドを複数回呼び出すことで、複数のコールバックパラメーターを追加できます。 - - - + ```ts addCallbackParameter(key: string, value: string): void ``` - + ```js var subscription = new AdjustAppStoreSubscription( @@ -187,14 +178,13 @@ subscription.addCallbackParameter("key2", "value2"); Adjust.trackAppStoreSubscription(subscription); ``` - - + ```ts addCallbackParameter(key: string, value: string): void ``` - + ```js var subscription = new AdjustPlayStoreSubscription( @@ -210,21 +200,18 @@ subscription.addCallbackParameter("key1", "value1"); subscription.addCallbackParameter("key2", "value2"); ``` - - + -### パートナーパラメーターを追加する {#add-partner-parameters} +### パートナーパラメーターを追加する \{\#add\-partner\-parameters\} パートナーパラメーターをサブスクリプションオブジェクトに追加することができます。SDKは、ユーザーがサブスクリプションを購入した時に、Adjustサーバーへこれらを送信します。Adjustサーバーは、その情報をネットワークパートナーに転送します。パラメーターパラメーターを追加するには、サブスクリプションオブジェクトの`addPartnerParameter`メソッドを呼び出してください。このメソッドを複数回呼び出すことで、複数のコールバックパラメーターを追加できます。 - - - + ```ts addPartnerParameter(key: string, value: string): void ``` - + ```js var subscription = new AdjustAppStoreSubscription( @@ -241,14 +228,13 @@ subscription.addPartnerParameter("key2", "value2"); Adjust.trackAppStoreSubscription(subscription); ``` - - + ```ts addPartnerParameter(key: string, value: string): void ``` - + ```js var subscription = new AdjustPlayStoreSubscription( @@ -264,21 +250,19 @@ subscription.addPartnerParameter("key1", "value1"); subscription.addPartnerParameter("key2", "value2"); ``` - - + -## 2\. サブスクリプション情報を記録する \{\#record\-subscription\-information\} +2\. サブスクリプション情報を記録する \{\#record\-subscription\-information\} +------------------------------------------------------------------ サブスクリプションオブジェクトを設定したら、Adjust SDKを使用して記録することが可能です。 - - - + ```ts trackAppStoreSubscription(adjustAppStoreSubscription: AdjustAppStoreSubscription): void ``` - + 完了したオブジェクトを `trackAppStoreSubscription`メソッドにパスして、ユーザーのサブスクリプション購入を記録します。 @@ -294,14 +278,13 @@ subscription.setSalesRegion(salesRegion); Adjust.trackAppStoreSubscription(subscription); ``` - - + ```ts trackPlayStoreSubscription(adjustPlayStoreSubscription: AdjustPlayStoreSubscription): void ``` - + 完了したオブジェクトを `trackPlayStoreSubscription`メソッドにパスして、ユーザーのサブスクリプション購入を記録します。 @@ -319,5 +302,5 @@ subscription.setPurchaseTime(purchaseTime); Adjust.trackPlayStoreSubscription(subscription); ``` - - + +