Track subscriptions

Warning:
Adjust no longer offers this version of subscription recording for new customers. If you are already set up with subscription recording, reach out to your dedicated Technical Account Manager or support@adjust.com for support.
Note:
This feature requires Adjust SDK v4.22.0 and later.

You can track Play Store subscriptions and verify their validity with the Adjust SDK. After a user has purchased a subscription, make the following call to the Adjust SDK:

Java
AdjustPlayStoreSubscription subscription = new AdjustPlayStoreSubscription(
    price,
    currency,
    sku,
    orderId,
    signature,
    purchaseToken);
subscription.setPurchaseTime(purchaseTime);

Adjust.trackPlayStoreSubscription(subscription);

Parameters

You can also pass callback parameters and partner parameters back to the Adjust backend using the AdjustPlayStoreSubscription.addCallbackParameter and AdjustPlayStoreSubscription.addPartnerParameter methods respectively.

Java
subscription.addCallbackParameter("key", "value");
subscription.addCallbackParameter("foo", "bar");
Java
subscription.addPartnerParameter("key", "value");
subscription.addPartnerParameter("foo", "bar");

When you have set up your subscription instance, you can track it by calling the Adjust.trackPlayStoreSubscription method:

Java
AdjustPlayStoreSubscription subscription = new AdjustPlayStoreSubscription(
    price,
    currency,
    sku,
    orderId,
    signature,
    purchaseToken);
subscription.setPurchaseTime(purchaseTime);

subscription.addCallbackParameter("key", "value");
subscription.addCallbackParameter("foo", "bar");

subscription.addPartnerParameter("key", "value");
subscription.addPartnerParameter("foo", "bar");

Adjust.trackPlayStoreSubscription(subscription);