Skip to content

Add trackCustomPaywallImpression API#863

Merged
rickvdl merged 5 commits into
mainfrom
feat/track-custom-paywall-impression
Mar 17, 2026
Merged

Add trackCustomPaywallImpression API#863
rickvdl merged 5 commits into
mainfrom
feat/track-custom-paywall-impression

Conversation

@tonidero

@tonidero tonidero commented Mar 13, 2026

Copy link
Copy Markdown
Contributor

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

@tonidero tonidero added the pr:feat A new feature label Mar 13, 2026
@tonidero tonidero requested a review from rickvdl March 13, 2026 16:08

@rickvdl rickvdl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice work! One question about the impression API that takes the paywallId directly

Comment thread RevenueCat/Scripts/PurchasesWrapper.cs Outdated
@rickvdl rickvdl force-pushed the feat/track-custom-paywall-impression branch from f0edb25 to ff216c3 Compare March 17, 2026 10:05
@rickvdl rickvdl marked this pull request as ready for review March 17, 2026 10:06
@rickvdl rickvdl requested a review from a team as a code owner March 17, 2026 10:06

@tonidero tonidero left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Can't approve myself, but I think this makes sense! 🚢

Comment thread RevenueCat/Scripts/PurchasesWrapper.cs Outdated
tonidero and others added 3 commits March 17, 2026 16:06
Wire the trackCustomPaywallImpression API from the hybrid-common bridge
through to the Unity SDK, enabling Unity developers to track impressions
for custom (non-RevenueCat) paywalls. Also add a testing button to the
Subtester app's Paywall screen.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Pass paywallId and offeringId as separate arguments through the bridge
layer instead of a single string. If offeringId is not provided, the
SDK will use the current offering identifier from the cache.
Accept the params object in IPurchasesWrapper instead of individual
strings. The split into separate arguments now happens only at the
native bridge boundary (DllImport/CallPurchases).
@rickvdl rickvdl force-pushed the feat/track-custom-paywall-impression branch from ff216c3 to bf9af91 Compare March 17, 2026 15:08
@rickvdl rickvdl added the pr:force_minor Change should force a minor release label Mar 17, 2026
@rickvdl rickvdl merged commit b5233e3 into main Mar 17, 2026
8 checks passed
@rickvdl rickvdl deleted the feat/track-custom-paywall-impression branch March 17, 2026 17:00
rickvdl pushed a commit that referenced this pull request Mar 17, 2026
**This is an automatic release.**

## RevenueCat SDK
### ✨ New Features
* Add trackCustomPaywallImpression API (#863) via Toni Rico (@tonidero)
### 📦 Dependency Updates
* Updates purchases-hybrid-common to 17.51.1 (#866) 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 (#864) 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 (#862) 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 (#860) 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 (#859) 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 (#858) 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 custom variables support for paywalls (#812) via Facundo Menzella
(@facumenzella)

### 🔄 Other Changes
* Bump fastlane-plugin-revenuecat_internal from `e146447` to `3e8c384`
(#861) via dependabot[bot] (@dependabot[bot])
* Add .claude/ to .gitignore (#857) via Facundo Menzella (@facumenzella)
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
rickvdl added a commit to RevenueCat/react-native-purchases that referenced this pull request Mar 18, 2026
## Summary
- Add optional `offeringId` parameter to
`TrackCustomPaywallImpressionOptions`
- If not provided, the SDK uses the current offering identifier from the
cache
- Update purchase tester demo screen with text fields for both paywall
ID and offering ID

## Related PRs
- purchases-hybrid-common:
RevenueCat/purchases-hybrid-common#1565
- 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