Here we explain
- What are Push Notifications.
- How to setup them and Persoo Intergration.
- How technically they work.
What are Web Push Notifications?
Web push notifications are messages that come from a website. You get them on your desktop or device even when the website is not open in your browser. It is a new marketing channel to re engage your site visitors without knowing their email or other contact details.
How integrations with Persoo works?
Push Notification Messaging is realized by Apple, Google, Amazon, Microsoft …. the large players providing operating systems and browsers for mobiles and desktops. They provide basic API and no UI. There are plenty of “wrapper” services, which provides you nice UI around the API and unifies API methods using wrappers for original methods. We prefer OneSignal.com, which is free. How notifications work in general?
- You have to register your “Application”, which wants to participate on Web Push Messaging.
- Then you need to get your audience. You have to ask visitor of your website, if they will subscribe/allow you to send them push messages. Subscribed user will provide you their “PlayerID” (unique hash).
- Finally, you can use REST API to send a message to your APP and PlayerID. Message will be displayed when the player appears online (opens his browser), no matter which website he will open.
Note: the browser has to support Web Push notifications and user must have it enabled in his browser (i.e. it does not work in anonymous window of your browser). Your website has to ask the visitor for permission to send him Web Push notifications. Typically, it will display following system message.
Setting up Persoo – OneSignal integration
Create One Signal account and apps.
- Create free Account at OneSignal.com
- Create App for Web Push in Chrome, Firefox and Safari browsers – follow guides for http and https sites.
- In OneSignal admin, go to Settings, select “Keys & IDs” tab. There you find your AppID and Rest API key.
- In Persoo Admnistration go to Settings – Integrations
- Select “OneSignal” panel, switch the panel ON.
- Fill in
- REST API Key
- App ID
Add variable “oneSignalWebHookURL” and copy and paste the section related to “webhooks”. This code is responsible for reporting impression, click, close events of notifications to Persoo.
- Publish changes made in Persoo Settings
How to verify that Persoo collects PlayerIDs to visitor profiles:
- Open Chrome debug console (press F12 in Chrome), switch to tab “Console”.
- Type following commands and see the response:
It’s OK, when object is non-empty and contains playerID. That means, that using the integration, playerID and its status were collected to Persoo profile, so Persoo can use this PlayerID for triggering the notification through API.
Now go to Campaigns – Offers and create new Push Notification campaign
- TODO add link to UserManual – Offers – Creating Push Notification offer.
Advanced details – events, profile variables
Events send to Persoo
- “oneSignal” event – reports current playerID, notification status, … to refresh the record in
There is only one “location” used for Push Notifications and it’s name is “PushNotificationLocation”. When you create new notification, the location is used automatically, you do not need to care about it. But it is good to know about it, because it’s used as a location in offer reports.
Data in Visitor Profile
db.oneSignal– keeps last oneSignal status from the last browser or last device.
db.affinityToOneSignalPlayerID– contains all playerIDs related to current visitor. One identified person with login or email may use more than 1 browser and thus has one playerID for each browser.
Advanced campaigns using Persoo Push Notifications
What marketing scenarios can be realized with Push Notifications?
- Everything what you do with email. The only restriction is that you have limited charactes count (below 200).
- Abadoned Basket Reminders
- Fresh discounts for products viewed before a month
- Crossell after purchase, ….
- Hot deals / Best sellers / Recommendation from the category recently viewed
- Deal of the day
Good Luck With Web Push Notifications!
Creating first Push Notification Offer
Follow push notification offer description.
- Chrome may display various length of the text. It depends on the image. For easy preview in various browsers try for example https://tests.peter.sh/notification-generator/