RevenueCat analytics: revenue by channel
ProductLense connects to RevenueCat and attributes every payment, refund and renewal to the channel, campaign and landing page that first brought the customer. App Store and Google Play purchases and subscriptions, credited to the channel that brought each app install.
Setup steps
- In RevenueCat, create a version 2 secret API key with customer information read access.
- In ProductLense, open Settings → Billing connections → RevenueCat, paste the key, the project id and a random authorization value.
- In RevenueCat → Integrations → Webhooks, add a webhook endpoint with the URL ProductLense shows after you save the connection (pattern https://api.productlense.app/api/webhooks/{provider}/{connection_id}).
- Paste the same authorization value into RevenueCat and choose Production events.
- In your app, call Purchases.setAttributes(await ProductLense.revenueCatAttributes()) once.
Credentials and permissions
| Field | Secret | Where to find it |
|---|---|---|
| Secret API key (v2) | Yes, encrypted at rest | Project settings → API keys → New secret API key, version 2, with customer information read access. |
| Project ID | No | The proj… id in the RevenueCat dashboard URL or Project settings. |
| Webhook authorization header | Yes, encrypted at rest | Any long random value; paste the same value into RevenueCat → Webhooks → Authorization header. |
Webhook
URL pattern, shown with your connection id after you save:
https://api.productlense.app/api/webhooks/revenuecat/{connection_id}Events: INITIAL_PURCHASE, RENEWAL, NON_RENEWING_PURCHASE, CANCELLATION, REFUND_REVERSED, EXPIRATION, BILLING_ISSUE, PRODUCT_CHANGE
Verification: Authorization header value you set in RevenueCat, compared in constant time.
What ProductLense reads
- Customers
- Customers with their subscriber attributes, including pl_install_id and $email.
- Subscriptions
- Subscriptions with status, product and billing period.
- Payments
- Purchases and App Store and Google Play renewal transactions.
- Refunds
- Refunded purchases and CUSTOMER_SUPPORT cancellations.
- Fees
- Store commission plus tax as RevenueCat estimates them, marked estimated.
What ProductLense never touches
- Never creates, changes, refunds or cancels anything: read-only API calls and incoming webhooks only.
- Never moves money, issues payouts, or reads bank account details.
- Never sees full card numbers; providers do not expose them.
- Never sends your customer data to the AI model: Ask and the daily insight see aggregates only.
Match payments to your users
The pl_install_id attribute links each purchase to the app install, so it is attributed even before the user signs in.
import Purchases from 'react-native-purchases';
import ProductLense from '@productlense/react-native';
// links purchases to the install's first touch, even before sign-in
Purchases.setAttributes(await ProductLense.revenueCatAttributes());
// after sign-in, your user id joins app and web purchases
await Purchases.logIn(user.id);
ProductLense.identify(user.id);RevenueCat and ProductLense: questions
- Does ProductLense work with RevenueCat?
- Yes. ProductLense connects to RevenueCat with secret API key (v2), project ID, webhook authorization header, backfills 12 months of history, and stays current through signed webhooks plus a nightly reconcile. One connection is included on Starter; Growth and Scale allow every provider at once on the same site.
- What data does ProductLense read from RevenueCat?
- Customers, subscriptions, payments, refunds and fees, read-only. Payments: purchases and App Store and Google Play renewal transactions. Refunds: refunded purchases and CUSTOMER_SUPPORT cancellations. Fees: store commission plus tax as RevenueCat estimates them, marked estimated.
- Can ProductLense change anything in my RevenueCat account?
- No. ProductLense only makes read calls and receives webhooks. It never creates, changes, refunds or cancels anything, never moves money, and never sees card numbers. Credentials are encrypted at rest, and the AI features only ever see aggregated numbers, never your customers’ data.
- How does ProductLense match RevenueCat payments to visitors?
- The pl_install_id attribute links each purchase to the app install, so it is attributed even before the user signs in. Your site calls identify with the same user id after signup, and ProductLense follows the payment to that visitor’s first touch: source, medium, campaign and landing page.
- Are RevenueCat fees subtracted from revenue?
- Store commission plus tax as RevenueCat estimates them, marked estimated. Net revenue is the charge minus the fee; refunds subtract the refunded amount and its fee. Profit per channel then subtracts ad spend.
Connect RevenueCat and see revenue by channel today.
Add the script, connect Stripe or any of 14 other billing providers, and see revenue by channel the same day.