Understanding Helium SDK Events
Helium SDK emits various events during the lifecycle of paywalls and user interactions. These events can be used for analytics, debugging, and optimizing your paywall strategy.
You can listen to these events by implementing the onHeliumPaywallEvent
method in your HeliumPaywallDelegate
:
Helium events are organized into the following categories:
Triggered when the Helium SDK initialization process begins.
Triggered when a user presses a Call-To-Action (CTA) button on the paywall.
ctaName
: The name or identifier of the CTA button pressed.triggerName
: The name of the trigger that initiated the paywall.paywallTemplateName
: The name of the paywall template being used.Triggered when a user selects a specific offer or product.
productKey
: The key or identifier of the selected product or offer.triggerName
: The name of the trigger that initiated the paywall.paywallTemplateName
: The name of the paywall template being used.Triggered when a user presses the subscribe button for a specific product.
productKey
: The key or identifier of the product being subscribed to.triggerName
: The name of the trigger that initiated the paywall.paywallTemplateName
: The name of the paywall template being used.Triggered when a subscription process is cancelled by the user.
productKey
: The key or identifier of the product.triggerName
: The name of the trigger that initiated the paywall.paywallTemplateName
: The name of the paywall template being used.Triggered when a subscription is successfully completed.
productKey
: The key or identifier of the product.triggerName
: The name of the trigger that initiated the paywall.paywallTemplateName
: The name of the paywall template being used.Triggered when the subscription process fails for any reason.
productKey
: The key or identifier of the product.triggerName
: The name of the trigger that initiated the paywall.paywallTemplateName
: The name of the paywall template being used.error
: Optional string describing the error that occurred during the subscription process.Triggered when a previous subscription is successfully restored.
productKey
: The key or identifier of the product (if available otherwise “HELIUM_GENERIC_PRODUCT”).triggerName
: The name of the trigger that initiated the paywall.paywallTemplateName
: The name of the paywall template being used.Triggered when an attempt to restore purchases fails.
triggerName
: The name of the trigger that initiated the paywall.paywallTemplateName
: The name of the paywall template being used.Triggered when a subscription is in a pending state (e.g., waiting for approval).
productKey
: The key or identifier of the product.triggerName
: The name of the trigger that initiated the paywall.paywallTemplateName
: The name of the paywall template being used.Triggered when a paywall is successfully opened and displayed to the user.
triggerName
: The name of the trigger that initiated the paywall.paywallTemplateName
: The name of the paywall template being used.viewType
: How the paywall was displayed. It maps to this enum:Triggered when there’s an error opening or displaying the paywall.
triggerName
: The name of the trigger that initiated the paywall.paywallTemplateName
: The name of the paywall template being used.Triggered when the paywall is closed programmatically.
triggerName
: The name of the trigger that initiated the paywall.paywallTemplateName
: The name of the paywall template being used.Triggered when the user dismisses the paywall.
triggerName
: The name of the trigger that initiated the paywall.paywallTemplateName
: The name of the paywall template being used.dismissAll
: Whether this dismiss action should dismiss ALL visible paywalls (i.e. secondary and primary paywalls). Typically after a successful purchase.Triggered when the paywall was not shown. e.g. if “Don’t Show Paywall” was set in the dashboard targeting.
triggerName
: The name of the trigger that initiated the paywall.Triggered when a WebView-based paywall has been successfully rendered.
triggerName
: The name of the trigger that initiated the paywall.paywallTemplateName
: The name of the paywall template being used.webviewRenderTimeTakenMS
: Optional time in milliseconds that it took to render the WebView.Triggered when paywall configurations are successfully downloaded.
configId
: The unique identifier of the downloaded configuration.downloadTimeTakenMS
: Optional time in milliseconds that it took to download the configuration.imagesDownloadTimeTakenMS
: Optional time in milliseconds that it took to download images.fontsDownloadTimeTakenMS
: Optional time in milliseconds that it took to download fonts.bundleDownloadTimeMS
: Optional time in milliseconds that it took to download bundles.numAttempts
: How many attempts it took to successfully download.Triggered when there’s an error downloading paywall configurations.
error
: A string describing the error that occurred during download.numAttempts
: How many attempts were made.Helium events can be integrated with your existing analytics systems. Here’s an example of how you might forward Helium events to your analytics service:
Several Helium events include timing information that can be used to monitor the performance of your paywalls:
paywallsDownloadSuccess
includes download times for configurations, images, fonts, and bundlespaywallWebViewRendered
includes the time taken to render WebView-based paywallsYou can use this data to identify potential performance issues and optimize the user experience.