When site members choose to receive immediate notifications. In addition to email notifications, they will also have the option to subscribe to Web Push notifications. Web Push notifications can be delivered even when the person is no longer on your site.
Create a OneSignal App
The first step to configure OneSignal in EngageUsers is to create a free OneSignal account and create an App to use with the Add-on.
Web Push Platform
Select the Web Push platform.
Custom Integration
For integration select Custom Code.
Site Details and Custom Icon
Next, fill out the Site Name and Site URL, and set the default icon to use for notifications.
OneSignal SDK
In this step download the OneSignal SDK. Next, unzip the downloaded package and upload the 3 files to the root of your site. To confirm the files are readable, try accessing them directly using the browser. Replace your domain in the following links and you should be able to see the file contents:
├── https://my-jreviews-site.com/manifest.json
├── https://my-jreviews-site.com/OneSignalSDKUpdaterWorker.js
├── https://my-jreviews-site.com/OneSignalSDKWorker.js
App ID and REST Api Key
Get your App ID and REST API Key from OneSignal under Settings / Keys & IDs
The highlighted keys in the image below are for documentation purposes and will not work. You need to use the ones provided in your OneSignal dashboard.
Copy the App ID and REST API Key to the 3rd Party Integrations tab in the Add-on admnistration.
Safari Notifications
Safari notifications require a different Web Id. On your App in the OneSignal site go to Settings / Platforms / Apple Safari
.
Add the Site URL, then save.
Now, click again on Apple Safari
.
to re-open the dialog and copy the generated Web ID to your site under EngageUsers / Configuration / 3rd Party Integrations
.
Upload Custom Icon for Safari
On the OneSignal site, in the same dialog where you copied the Web Id for Safari you will now see a checkox at the bottom to set a custom icon for Safari Web Push notifications.
Set the Safari icon at this point because once users are subscribed, they will only be able to see the icon that was set at the time they subscribed. If you didn't set an icon, that would be the default OneSignal icon.
Learn about admin notifications via Slack →