trackCustomPaywallImpression static method
================================================================================ Custom Paywall Tracking
Experimental: This API is experimental and may be changed or removed in a future update.
Tracks an impression of a custom paywall. Use this to record when a user views your custom paywall so that RevenueCat can track paywall analytics.
Call this method once per paywall display, ideally when the paywall first becomes visible to the user, not in callbacks that may fire multiple times for the same display.
params Optional parameters for the impression. Include
CustomPaywallImpressionParams.paywallId to identify which paywall was
shown, and CustomPaywallImpressionParams.offering to identify the
offering and associated placement or targeting context.
CustomPaywallImpressionParams.offeringId is deprecated and only kept for
backwards compatibility. Pass CustomPaywallImpressionParams.offering
instead. If neither is provided, no offering data is sent and the native
SDK chooses the current offering.
Implementation
/// **Experimental**: This API is experimental and may be changed or removed
/// in a future update.
///
/// Tracks an impression of a custom paywall. Use this to record when a user
/// views your custom paywall so that RevenueCat can track paywall analytics.
///
/// Call this method once per paywall display, ideally when the paywall first
/// becomes visible to the user, not in callbacks that may fire multiple times
/// for the same display.
///
/// [params] Optional parameters for the impression. Include
/// [CustomPaywallImpressionParams.paywallId] to identify which paywall was
/// shown, and [CustomPaywallImpressionParams.offering] to identify the
/// offering and associated placement or targeting context.
/// [CustomPaywallImpressionParams.offeringId] is deprecated and only kept for
/// backwards compatibility. Pass [CustomPaywallImpressionParams.offering]
/// instead. If neither is provided, no offering data is sent and the native
/// SDK chooses the current offering.
static Future<void> trackCustomPaywallImpression({
CustomPaywallImpressionParams? params,
}) =>
_channel.invokeMethod(
'trackCustomPaywallImpression',
_customPaywallImpressionData(params),
);