Skip to content

Add trackCustomPaywallImpression API#1660

Merged
rickvdl merged 8 commits into
mainfrom
rickvdl/track-custom-paywall-impression-experimental-api
Mar 17, 2026
Merged

Add trackCustomPaywallImpression API#1660
rickvdl merged 8 commits into
mainfrom
rickvdl/track-custom-paywall-impression-experimental-api

Conversation

@rickvdl

@rickvdl rickvdl commented Mar 10, 2026

Copy link
Copy Markdown
Member

Summary

  • Add trackCustomPaywallImpression API to React Native, enabling developers to track impressions of custom (non-RevenueCat) paywalls for analytics
  • Add purchase tester demo screen for testing custom paywall impressions

Changes

  • iOS bridge: RCT_EXPORT_METHOD(trackCustomPaywallImpression:) in RNPurchases.m
  • Android bridge: @ReactMethod trackCustomPaywallImpression in RNPurchasesModule.java
  • TypeScript: Purchases.trackCustomPaywallImpression() in purchases.ts with optional paywallId parameter
  • Purchase tester: Added a demo Custom Paywall screen for testing impressions

Related PRs

@rickvdl rickvdl added the pr:other A code change that improves performance label Mar 10, 2026
@rickvdl rickvdl marked this pull request as ready for review March 10, 2026 13:17
@rickvdl rickvdl requested a review from a team as a code owner March 10, 2026 13:17
github-merge-queue Bot pushed a commit to RevenueCat/purchases-android that referenced this pull request Mar 12, 2026
## Description

Exposes `trackCustomPaywallImpression` as an experimental public API,
allowing hybrid SDKs and consumers to track impressions of custom
(non-RevenueCat) paywalls.

### Changes
- New `CustomPaywallEventParams` class gated behind
`@ExperimentalPreviewRevenueCatPurchasesAPI`
- Public `trackCustomPaywallImpression` method on `Purchases`
- API tester and Metalava API surface updates

### Related PRs
- purchases-ios: RevenueCat/purchases-ios#6427
- purchases-hybrid-common:
RevenueCat/purchases-hybrid-common#1537
- react-native-purchases:
RevenueCat/react-native-purchases#1660

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Introduces new public (experimental) API surface on `Purchases`, which
can affect binary compatibility and downstream integrations if the
signature or opt-in semantics change.
> 
> **Overview**
> Exposes `Purchases.trackCustomPaywallImpression` as an *experimental
public API* (with overloads) to let apps track impressions for
custom/non-RevenueCat paywalls, accepting optional `paywallId` via the
new `CustomPaywallImpressionParams` type.
> 
> Replaces the prior internal params type, updates API tester coverage
(Java/Kotlin) to exercise the new calls, and refreshes Metalava API
surface files and unit tests accordingly.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
3896706. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
rickvdl added a commit to RevenueCat/purchases-hybrid-common that referenced this pull request Mar 12, 2026
## Description

Adds bridge methods for `trackCustomPaywallImpression` on both iOS and
Android, enabling hybrid SDKs to call the new experimental native API.

### Changes
- iOS: `trackCustomPaywallImpression(_ data:)` in
`CommonFunctionality.swift`
- Android: `trackCustomPaywallImpression(data)` in `common.kt`

Both methods accept a dictionary with an optional `paywallId` key and
delegate to the native SDK.

### Related PRs
- purchases-ios: RevenueCat/purchases-ios#6427
- purchases-android:
RevenueCat/purchases-android#3199
- react-native-purchases:
RevenueCat/react-native-purchases#1660
@rickvdl rickvdl force-pushed the rickvdl/track-custom-paywall-impression-experimental-api branch 2 times, most recently from 05efd6f to 6bafc79 Compare March 12, 2026 16:07
@rickvdl rickvdl added pr:feat A new feature and removed pr:other A code change that improves performance labels Mar 12, 2026
@rickvdl rickvdl changed the title Expose trackCustomPaywallImpression API Add experimental trackCustomPaywallImpression API Mar 12, 2026
@rickvdl rickvdl force-pushed the rickvdl/track-custom-paywall-impression-experimental-api branch from 6bafc79 to 0d88f8e Compare March 13, 2026 08:13
Comment thread ios/RNPurchases.m
@rickvdl rickvdl force-pushed the rickvdl/track-custom-paywall-impression-experimental-api branch from 6df2a87 to 384b604 Compare March 17, 2026 14:56
@rickvdl rickvdl changed the title Add experimental trackCustomPaywallImpression API Add trackCustomPaywallImpression API Mar 17, 2026
@rickvdl rickvdl added the pr:force_minor Change should force a minor release label Mar 17, 2026
rickvdl added a commit to RevenueCat/purchases-unity that referenced this pull request Mar 17, 2026
## Summary
- Add `trackCustomPaywallImpression` API to the Unity SDK, wiring
through the existing hybrid-common bridge on both iOS and Android
- Introduce `CustomPaywallImpressionParams` class with an optional
`PaywallId`
- Pass `CustomPaywallImpressionParams` through the wrapper interface,
splitting into separate arguments only at the native bridge boundary
- Add a testing UI in the Subtester app's Paywall screen with an
optional paywall ID field

