Skip to main content
RevenueCat sends subscription, trial, and purchase events to Datalyr over a webhook. Add one attribute in your app and each purchase links back to the web visit that drove it.

Connect

1

Open the source

Open Sources, find RevenueCat, and select connect.
2

Enter your App ID

Paste the RevenueCat App ID.
3

Enter a webhook secret

Any strong random string works. You’ll paste the same value into RevenueCat next.
The field reads as optional, but set it anyway. Deliveries return HTTP 503 until a secret is stored.
4

Copy the webhook URL

5

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.
Skip this and you’ll still get the revenue, but nothing to credit it to.
Call it again after the App Tracking Transparency prompt, since the identifiers can change once the user answers.
This needs iOS SDK 2.1.12 or React Native SDK 1.7.17, or later. Earlier versions send the key as $datalyrId, and RevenueCat strips any attribute name that starts with $, so the attribute never arrives and every purchase resolves through email or lands unattributed. Upgrade before you trust this step. The key itself needs no change in your code: getRevenueCatAttributes() sends the correct name for you.
We resolve the visitor in this order, stopping at the first match: No match sets visitor_id to revenuecat_<original_app_user_id>.

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.
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

Pick either RevenueCat or Superwall as your revenue source, not both. They emit the same event names for the same store transaction, and we deduplicate within a source rather than across them, so your mobile revenue doubles.

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() runs after both SDKs initialize.

When it doesn’t work

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