The callback function that takes the API response. The API response type is a boolean.
API response
Type
Description
boolean
The result of checking Web Push support
Example of use
personaclick("subscription", "web_push_supported", function(supported) {
if (supported) {
// if Web Push is supported
} else {
// if Web Push isn't supported
}
});
Checking permission status
Method Objective
The method checks if the user has permitted to show Web Push notifications.
The callback function that takes the API response. The API response type is a boolean.
API response
Type
Description
boolean
The result of the permission check
Example of use
personaclick("subscription", "web_push_subscribed", function(subscibed) {
if (subscibed) {
// if the user has permitted Web Push notifications
} else {
// if the user hasn't yet permitted Web Push notifications or has rejected the request
}
});
Getting user permission
Method Objective
The method allows subscribing the user to Web Push notifications using only the system permissions window in the browser.
We recommend using the Programmatic Pop-Ups tool for more flexibility in configuring the user's subscription to Web Push notifications.
The callback function that takes the API response. The API response type is a boolean.
API response
Type
Description
boolean
The result of subscription
Example of use
personaclick("subscription", "web_push_subscribe", function(subscibed) {
if (subscibed) {
// if the user has subscribed to Web Push notifications
} else {
// if the user rejects the Web Push notification subscription
}
});
Subscribe to the "Back in Stock" trigger
Method Objective
The method subscribes the user to a web-push notification that the product is available.
You don't need to check for Web Push support, permission availability, or request it from the user using the methods available here. This method will do everything you need by itself.
The method subscribes the user to a web-push notification of a product price decrease.
You don't need to check for Web Push support, permission availability, or request it from the user using the methods available here. This method will do everything you need by itself.