## Changes
- **New file:** `CustomPaywallImpressionParams.cs` — params class with
optional `PaywallId`
- **Interface:** `IPurchasesWrapper` — added
`TrackCustomPaywallImpression(CustomPaywallImpressionParams)`
- **Public API:** `Purchases.cs` — two overloads (with params,
parameterless)
- **iOS bridge:** `PurchasesWrapperiOS.cs` + `PurchasesUnityHelper.m` —
DllImport and ObjC bridge calling `[RCCommonFunctionality
trackCustomPaywallImpression:]`
- **Android bridge:** `PurchasesWrapperAndroid.cs` +
`PurchasesWrapper.java` — CallPurchases and static method calling
`CommonKt.trackCustomPaywallImpression()`
- **No-op:** `PurchasesWrapperNoop.cs` — empty stub
- **API tests:** `PurchasesAPITests.cs` — compile-time verification of
both overloads
- **Subtester:** `PaywallScreen.cs` — "Custom Paywall Events" section
with paywall ID field and button

### Related PRs
- purchases-ios: RevenueCat/purchases-ios#6427
- purchases-android:
RevenueCat/purchases-android#3199
- purchases-hybrid-common:
RevenueCat/purchases-hybrid-common#1537
- react-native-purchases:
RevenueCat/react-native-purchases#1660
- purchases-flutter:
RevenueCat/purchases-flutter#1679
- purchases-capacitor:
RevenueCat/purchases-capacitor#725

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Rick van der Linden <rick.vanderlinden@revenuecat.com>
@rickvdl rickvdl merged commit e28f0a2 into main Mar 17, 2026
8 checks passed
@rickvdl rickvdl deleted the rickvdl/track-custom-paywall-impression-experimental-api branch March 17, 2026 17:54
rickvdl pushed a commit that referenced this pull request Mar 17, 2026
**This is an automatic release.**

