time management

Sprint Planning And Time Keeping

February 19, 2020
scrum and agile methodology

Scrum And Agile Methodology

March 13, 2020

How To Setup And Use OneSignal For Web Apps

March 5, 2020 / Rayne Falkenberg

I recently learnt how to use OneSignal. One of my clients needed a pop up notification when ever a message came through on their web app.

How to set up OneSignal:How to setup and use OneSignal for Web Apps
  • First you will need to sign up on OneSignal.
  • Once your profile has been setup you can login in and create a new app/website.
  •  Then fill in your website name and select Web Push: OneSignal
  •  Then select Custom Code and fill out the rest of the information for your site:OneSignal
  • Then Download the SDK files and save them in your main folder of your web app project.
  • Then add this code to the <head> section on all pages of your site:

The above set up is for all browsers except for safari, if you need your notifications to also work on safari then under platform settings you can add safari and configure it with your same sites details.

How to use OneSignal in your web app:
  • Add this code to automatically send a notification when a new user lands on your web app. This notification asks the user for permissions to send notifications.

  • If you only want certain users to get notifications based on something that they have joined are their user roles you can use tags.
    • First I will show you how to add and remove a tag/tags from your users:

    • How to send a notification:

 

How to setup and use OneSignal for Web Apps

 

All set now your users will be receiving notifications!

</ Fun Coding! >

Share

Rayne Falkenberg

Rayne is a developer manager with experience in web apps, mobile apps and project management.

How To Setup And Use OneSignal For Web Apps
This website uses cookies to improve your experience. By using this website you agree to our Data Protection Policy.
Read more