Here is the code you need to add before </head>
in your blogger blog html if you want to integrate Onesignal web push notifications.
<script src="https://cdn.onesignal.com/sdks/OneSignalSDK.js" async='async'></script>
<script>
var OneSignal = window.OneSignal || [];
OneSignal.push(["init", {
appId: "ENTER APP ID",
autoRegister: false, /* Set to true to automatically prompt visitors */
httpPermissionRequest: {
enable: true
},
notifyButton: {
enable: true, /* Set to false to hide */
position : 'bottom-left',
prenotify: true
}
}]);
</script>
Enter your OneSignal appID in the code. You can click here to learn how to get the appID for your blog.
If you want the subscription bell to display on the right hand side, change âbottom-leftâ to âbottom-rightâ.
If you want to add the push notifications to your WordPress blog, use the Onesignal WordPress plugin.
Thanks to @ibehone for recommending OneSignal.