Skip to content

Add trackCustomPaywallImpression API#1679

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

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

Conversation

@rickvdl

@rickvdl rickvdl commented Mar 12, 2026

Copy link
Copy Markdown
Member

Summary

  • Expose trackCustomPaywallImpression as a public API in Flutter
  • Support optional paywallId and offeringId parameters via CustomPaywallImpressionParams
  • If offeringId is not provided, the SDK uses the current offering identifier from the cache
  • Pass full arguments dictionary to PHC on both iOS and Android instead of unpacking individual fields
  • Add purchase tester screen with text fields for paywall ID and offering ID

Changes

  • Dart: CustomPaywallImpressionParams with paywallId and offeringId
  • iOS bridge: Pass arguments dictionary directly to [RCCommonFunctionality trackCustomPaywallImpression:]
  • Android bridge: Pass arguments map directly to CommonKt.trackCustomPaywallImpression()
  • Tests: Unit tests for all parameter combinations
  • API tester: Compile-time verification of all API shapes
  • Purchase tester: Screen with text fields for paywall ID and offering ID

Related PRs

@rickvdl rickvdl added the pr:feat A new feature label Mar 12, 2026
@rickvdl rickvdl marked this pull request as ready for review March 12, 2026 16:19
@rickvdl rickvdl requested a review from a team as a code owner March 12, 2026 16:19
@rickvdl rickvdl force-pushed the rickvdl/track-custom-paywall-impression-experimental-api branch from 9108de8 to 2febbbb Compare March 13, 2026 08:14

@tonidero tonidero left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same suggestion as in Capacitor, but thinking about it, it's not a blocker and can be changed later internally, so I think this looks good!

Comment thread lib/purchases_flutter.dart
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 added a commit to RevenueCat/react-native-purchases that referenced this pull request Mar 17, 2026
## 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
- purchases-ios: RevenueCat/purchases-ios#6427
- purchases-android:
RevenueCat/purchases-android#3199
- purchases-hybrid-common:
RevenueCat/purchases-hybrid-common#1537
- purchases-flutter:
RevenueCat/purchases-flutter#1679
- purchases-capacitor:
RevenueCat/purchases-capacitor#725
@rickvdl rickvdl force-pushed the rickvdl/track-custom-paywall-impression-experimental-api branch from 2febbbb to 52db6a7 Compare March 18, 2026 10:37
@rickvdl rickvdl changed the title Add experimental trackCustomPaywallImpression API Add trackCustomPaywallImpression API with offeringId override Mar 18, 2026
@rickvdl rickvdl changed the title Add trackCustomPaywallImpression API with offeringId override Add trackCustomPaywallImpression API Mar 18, 2026
@rickvdl rickvdl merged commit f0feda4 into main Mar 18, 2026
13 checks passed
@rickvdl rickvdl deleted the rickvdl/track-custom-paywall-impression-experimental-api branch March 18, 2026 10:53
facumenzella pushed a commit that referenced this pull request Mar 18, 2026
**This is an automatic release.**

## RevenueCat SDK
### ✨ New Features
* Add trackCustomPaywallImpression API (#1679) via Rick (@rickvdl)
* Adds Galaxy to the Store Enum (#1677) via Will Taylor (@fire-at-will)
### 📦 Dependency Updates
* [AUTOMATIC BUMP] Updates purchases-hybrid-common to 17.52.0 (#1689)
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)
* Updates purchases-hybrid-common to 17.51.1 (#1687) 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 (#1685)
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 (#1682)
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 (#1680)
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 (#1678)
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.47.0 (#1676)
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)

## RevenueCatUI SDK
### ✨ New Features
* Add number and boolean custom variable types (#1683) via Facundo
Menzella (@facumenzella)

### 🔄 Other Changes
* Bump fastlane-plugin-revenuecat_internal from `3e8c384` to `9a6911b`
(#1688) via dependabot[bot] (@dependabot[bot])
* Bump fastlane-plugin-revenuecat_internal from `e146447` to `3e8c384`
(#1681) via dependabot[bot] (@dependabot[bot])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:feat A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants