You can manage both the subscription prompt (the initial banner asking for permission) and the subscription widget (a floating button) through your Pushwoosh Web SDK initialization script or in the Pushwoosh Control Panel.
1. Subscription Widget (Floating Button): This widget shows the current subscription status and lets users subscribe/unsubscribe.
To disable it: in your Pushwoosh initialization call, set subscribeWidget.enable to false. Note that the Web SDK is always initialized through Pushwoosh.push(['init', {...}]) — there is no Pushwoosh.init() method:
Pushwoosh.push(['init', {
applicationCode: 'XXXXX-XXXXX',
// ... other settings
subscribeWidget: {
enable: false
}
}]);
Alternatively, omit the subscribeWidget object entirely if you do not want the widget.
To customize it: see Push Subscription Button.
2. Subscription Prompt (Banner): This is the pre-permission popup shown before the browser's native permission request.
To disable the default prompt in the Control Panel: go to Settings → Configure platforms → Web push notification → Subscription prompt, click Settings, select My custom widget instead of Default widget, and click Publish. You do not have to actually build a custom widget — selecting this option removes the default prompt from your site. Allow some time for the published change to propagate.
To disable it from code: set subscribePopup.enable to false in the init parameters:
Pushwoosh.push(['init', {
applicationCode: 'XXXXX-XXXXX',
// ... other settings
subscribePopup: {
enable: false // true to show it
}
}]);
If you build your own prompt, see the Custom Subscription Popup guide.
Remember to clear your browser cache after changing your website's scripts so you see the updated behavior.
Comments
0 comments
Please sign in to leave a comment.