Revenue Cat is an in-app subscription platform that lets you analyze and grow your cross-platform app subscriptions.
RudderStack supports Revenue Cat as a destination to which you can seamlessly send your event data.
Getting started
Before configuring Revenue Cat as a destination in RudderStack, verify if the source platform is supported by Revenue Cat by referring to the table below:
Connection Mode | Web | Mobile | Server |
---|---|---|---|
Device mode | - | - | - |
Cloud mode | Supported | Supported | Supported |
Once you have confirmed that the source platform supports sending events to Revenue Cat, follow these steps:
- From your RudderStack dashboard, add a source. Then, from the list of destinations, select Revenue Cat.
- Assign a name to the destination and click on Continue.
Connection settings
To successfully configure Revenue Cat as a destination, you will need to configure the following settings:
- Public API Key: Enter your Revenue Cat public API key.
For more information on getting your Revenue Cat public API key, refer to the FAQ section below.
- X-Platform: Select your app platform from the dropdown.
Identify
The identify
method lets you identify a user and associate them to their actions. It also lets you record any traits about them like their name, email, etc.
RudderStack uses the identify
call to create or update new subscribers in Revenue Cat. It maps userId
(a required trait in every event) to Revenue Cat's app_user_id
before sending the data via the subscribers
API.
A sample identify
call is shown below:
rudderanalytics.identify("1hKOmRA4GRlm",{ email: "alex@example.com", phone: "+1-202-555-0146",})
Traits mapping
RudderStack maps the following identify
traits to the corresponding Revenue Cat attributes:
RudderStack trait | Revenue Cat attribute |
---|---|
userId (Required) | app_user_id |
name | $displayName |
email | $email |
phone | $phoneNumber |
apnsTokens | $apnsTokens |
fcmTokens | $fcmTokens |
context.ip , request_ip | $ip |
appsflyerId | $appsflyerId |
iterableUserId | $iterableUserId |
mparticleId | $mparticleId |
onesignalId | $onesignalId |
airshipChannelId | $airshipChannelId |
clevertapId | $clevertapId |
The following identify
traits are also mapped to the corresponding Revenue Cat attributes:
Revenue Cat cannot modify these attributes so you must send them only once.
RudderStack trait | Revenue Cat attribute |
---|---|
idfa / advertisingId | $idfa |
idfv / device.id | $idfv |
gpsAdId | $gpsAdId |
advertisingId | $androidId |
campaign.name | $campaign |
creative | $creative |
keyword | $keyword |
mediaSource | $mediaSource |
ad | $ad |
addGroup | $adGroup |
adjustId | $adjustId |
fbAnonId | $fbAnonId |
iterableCampaignId | $iterableCampaignId |
iterableTemplateId | $iterableTemplateId |
mixpanelDistinctId | $mixpanelDistinctId |
amazonAdId | $amazonAdId |
The values for iterableCampaignId
and iterableTemplateId
must be valid non-negative, non-decimal integers. Otherwise, RudderStack will reject and skip these fields.
Track
The track
method lets you capture user events along with the properties associated with them.
A sample track
call is shown below:
rudderanalytics.track("Order Completed", { userId: "1hKOmRA4GRlm", currency: "USD", fetch_token: "12456", products: [{ product_id: "123454387", name: "Game", price: 15.99, introductory_price: "24", is_restore: true, presented_offering_identifier: "123", } ],});
Event mapping
RudderStack maps the Order Completed
event to Revenue Cat's Purchase
event before sending it across via the receipts
API. To do so, RudderStack requires the userId
(mapped to app_user_id
) and fetch_token
properties to be present in the event.
Property mapping
RudderStack maps the following event properties to the corresponding Revenue Cat attributes:
RudderStack property | Revenue Cat attribute | Comments |
---|---|---|
userId (Required) | app_user_id | - |
fetch_token (Required) | fetch_token | This must be a Base64 encoded receipt file for iOS, receipt token for Android, receipt for Amazon, and subscription token in case of Stripe. |
currency | currency | - |
payment_mode | payment_mode | - |
product_id , products.product_id | product_id | This is required for Google and should be the Apple, Google, or Amazon SKU or product identifier. |
price | price | - |
introductory_price | introductory_price | - |
is_restore | is_restore | - |
presented_offering_identifier | presented_offering_identifier | - |
FAQ
Where can I find the Revenue Cat public API key?
To find the Revenue Cat public API key, follow these steps:
- Log into your Revenue Cat dashboard.
- From the top navigation bar, go to Projects and select your app, as shown:
- Under Project settings, select API Keys. You will find your public API keys under Public app-specific API keys, as shown:
Contact us
For queries on any of the sections covered in this guide, you can, contact us or start a conversation in our Slack community.