Step 1 - Allow your website to send you notifications

In order to be able to test web push, you have to allow your website to send you notifications. To display the system pop-up, you have to call the browser method : 


Note : This method has to be called on user action (cannot be called when a user loads your website's page) We recommend you to link this method to a static button on your website (an automated action could prevent the pop-up from being displayed

Click on the button linked to the method : FollowAnalytics.registerForPushNotifications()

A pop-up will appear, click on "Allow"

You can check your device has been registered for push notifications by using the method : FollowAnalytics.isRegisteredForPushNotifications()

For mobile devices your browser app has to be allowed to send you notifications. You can check it in your mobile settings. If the browser app at the device settings level is not allowed to send you notifications, our web SDK will successfully send notifications to your devices be the browser won't display them.

Step 2 - Wait for your token to come up 

Close your session.
Wait 10 minutes for your Token to be processed by FollowAnalytics. If you don't wait, you will get an Opt-out error while trying to send you a push

Step 3 - Send a push

You can either :

  1. Launch a broadcast campaign

  2. Send a test push to one or several registered devices

The second option will require to register your device id. To retrieve your device id on web apps, you have to type in your browser console the command FollowAnalytics.getDeviceId()

The process is the same for both desktop and mobile devices. For mobile devices, you will have to connect it to your desktop and open a console related to your webpage. The way the console is opened will vary from one browser to another.

Troubleshoot : 

If you clean your local storage, your device id (and token) may change. If you try to send a push to an old device id you might get an unexpected server error (ie : Chrome error 410).

Once you have your device id go on the platform in the Campaign menu and click on "Create a Campaign". 

Make sure your web app is selected for the setup of the campaign.

Compose your message.
Go to the "in-device preview" menu if you wish to send a test push to registered devices (otherwise finish the flow of the campaign and launch it). 

Select one or several devices you wish to send a notification to and click on "Send to Device".

Step 4 - Receive my notification 

On desktop devices the notification will be displayed in a corner of one of your available screens. It won't be delimited by your browser windows. 

On mobile devices, the notification will end up in your notification center (available from your lock screen). 

If you have any question about how to test web push, please leave us a message and we will answer you as soon as possible.

Thank you for reading !

Did this answer your question?