## RevenueCat SDK
### ✨ New Features
* Add trackCustomPaywallImpression API (#1660) via Rick (@rickvdl)
### 📦 Dependency Updates
* Updates purchases-hybrid-common to 17.51.1 (#1677) via RevenueCat Git
Bot (@RCGitBot)
* [Android
9.26.1](https://github.com/RevenueCat/purchases-android/releases/tag/9.26.1)
* [Android
9.26.0](https://github.com/RevenueCat/purchases-android/releases/tag/9.26.0)
* [Android
9.25.0](https://github.com/RevenueCat/purchases-android/releases/tag/9.25.0)
* [Android
9.24.0](https://github.com/RevenueCat/purchases-android/releases/tag/9.24.0)
* [iOS
5.65.0](https://github.com/RevenueCat/purchases-ios/releases/tag/5.65.0)
* [iOS
5.64.0](https://github.com/RevenueCat/purchases-ios/releases/tag/5.64.0)
* [iOS
5.63.0](https://github.com/RevenueCat/purchases-ios/releases/tag/5.63.0)
* [iOS
5.62.0](https://github.com/RevenueCat/purchases-ios/releases/tag/5.62.0)
* [AUTOMATIC BUMP] Updates purchases-hybrid-common to 17.51.0 (#1674)
via RevenueCat Git Bot (@RCGitBot)
* [Android
9.26.1](https://github.com/RevenueCat/purchases-android/releases/tag/9.26.1)
* [Android
9.26.0](https://github.com/RevenueCat/purchases-android/releases/tag/9.26.0)
* [Android
9.25.0](https://github.com/RevenueCat/purchases-android/releases/tag/9.25.0)
* [Android
9.24.0](https://github.com/RevenueCat/purchases-android/releases/tag/9.24.0)
* [iOS
5.65.0](https://github.com/RevenueCat/purchases-ios/releases/tag/5.65.0)
* [iOS
5.64.0](https://github.com/RevenueCat/purchases-ios/releases/tag/5.64.0)
* [iOS
5.63.0](https://github.com/RevenueCat/purchases-ios/releases/tag/5.63.0)
* [iOS
5.62.0](https://github.com/RevenueCat/purchases-ios/releases/tag/5.62.0)
* [AUTOMATIC BUMP] Updates purchases-hybrid-common to 17.50.0 (#1672)
via RevenueCat Git Bot (@RCGitBot)
* [Android
9.26.1](https://github.com/RevenueCat/purchases-android/releases/tag/9.26.1)
* [Android
9.26.0](https://github.com/RevenueCat/purchases-android/releases/tag/9.26.0)
* [Android
9.25.0](https://github.com/RevenueCat/purchases-android/releases/tag/9.25.0)
* [Android
9.24.0](https://github.com/RevenueCat/purchases-android/releases/tag/9.24.0)
* [iOS
5.65.0](https://github.com/RevenueCat/purchases-ios/releases/tag/5.65.0)
* [iOS
5.64.0](https://github.com/RevenueCat/purchases-ios/releases/tag/5.64.0)
* [iOS
5.63.0](https://github.com/RevenueCat/purchases-ios/releases/tag/5.63.0)
* [iOS
5.62.0](https://github.com/RevenueCat/purchases-ios/releases/tag/5.62.0)
* [AUTOMATIC BUMP] Updates purchases-hybrid-common to 17.49.0 (#1670)
via RevenueCat Git Bot (@RCGitBot)
* [Android
9.26.1](https://github.com/RevenueCat/purchases-android/releases/tag/9.26.1)
* [Android
9.26.0](https://github.com/RevenueCat/purchases-android/releases/tag/9.26.0)
* [Android
9.25.0](https://github.com/RevenueCat/purchases-android/releases/tag/9.25.0)
* [Android
9.24.0](https://github.com/RevenueCat/purchases-android/releases/tag/9.24.0)
* [iOS
5.65.0](https://github.com/RevenueCat/purchases-ios/releases/tag/5.65.0)
* [iOS
5.64.0](https://github.com/RevenueCat/purchases-ios/releases/tag/5.64.0)
* [iOS
5.63.0](https://github.com/RevenueCat/purchases-ios/releases/tag/5.63.0)
* [iOS
5.62.0](https://github.com/RevenueCat/purchases-ios/releases/tag/5.62.0)
* [AUTOMATIC BUMP] Updates purchases-hybrid-common to 17.48.0 (#1668)
via RevenueCat Git Bot (@RCGitBot)
* [Android
9.26.1](https://github.com/RevenueCat/purchases-android/releases/tag/9.26.1)
* [Android
9.26.0](https://github.com/RevenueCat/purchases-android/releases/tag/9.26.0)
* [Android
9.25.0](https://github.com/RevenueCat/purchases-android/releases/tag/9.25.0)
* [Android
9.24.0](https://github.com/RevenueCat/purchases-android/releases/tag/9.24.0)
* [iOS
5.65.0](https://github.com/RevenueCat/purchases-ios/releases/tag/5.65.0)
* [iOS
5.64.0](https://github.com/RevenueCat/purchases-ios/releases/tag/5.64.0)
* [iOS
5.63.0](https://github.com/RevenueCat/purchases-ios/releases/tag/5.63.0)
* [iOS
5.62.0](https://github.com/RevenueCat/purchases-ios/releases/tag/5.62.0)

### 🔄 Other Changes
* Bump fastlane-plugin-revenuecat_internal from `3e8c384` to `9a6911b`
(#1676) via dependabot[bot] (@dependabot[bot])
* Bump fastlane-plugin-revenuecat_internal from `e146447` to `3e8c384`
(#1671) via dependabot[bot] (@dependabot[bot])
* Bump tar from 7.5.10 to 7.5.11 (#1669) via dependabot[bot]
(@dependabot[bot])

---------

Co-authored-by: RevenueCat CI <dev+ci@revenuecat.com>
rickvdl added a commit to RevenueCat/purchases-hybrid-common that referenced this pull request Mar 18, 2026
…PI (#1565)

## Summary
- Read `offeringId` from the data dictionary in
`trackCustomPaywallImpression` on both iOS and Android bridge layers
- Pass it through to the native `CustomPaywallImpressionParams`,
allowing hybrid SDKs to override the default offering identifier

## Related PRs
- purchases-ios: RevenueCat/purchases-ios#6427
- purchases-android:
RevenueCat/purchases-android#3199
- react-native-purchases:
RevenueCat/react-native-purchases#1660
- purchases-unity:
RevenueCat/purchases-unity#863
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:feat A new feature pr:force_minor Change should force a minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants