Skip to main content

Tracking Custom Paywall Impressions

Track paywall impressions for custom paywalls to power analytics

AIAsk AIChatGPTClaude

If you're building a custom paywall (i.e., not using RevenueCat Paywalls), you can report when a customer sees your paywall by calling trackCustomPaywallImpression.

RevenueCat Paywalls track impressions automatically. This method is only needed if you're building your own paywall UI.

Supported SDK versions

RevenueCat SDKMinimum Version
purchases-ios5.66.0+
purchases-android9.26.1+
react-native-purchases9.14.0+
purchases-capacitor12.3.0+
purchases-flutter9.15.0+
purchases-unity8.8.0+
purchases-kmp2.9.0+17.52.0+

Tracking an Impression

Call trackCustomPaywallImpression as soon as your custom paywall becomes visible to the customer. You can optionally pass the identifier of your custom paywall. By default, the SDK assumes the paywall is displaying the current offering. You can override this by passing a different offering ID.

// Basic usage
Purchases.shared.trackCustomPaywallImpression()

// Passing your custom paywall identifier
Purchases.shared.trackCustomPaywallImpression(
CustomPaywallImpressionParams(paywallId: "my-paywall")
)

// Passing your custom paywall identifier and offering id (only useful if the paywall is not displaying the current offering)
Purchases.shared.trackCustomPaywallImpression(
CustomPaywallImpressionParams(
paywallId: "my-paywall",
offeringId: "premium-offering"
)
)

Best Practices

Call this method right after the paywall has rendered and is visible on screen. Make sure it is only called once per paywall view — for example, onAppear in SwiftUI may fire multiple times for the same view.

If you don't call trackCustomPaywallImpression, exposure data will be incomplete and analytics will be less reliable. Make sure every code path that shows your paywall includes this call.

Next Steps

  • If you haven't already, set up your custom paywall to display products from RevenueCat Offerings