Adjust

This section describes how to integrate Adjust with Purchasely

Overview

Adjust is one of the leading MMP (Mobile Measurement Partner): a third-party attribution company that collects, organizes, and presents data from marketing campaigns in order to provide brands with a unified view of their campaign performance.

This integration will allow you to track your subscriptions and in-app purchases events in your Adjust Dashboard.

Purchasely provides a unified dataset to track the subscription events for all stores. These events are generated by the Purchasely Backend and can be sent to Adjust.

Subscription events generated by Purchasely will be sent to Adjust using a server-to-server integration. As a result, you will be able to see all the subscription events in your Adjust Dashboard and map them with your acquisition campaigns.

The following events can be sent from Purchasely to Adjust to track your subscribers and associate them to you campaigns. You can find the full list here.

SUBSCRIPTION_STARTED: Sent when the user purchased a product wether it is the start of a trial or a regular purchase of a consumable product.

SUBSCRIPTION_RENEWED: Sent when a subscription renews

TRIAL_STARTED: Sent when a trial starts

TRIAL_CONVERTED: Sent when a user converts from a free trial to a normal paid-period

TRIAL_NOT_CONVERTED: Sent when a user finishes it's trial period without renewing to a paid-periodYou can also override an event's token for each store, individually, provided you h

PURCHASE_VALIDATED: Sent when a user purchases a one-time purchase (consumable or not consumable)

SUBSCRIPTION_REACTIVATED: Sent when an expired subscription is reactivated. This event is particularly useful for win-back & retargeting campaigns

SUBSCRIPTION_REFUNDED_REVOKED: Sent when a subscription is refunded

Subscription events need to be mapped with an Adjust Token. If an event does not have an associated [adjust event token], it will not be sent.

for more details see §2. Creating your Adjust event tokens in the Adjust Console.

Integration

The integration of Adjust requires 3 steps:

  1. Associate the user to events by providing the Adjust ID to the Purchasely SDK
  2. Create the Adjust event token in the Adjust Console
  3. Activate the Adjust integration in the Purchasely Console

🚧

Version compatibility

The minimal version of the Purchasely SDK supporting this integration is v3.2.0.

If the Purchasely SDK integrated in your app is under the minimal version, please upgrade it.

The Adjust SDK also needs to be integrated inside the app.

1. Associating users to events

let adid = Adjust.adid()
Purchasely.setAttribute(.adjustId, value: String(adid))
Purchasely.setAttribute(Attribute.ADJUST_ID, Adjust.getDefaultInstance().getAdid().toString())
Purchasely.setAttribute(Attributes.ADJUST_ID, Adjust.getAdid());
Purchasely.setAttribute(PLYAttribute.adjust_id, "adjust_user_id");
Purchasely.setAttribute(Purchasely.Attribute.ADJUST_ID, Adjust.getAdid());
private PurchaselyRuntime.Purchasely _purchasely;

_purchasely.SetAttribute(PLYAttribute.ADJUST_ID, "test_adjust_id");

2. Creating your event tokens in the Adjust Console

Adjust works with a system of token to track all kind of events (both server and front). These events need to be created in the Adjust Dashboard.

  1. Log into your Adjust dashboard: https://dash.adjust.com/#/login
  2. Access your app’s details using the triangle button
  1. Go to your app’s parameters
  1. Access the Events section
  1. Create your new token. Remember that you can set a token for each Purchasely event, and that each Purchasely event’s token can be overridden for one or all of the stores your app is available on.

📘

Keep in mind

You will need to repeat the procedure for each event.

3. Activating the Adjust integration

The activation requires 3 steps:

  1. Retrieving your app token in the Adjust Dashboard
  2. Retrieving your app authentication token in the Adjust Dashboard
  3. Enabling the Adjust integration in the Purchasely Console

Retrieving your app token in the Adjust Dashboard

  1. Log into your Adjust dashboard: https://dash.adjust.com/#/login
  2. Access your app’s details using the triangle button
  1. Your app’s app token is at the top

Retrieving your app authentication token (optional)

This step is optional but we strongly advise to activate it as it allows to secure and authenticate the integration between Purchasely and Adjust servers.

  1. Log into your Adjust dashboard: https://dash.adjust.com/#/login
  2. Access your app’s details using the triangle button
  1. Go to your app’s parameters

  2. Access the S2S security section

  1. Create a new token and name it

Enabling the Adjust integration in the Purchasely Console

  1. Go in the "External integrations" section, and open the edition form for Adjust:
  1. Enable the integration
  2. Set your Adjust app token
  3. (Optional): Set your Adjust app authentication token

  1. Set the Adjust event token for each event you wish to receive in Adjust

  2. (Optional) Set store specific Adjust event tokens for some or all of your events.

  1. Save

Test your integration

To test your integration, you can perform a set of in-app purchases in a Sandbox environment (eg: TestFlight for the App Store).

If you do so, you will need to create a view in your Adjust Dashboard and check the Sandbox mode.

📘

Keep in mind

The views in the Adjust Dashboard are not fed in real time and it usually takes a couple of hours before the data is updated.


What’s Next

Learn how to integrate Appsflyer with Purchasely