Skip to main content
RevenueCat sends subscription, trial, and purchase events to DATALYR over a webhook. Link each subscriber to the SDK install and each purchase links back to the visit that drove it.

Connect

1

Open the source

Open Sources, find RevenueCat, and select connect.
2

Enter your Project ID

Paste the RevenueCat project ID (it starts with proj).
3

Enter your store app IDs

For iOS, add the bundle ID, the App Store ID (the number in your App Store URL), and the iOS app’s RevenueCat app ID. For Android, add the package name and the Android app’s RevenueCat app ID. RevenueCat app IDs start with app and are listed under Apps & providers in RevenueCat.
RevenueCat’s webhook names the RevenueCat app, not the bundle ID or package. We label events with your store app IDs only when they come from the RevenueCat app you entered, so another app in the same project is never mistaken for this one. Without these, conversion rules limited to mobile events on Meta, TikTok, and Snapchat skip every RevenueCat purchase, because we can’t confirm which app it came from.
4

Enter a webhook secret

Any strong random string works. You’ll paste the same value into RevenueCat next. Deliveries return HTTP 503 until a secret is stored.
5

Copy the webhook URL

6

Add the webhook in RevenueCat

In Project Settings → Integrations, paste the URL. Set the Authorization header to your secret. A Bearer prefix is fine either way.
Each subscriber must be linked to the SDK install that made the purchase. Without the link, the revenue has no campaign to credit, and App Store purchases can’t be sent to Meta or Snapchat as app events with the install’s device context. Set datalyr_id in every app. Binding is an extra link for campaign credit. Use iOS SDK 2.1.16 or React Native SDK 1.7.21, or later.

Set datalyr_id before the paywall

Set datalyr_id, and call identify() if the user has signed in, before you show the paywall. A purchase made before you set datalyr_id reaches DATALYR without it, and DATALYR cannot link it to the install. Register the attributes once with syncRevenueCatAttributes (iOS 2.1.19, React Native 1.8.0, or later):
Change the RevenueCat user first, then DATALYR. The other order writes the new datalyr_id to the previous subscriber.

Set the attributes yourself (older SDKs)

getRevenueCatAttributes() sets the datalyr_id subscriber attribute to the SDK’s anonymous ID, plus the stored attribution and device identifiers. To set only the ID:
Call it before the first paywall, and again after Purchases.logIn, after reset(), and after the App Tracking Transparency prompt.
Releases before iOS 2.1.16 and React Native 1.7.21 send the wrong ID. 2.1.12 to 2.1.14 and 1.7.17 to 1.7.19 sent an internal ID that never reached the server. Earlier versions send the key as $datalyrId, and RevenueCat strips any attribute name that starts with $, so the attribute never arrives. getRevenueCatAttributes() sends the correct key for you.

Bind the RevenueCat user ID

We resolve the visitor in this order, stopping at the first match: No match sets visitor_id to revenuecat_<original_app_user_id>. An event with no app user ID falls back to revenuecat_<original_transaction_id>, so unmatched buyers never merge into one person.

Event mapping

Twelve RevenueCat types produce fifteen DATALYR events. Three types split on a payload field. RevenueCat doesn’t have a refund type of its own. A granted refund shows up as CANCELLATION with cancel_reason set to CUSTOMER_SUPPORT, so that’s what we map. TEST events and unknown types return 200 and record nothing.

Revenue

Six events carry revenue: subscription_started, trial_converted, subscription_renewed, purchase, refund_reversed, refund. All others record 0, including trial_started. The event value is gross, before tax and store commission. Net is stored as event_data.net_revenue:
commission_percentage falls back to 0.30 when RevenueCat omits it. Refunds always come through negative, whatever sign RevenueCat sends. In reports, gross revenue and transaction counts include charges only. Refunds are reported on their own as Refunds and Refunded (net of reversed refunds), the same way Superwall’s are.
Top-level currency is always USD, because RevenueCat converts before it sends. The original values stay available as event_data.original_currency and event_data.original_price, but build your conversion rules on the USD value.

Fields for conversion rules

Every other RevenueCat field is kept in event_data unchanged.

Delivery behavior

If you connect both RevenueCat and Superwall, one is your revenue source and the other is recorded at $0, so revenue is counted once. RevenueCat is the default. Change it in Settings → General → Mobile revenue authority, which appears once both are connected.

Verify

  1. Send RevenueCat’s test event. Confirm it returns 200.
  2. Complete a sandbox purchase in your app.
  3. Open Events and find the event.
  4. Confirm the event name, value, product_id, and app_user_id.
  5. Confirm visitor_id doesn’t start with revenuecat_.
A visitor_id beginning with revenuecat_ means the identity link didn’t land. The revenue is safe, but there’s no campaign to credit. Check that getRevenueCatAttributes() or bindProviderIdentity runs after both SDKs initialize.

When it doesn’t work

Next, create a conversion rule so these purchases reach your ad platforms.