Purchasely
Rechercher…
Clevertap

Why combine CleverTap and Purchasely?

Pre-requisites

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 update it.
The CleverTap SDK also needs to be integrated inside the app.

Subscription events

General overview

CleverTap is an all-in-one platform combines the best analytics, segmentation, and engagement tools so that companies can build valuable, long-term relationships with their customers.
This integration will allow you to get all the available Purchasely events to CleverTap and get a better and deeper understanding of your subscription business and customer behavior. In addition you will be able to trigger automated communication based on those events, messages that could be linked to a Purchasely powered paywall to engage, upsell, retain customers.
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 CleverTap .
Subscription events generated by Purchasely will be sent to CleverTap using a server-to-server integration. As a result, you will be able to see all the subscription events in your CleverTap Dashboard and map them with your acquisition campaigns.

Events

The following events are the main ones that can be sent to CleverTap by Purchasely. See the full list here.
Event
Description
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
SUBSCRIPTION_EXPIRED
Sent when the subscription actually ends
SUBSCRIPTION_REACTIVATED
Sent when an expired subscription is reactivated. This event is particularly useful for win-back & retargeting campaigns
SUBSCRIPTION_REFUNDED_REVOKED
Sent when the subscription actually ends
RENEWAL_DISABLED
Sent when the user deactivates the renewal of a subscription wether it is in trial period or not.
RENEWAL_ENABLED
Sent when the user reactivates
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-period
The names of events sent to CleverTap can be overriden when setting up the integration.

**Integrating Purchasely with CleverTap **

The integration requires 2 steps:
  1. 1.
    Associate the user to events by providing the CleverTap Distinct ID to the Purchasely SDK
  2. 2.
    Activate the CleverTap integration in the Purchasely Console

1. Associating users to events

See the CleverTap Documentation for more information
Swift
Kotlin
Java
React Native
1
CleverTap.autoIntegrate()
2
if let clevertapId = CleverTap.sharedInstance()?.profileGetID() {
3
Purchasely.setAttribute(.clevertapId, value: clevertapId)
4
}
Copied!
1
val cleverTap = CleverTapAPI.getDefaultInstance(applicationContext)
2
cleverTap?.cleverTapID?.let {
3
Purchasely.setAttribute(Attribute.CLEVER_TAP_ID, it)
4
}
Copied!
1
CleverTapAPI cleverTap = CleverTapAPI.getDefaultInstance(getApplicationContext());
2
if(cleverTap.getCleverTapID() != null) {
3
Purchasely.setAttribute(Attribute.CLEVER_TAP_ID, cleverTap.getCleverTapID());
4
}
Copied!
1
CleverTap.getCleverTapID((err, res) => {
2
Purchasely.setAttribute(Attributes.CLEVER_TAP_ID, res);
3
});
Copied!

2. Activating the CleverTap integration

The activation requires 3 steps:
  1. 1.
    Retrieving your account's region from the CleverTap Dashboard
  2. 2.
    Retrieving your account's ID and passcode from the CleverTap Dashboard
  3. 3.
    Enabling the CleverTap integration in the Purchasely Console

a. Retrieving your account's region from the CleverTap Dashboard

  1. 1.
    Follow the CleverTap documentation and retrieve your account's region
  2. 2.
    Write down your account's region

b. Retrieving your account's id and passcode from the CleverTap Dashboard

  1. 1.
    Follow the CleverTap documentation and retrieve your account's ID and passcode
  2. 2.
    Write down your account's ID and passcode

c. Enabling the CleverTap integration in the Purchasely Consolec

  1. 1.
    Go in the "External integrations" section, and open the edition form for CleverTap :
2. Enable the integration
3. Set your CleverTap region
4. Set your CleverTap account ID
5. Set your CleverTap account passcode
Could not load image
6. Enable the events you want to be sent to CleverTap
7. (Optional) Override the names of the events that will be sent to CleverTap
8. Save

Testing 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) and verify your events are received in the CleverTap dashboard https://mixpanel.com/login/.
//TODO: Thomas (is it appropriate)
If testing using Automated Messages, bear in mind that CleverTap automated messages are sent roughly every 4-6 hours if you are on a free plan, and within a few minutes if you are on a paid plan.