Listening SDK Events
Instructions for listening Deepwall SDK events
Deepwall SDK manages paywalls' UI display in your app, and it also manages purchases and restoration of purchases whenever users trigger the buy or restore actions on the displayed paywalls.
Deepwall posts various events for the paywall display, purchase, or restore operations for apps to observe and take necessary actions when needed.
Event Observation
For iOS apps, first implement the DeepWallNotifierDelegate
protocol to your class. Then you can use observeEvents
method for event observation.
For non-iOS apps you need to use the Deepwall EventBus model.
We recommend removing the observer while you are closing if you observe events on screens.
Events Triggered
Following events are triggered by Deepwall SDK :
Event Name | Description |
deepwallPaywallRequested PAYWALL_REQUESTED | Triggered whenever a paywall requested |
deepwallPaywallResponseReceived PAYWALL_RESPONSE_RECEIVED | Triggered after a paywall success or failure response received |
deepwallPaywallOpened PAYWALL_OPENED | Triggered whenever a paywall is opened after a paywall request |
deepwallPaywallActionShowDisabled DO_NOT_SHOW | Triggered whenever a paywall cannot be displayed due to paywall display is set as None |
deepwallPaywallNotOpened PAYWALL_NOT_OPENED | Triggered whenever a paywall cannot be displayed due to duplicate requests which means this paywall request has been sent while a previous request is being processed |
deepwallPaywallResponseFailure PAYWALL_RESPONSE_FAILURE | Triggered whenever a paywall display has failed due to an error |
deepwallPaywallClosed CLOSED | Triggered when the displayed paywall is closed by the app user |
deepwallPaywallPurchasingProduct PAYWALL_PURCHASING_PRODUCT | Triggered whenever a purchase is initiated by the user and the purchase is started |
deepwallPaywallPurchaseSuccess PAYWALL_PURCHASE_SUCCESS | Triggered whenever a purchase or restore is made and receipt validation is successful or client receipt has been changed for any reason and Deepwall automatically validated the latest receipt. Validation type can be checked for restore success. |
deepwallPaywallPurchaseFailed PAYWALL_PURCHASE_FAILED | Triggered whenever a purchase or restore has failed due to an error. Validation type can be checked. |
deepwallPaywallRestoreFailed | Triggered whenever receipt validation has failed or there is no receipt after a restore request |
deepwallPaywallExtraDataReceived EXTRA_DATA | Triggered by some of the paywalls which provide additional actions for the users (like credit use or another paywall request) |
CONSUME_SUCCESS | Triggered whenever a consumable product is consumed successfully. (ANDROID ONLY) |
CONSUME_FAILURE | Triggered whenever a consume action is failed. (ANDROID ONLY) |
Event Parameters
iOS Event | Android Event |
Parameters : N/A |
Parameters : N/A |
Parameters : N/A |
Parameters : N/A |
Parameters :
|
Parameters : PaywallOpenedInfo
|
Parameters :
|
Parameters : PaywallActionShowDisabledInfo
|
Parameters :
|
Parameters : PaywallOpenedInfo
|
Parameters :
|
Parameters : PaywallFailureResponse
|
Parameters :
|
Parameters : PaywallActionShowDisabledInfo
|
Parameters :
|
Parameters : PaywallPurchasingProductInfo
|
Parameters :
|
Parameters : SubscriptionResponse
|
Parameters :
|
Parameters : SubscriptionErrorResponse
|
Parameters :
| N/A |
Parameters :
|
Parameters : Any |
N/A |
Parameters : N/A |
N/A |
Parameters : Int |
Following parameters are supported with iOS SDK 2.4.2+ and Android SDK 2.6.0+ :
testId
:
Current id of display or experiment returned as response (This id changes whenever display or experiment is updated)
relatedTestId
:
Original id of display or experiment returned as response (This id does not change for a display or experiment)
isDisplay
:
If value is TRUE then the responded paywall is from a display, otherwise from an experiment.
Android Event Usage Example
Event Handling
You can see the following guides to learn about more about using SDKs and event handling triggers.
For displaying paywalls and handling display events:
Requesting PaywallsFor making purchases and handling purchase events:
Making PurchasesFor restoring purchases and handling restore events:
Restoring PurchasesFor closing paywall and handling close event:
Closing a PaywallLast updated