Iterable
The Iterable integration is available to all users signed up after September '23, the legacy Grow and Pro plans, and Enterprise plans. If you're on a legacy Free or Starter plan and want to access this integration, migrate to our new pricing via your billing settings.
Iterable can be a helpful integration tool in understanding what stage a customer is in and reacting accordingly. Iterable is a cross-channel platform that powers unified customer experiences and empowers marketers to create, optimize and measure every interaction taking place throughout the customer journey. With Iterable, brands create individualized marketing touch points that earn engagement, solidify trust and galvanize loyal consumer-brand relationships.
With our Iterable integration, you can:
- Create an event to track unsubscribes that automatically triggers an email to users who cancel.
- Start a campaign to send users who have been with you for over a certain length of time a discount code for being a loyal customer.
With accurate and up-to date subscription data in Iterable, you’ll be set to turbocharge your users’ engagement ⚡️
Integration at a Glance
Includes Revenue | Supports Negative Revenue | Sends Sandbox Events | Includes Customer Attributes | Sends Transfer Events | Optional Event Types |
---|---|---|---|---|---|
✅ | ✅ | Requires API Key | ✅ | ❌ | non_subscription_purchase_event uncancellation_event subscription_paused_event expiration_event billing_issue_event product_change_event |
Events
The Iterable integration tracks the following events:
RevenueCat Event Type | Iterable Event Type | Default Event Name | Description | App Store | Play Store | Amazon | Stripe | Promo |
---|---|---|---|---|---|---|---|---|
Initial Purchase | Purchase | rc_initial_purchase_event | A new subscription has been purchased. | ✅ | ✅ | ✅ | ✅ | ❌ |
Trial Started | Purchase | rc_trial_started_event | The start of an auto-renewing subscription product free trial. | ✅ | ✅ | ✅ | ✅ | ❌ |
Trial Converted | Purchase | rc_trial_converted_event | When an auto-renewing subscription product converts from a free trial to normal paid period. | ✅ | ✅ | ✅ | ✅ | ❌ |
Trial Cancelled | Custom | rc_trial_cancelled_event | When a user turns off renewals for an auto-renewing subscription product during a free trial period. | ✅ | ✅ | ✅ | ✅ | ❌ |
Renewal | Purchase | rc_renewal_event | An existing subscription has been renewed or a lapsed user has resubscribed. | ✅ | ✅ | ✅ | ✅ | ❌ |
Cancellation | Custom | rc_cancellation_event | A subscription or non-renewing purchase has been cancelled. See cancellation reasons for more details. | ✅ | ✅ | ✅ | ✅ | ✅ |
Uncancellation | Custom | rc_uncancellation_event | A non-expired cancelled subscription has been re-enabled. | ✅ | ✅ | ✅ | ❌ | ❌ |
Non Subscription Purchase | Purchase | rc_non_subscription_purchase_event | A customer has made a purchase that will not auto-renew. | ✅ | ✅ | ✅ | ✅ | ✅ |
Subscription Paused | Custom | rc_subscription_paused_event | A subscription has been paused. | ❌ | ✅ | ❌ | ❌ | ❌ |
Expiration | Custom | rc_expiration_event | A subscription has expired and access should be removed. If you have Platform Server Notifications configured, this event will occur as soon as we are notified (within seconds to minutes) of the expiration. | ✅ | ✅ | ✅ | ✅ | ✅ |
Billing Issue | Custom | rc_billing_issue_event | There has been a problem trying to charge the subscriber. This does not mean the subscription has expired. Can be safely ignored if listening to CANCELLATION event + cancel_reason=BILLING_ERROR. | ✅ | ✅ | ✅ | ✅ | ❌ |
Product Change | Custom | rc_product_change_event | A subscriber has changed the product of their subscription. This does not mean the new subscription is in effect immediately. See Managing Subscriptions for more details on updates, downgrades, and crossgrades. | ✅ | ✅ | ❌ | ✅ | ❌ |
For events that have revenue, such as trial conversions and renewals, RevenueCat will automatically record this amount along with the event in Iterable.
Setup
1. Set Iterable User Identity
In order to associate RevenueCat data with the Iterable User Profile, either the RevenueCat $email
or $iterableUserId
Attribute should be set in RevenueCat. The preferred method is to send the $email
attribute. If neither of these fields exist, RevenueCat will fallback to the RevenueCat app user ID. You can read more about Iterable user profiles in Iterable's Identifying the User documentation.
The $iterableUserId
can be up to 52 characters long.
(optional) Set Iterable Campaign ID and/or Template ID
To attribute an event to an Iterable Campaign ID and/or Template ID, set the $iterableCampaignId
and/or $iterableTemplateId
attributes through the RevenueCat SDK or REST API.
- Swift
- Obj-C
- Java
- React Native
- Code
// Configure Purchases
Purchases.configure(this, "public_sdk_key", "my_app_user_id")
// Initialize Iterable
IterableAPI.initialize(apiKey: "<YOUR_API_KEY>", launchOptions: launchOptions, config: config)
// Setting Iterable email or userId
IterableAPI.email = "user@example.com"
IterableAPI.userId = "user123"
// Set $email or $iterableUserId, (optional) $iterableCampaignId, $iterableTemplateId
Purchases.shared.attribution.setAttributes(["$email": IterableAPI.email,
"$iterableUserId": IterableAPI.userId,
"$iterableCampaignId": "123",
"$iterableTemplateId": "123"])
// Configure Purchases
[RCPurchases configureWithAPIKey:@"public_sdk_key"];
// Initialize Iterable
[IterableAPI initializeWithApiKey:@"<YOUR_API_KEY>" launchOptions:launchOptions config:config]
// Setting Iterable email or userId
IterableAPI.email = @"user@example.com";
IterableAPI.userId = @"user123";
// Set $email or $iterableUserId, (optional) $iterableCampaignId, $iterableTemplateId
[[RCPurchases sharedPurchases] setAttributes:@{
@"$email": IterableAPI.email,
@"iterableUserId": IterableAPI.userId ,
@"$iterableCampaignId": @"123",
@"$iterableTemplateId": @"123"
}];
// Configure Purchases
Purchases.configure(new PurchasesConfiguration.Builder(this, "public_google_sdk_key").build());
// Initialize Iterable
IterableApi.initialize(context, "<YOUR_API_KEY>", config);
// Setting Iterable email or userId
IterableApi.getInstance().setEmail("user@example.com");
IterableApi.getInstance().setUserId("user123");
// Set $email or $iterableUserId, (optional) $iterableCampaignId, $iterableTemplateId
Map<String, String> attributes = new HashMap<String, String>();
attributes.put("$email", IterableApi.getInstance().getEmail());
attributes.put("$iterableUserId", IterableApi.getInstance().getUserId());
attributes.put("$iterableCampaignId", "123");
attributes.put("$iterableTemplateId", "123");
Purchases.getSharedInstance().setAttributes(attributes);
// Configure Purchases
if (Platform.OS === 'ios') {
await Purchases.configure({apiKey: <public_ios_sdk_key>});
} else if (Platform.OS === 'android') {
await Purchases.configure({apiKey: <public_google_sdk_key>});
// OR: if building for Amazon, be sure to follow the installation instructions then:
await Purchases.configure({apiKey: <public_amazon_sdk_key>, useAmazon: true });
}
// Initialize Iterable
Iterable.initialize(<YOUR_API_KEY>, config);
// Setting Iterable email or userId
Iterable.setEmail("user@example.com");
Iterable.setUserId("user123");
// Set $email or $iterableUserId, (optional) $iterableCampaignId, $iterableTemplateId
Iterable.getEmail().then(email => {
console.log("Current email: " + email);
Purchases.setAttributes({ "$email" : email });
});
Iterable.getUserId().then(userId => {
console.log("Current userId: " + userId);
Purchases.setAttributes({ "$iterableUserId" : userId });
});
Purchases.setAttributes({ "$iterableCampaignId" : "123", "$iterableTemplateId" : "123" });
curl --request POST \
--url https://api.revenuecat.com/v1/subscribers/app_user_id/attributes \
--header 'Authorization: Bearer ' \
--header 'Content-Type: application/json' \
--data \
'{
"attributes" : {
"$iterableCampaignId": {
"value": "123"
},
"$iterableTemplateId": {
"value": "123"
}
}
}'
2. Send RevenueCat Events to Iterable
After you've set up the Purchase SDK and Iterable SDK to have the same user identity, you can "turn on" the integration and configure the event names from the RevenueCat dashboard.
- Navigate to your app in the RevenueCat and find the Integrations card in the left menu. Select + New
- Choose Iterable from the Integrations menu
- Add your Iterable Server-side API key to the API key field in RevenueCat
- Enter the event names that RevenueCat will send or choose the default event names
- Select whether you want sales reported as gross revenue (before app store commission), or after store commission and/or estimated taxes.
Iterable recommends having a production and sandbox project to separate live and testing environments. You can input both keys in the RevenueCat Iterable settings page.
Testing the Iterable integration
Make a sandbox purchase with a new user
Simulate a new user installing your app, and go through your app flow to complete the sandbox purchase.
Check that the Iterable event delivered successfully
While still on the Customer View, select the purchase event in the Customer History page and make sure that the Iterable integration event exists and was delivered successfully.
Check Iterable dashboard for the delivered event
Navigate to your Iterable dashboard > Insights > Logs. To find Purchase events navigate to 'Purchases' and to find Custom events navigate to 'Events'. You will see events RevenueCat has dispatched to the Iterable under 'Purchase Log' and 'Events log' respectively.
Sample Events
Below are sample JSONs that are delivered to Iterable for events.
- Initial Purchase
- Trial Started
- Trial Converted
- Trial Cancelled
- Renewal
- Cancellation
- Uncancellation
{
"id": "12345678-1234-1234-1234-123456789012",
"total": 29.99,
"user": {
"userId": "$RCAnonymousID:87c6049c58069238dce29853916d624c",
"preferUserId": true,
"dataFields": {
"subscriber_attributes": {},
"app_user_id": "$RCAnonymousID:87c6049c58069238dce29853916d624c",
"original_app_user_id": "$RCAnonymousID:87c6049c58069238dce29853916d624c"
}
},
"items": [
{
"id": "premium_freetrial",
"name": "rc_initial_purchase_event",
"price": 29.99,
"quantity": 1,
"dataFields": {
"country_code": "US",
"currency": "USD",
"entitlement_ids": [
"premium"
],
"expiration_at_ms": 1683233732021,
"environment": "PRODUCTION",
"is_family_share": false,
"offer_code": null,
"period_type": "NORMAL",
"presented_offering_id": null,
"store": "PLAY_STORE",
"takehome_percentage": 0.85,
"original_transaction_id": "GPA.1234-5678-9012-34567"
}
}
],
"createdAt": 1651691577776
}
{
"id": "12345678-1234-1234-1234-123456789012",
"total": 0,
"user": {
"userId": "$RCAnonymousID:87c6049c58069238dce29853916d624c",
"preferUserId": true,
"dataFields": {
"subscriber_attributes": {},
"app_user_id": "$RCAnonymousID:87c6049c58069238dce29853916d624c",
"original_app_user_id": "$RCAnonymousID:87c6049c58069238dce29853916d624c"
}
},
"items": [
{
"id": "annual_sub_1week_trial",
"name": "rc_trial_started_event",
"price": 0,
"quantity": 1,
"dataFields": {
"country_code": "US",
"currency": "USD",
"entitlement_ids": null,
"expiration_at_ms": 1644623383000,
"environment": "SANDBOX",
"is_family_share": false,
"offer_code": null,
"period_type": "TRIAL",
"presented_offering_id": "default",
"store": "APP_STORE",
"takehome_percentage": 0.7,
"original_transaction_id": "123456789012345"
}
}
],
"createdAt": 1644623203000
}
{
"id": "12345678-1234-1234-1234-123456789012",
"total": 29.99,
"user": {
"userId": "$RCAnonymousID:87c6049c58069238dce29853916d624c",
"preferUserId": true,
"dataFields": {
"subscriber_attributes": {},
"app_user_id": "$RCAnonymousID:87c6049c58069238dce29853916d624c",
"original_app_user_id": "$RCAnonymousID:87c6049c58069238dce29853916d624c"
}
},
"items": [
{
"id": "annual_sub",
"name": "rc_trial_converted_event",
"price": 29.99,
"quantity": 1,
"dataFields": {
"country_code": "US",
"currency": "USD",
"entitlement_ids": null,
"expiration_at_ms": 1644626983000,
"environment": "SANDBOX",
"is_family_share": false,
"offer_code": null,
"period_type": "NORMAL",
"presented_offering_id": "default",
"store": "APP_STORE",
"takehome_percentage": 0.7,
"original_transaction_id": "123456789012345"
}
}
],
"createdAt": 1644623383000
}
{
"createdAt": 1663964010781,
"dataFields": {
"app_id": "app1234567890",
"event_properties": {
"cancel_reason": "BILLING_ERROR",
"environment": "PRODUCTION",
"expiration_at_ms": 1664050410466,
"original_transaction_id": "GPA.1234-5678-9012-34567",
"period_type": "TRIAL",
"product_id": "annual_sub_1week_trial",
"store": "PLAY_STORE",
"transaction_id": "GPA.1234-5678-9012-34567",
}
},
"email": null,
"eventName": "rc_trial_cancelled_event",
"id": "12345678-1234-1234-1234-123456789012",
"userId": "$RCAnonymousID:87c6049c58069238dce29853916d624c",
}
{
"id": "12345678-1234-1234-1234-123456789012",
"total": 29.99,
"user": {
"userId": "$RCAnonymousID:87c6049c58069238dce29853916d624c",
"preferUserId": true,
"dataFields": {
"subscriber_attributes": {
"$email": {
"value": "first_last@gmail.com",
"updated_at_ms": 1644624942354
},
"$iterableCampaignId": {
"value": "01234",
"updated_at_ms": 1644634297590
},
"$iterableTemplateId": {
"value": "5678",
"updated_at_ms": 1644634301306
}
},
"app_user_id": "$RCAnonymousID:87c6049c58069238dce29853916d624c",
"original_app_user_id": "$RCAnonymousID:87c6049c58069238dce29853916d624c"
},
"email": "first_last@gmail.com"
},
"items": [
{
"id": "annual_sub",
"name": "rc_renewal_event",
"price": 29.99,
"quantity": 1,
"dataFields": {
"country_code": "US",
"currency": "USD",
"entitlement_ids": null,
"expiration_at_ms": 1644648719000,
"environment": "SANDBOX",
"is_family_share": false,
"offer_code": null,
"period_type": "NORMAL",
"presented_offering_id": "default",
"store": "APP_STORE",
"takehome_percentage": 0.7,
"original_transaction_id": "123456789012345"
}
}
],
"createdAt": 1644645119000,
"campaignId": "01234",
"templateId": "5678"
}
{
"createdAt": 1663963037855,
"dataFields": {
"app_id": "app1234567890",
"event_properties": {
"cancel_reason": "UNSUBSCRIBE",
"environment": "PRODUCTION",
"expiration_at_ms": 1666381224082,
"original_transaction_id": "GPA.1234-5678-9012-34567",
"period_type": "NORMAL",
"product_id": "annual_sub",
"store": "PLAY_STORE",
"transaction_id": "GPA.1234-5678-9012-34567",
}
},
"email": null,
"eventName": "rc_cancellation_event",
"id": "12345678-1234-1234-1234-123456789012",
"userId": "$RCAnonymousID:87c6049c58069238dce29853916d624c",
}
{
"id": "12345678-1234-1234-1234-123456789012",
"eventName": "rc_uncancellation_event",
"userId": "$RCAnonymousID:87c6049c58069238dce29853916d624c",
"dataFields": {
"event_properties": {
"environment": "SANDBOX",
"expiration_at_ms": 1646073127000,
"original_transaction_id": "123456789012345",
"period_type": "NORMAL",
"product_id": "annual_sub",
"store": "APP_STORE",
"transaction_id": "123456789012345",
"email": "first_last@gmail.com"
}
},
"createdAt": 1646069715718,
"campaignId": "0123",
"templateId": "4564"
}
- Non Subscription Purchase
- Subscription Paused
- Expiration
- Billing Issues
- Product Change
{
"id": "12345678-1234-1234-1234-123456789012",
"total": 4.99,
"user": {
"userId": "$RCAnonymousID:87c6049c58069238dce29853916d624c",
"preferUserId": true,
"dataFields": {
"subscriber_attributes": {
"$email": {
"value": "first_last@gmail.com",
"updated_at_ms": 1659292070233
},
"$iterableUserId": {
"value": "12345A6B-C789-0D1E-FG23-456H6I7J890K",
"updated_at_ms": 1659292070233
},
},
"app_user_id": "$RCAnonymousID:87c6049c58069238dce29853916d624c",
"original_app_user_id": "$RCAnonymousID:87c6049c58069238dce29853916d624c"
},
"email": "first_last@gmail.com"
},
"items": [
{
"id": "100_tokens",
"name": "rc_non_subscription_purchase_event",
"price": 4.99,
"quantity": 1,
"dataFields": {
"country_code": null,
"currency": "USD",
"entitlement_ids": [
"pro"
],
"expiration_at_ms": 1659897848466,
"environment": "PRODUCTION",
"is_family_share": null,
"offer_code": null,
"period_type": "NORMAL",
"presented_offering_id": null,
"store": "APP_STORE",
"takehome_percentage": 1.0,
"original_transaction_id": "123456789012345"
}
}
],
"createdAt": 1659293048466
}
{
"id": "12345678-1234-1234-1234-123456789012",
"email": null,
"eventName": "rc_subscription_paused_event",
"userId": "$RCAnonymousID:87c6049c58069238dce29853916d624c",
"dataFields": {
"event_properties": {
"environment": "PRODUCTION",
"expiration_at_ms": 1654366688509,
"original_transaction_id": "GPA.1234-5678-9012-34567",
"period_type": "NORMAL",
"product_id": "monthly_sub_trial",
"store": "PLAY_STORE",
"transaction_id": "GPA.1234-5678-9012-34567",
"auto_resumes_at": 1656951488509
}
},
"createdAt": 1651679019206
}
{
"createdAt": 1663963579936,
"dataFields": {
"app_id": "app1234567890",
"event_properties": {
"environment": "PRODUCTION",
"expiration_at_ms": 1663963579936,
"expiration_reason": "UNSUBSCRIBE",
"original_transaction_id": "GPA.1234-5678-9012-34567",
"period_type": "NORMAL",
"product_id": "weekly_sub",
"store": "PLAY_STORE",
"transaction_id": "GPA.1234-5678-9012-34567",
}
},
"email": null,
"eventName": "rc_expiration_event",
"id": "12345678-1234-1234-1234-123456789012",
"userId": "$RCAnonymousID:87c6049c58069238dce29853916d624c",
}
{
"createdAt": 1663964010781,
"dataFields": {
"app_id": "app1234567890",
"event_properties": {
"environment": "PRODUCTION",
"expiration_at_ms": 1664050410466,
"grace_period_expires_at": 1664580986800,
"original_transaction_id": "GPA.1234-5678-9012-34567",
"period_type": "TRIAL",
"product_id": "annual_sub_one_week_trial",
"store": "PLAY_STORE",
"transaction_id": "GPA.1234-5678-9012-34567",
}
},
"email": null,
"eventName": "rc_billing_issue_event",
"id": "12345678-1234-1234-1234-123456789012",
"userId": "$RCAnonymousID:87c6049c58069238dce29853916d624c",
}
{
"id": "12345678-1234-1234-1234-123456789012",
"email": null,
"eventName": "rc_product_change_event",
"userId": "$RCAnonymousID:87c6049c58069238dce29853916d624c",
"dataFields": {
"event_properties": {
"environment": "PRODUCTION",
"expiration_at_ms": 1652327468000,
"original_transaction_id": "123456789012345",
"period_type": "TRIAL",
"product_id": "annual_sub_trial",
"store": "APP_STORE",
"transaction_id": "123456789012345",
"new_product_id": "annual_sub_trial"
}
},
"createdAt": 1651722668000
}
Considerations
Refunds
Revenue for Iterable campaign reporting will not be accurate due to refund events. You can build custom workflows around a "refund" event and independently calculate the total revenue refunded for your campaigns.
Purchase event tracking
Iterable provides two event-tracking APIs:
- Track Purchase API: This aggregates all purchase-related events into a single purchase event for tracking overall revenue. However, it does not distinguish between the types of purchase events (like initial purchases, trials, renewals, etc.).
- Track Custom Event API: While it allows for detailed tracking of individual purchase events, it doesn't support revenue tracking as that is exclusive to the Track Purchase API.
You have the flexibility to use one or both APIs depending on whether you need detailed insights into specific events or an aggregate revenue perspective.
Ensure Allow new custom events into the system is enabled in your Iterable project settings, or manually add all the event names you want to track as custom events to the Iterable project settings.
Learn more about tracking events with this integration in Iterable RevenueCat's documentation or Iterable's tracking docs.