https://github.com/onesignal/onesignal-website-sdk
OneSignal is a push notification service for web and mobile apps. This SDK makes it easy to integrate your website with OneSignal Push Notifications. https://onesignal.com
https://github.com/onesignal/onesignal-website-sdk
email in-app-messaging javascript notification-service notifications onesignal push-notifications pushnotifications serviceworker sms web-push webpush
Last synced: 22 days ago
JSON representation
OneSignal is a push notification service for web and mobile apps. This SDK makes it easy to integrate your website with OneSignal Push Notifications. https://onesignal.com
- Host: GitHub
- URL: https://github.com/onesignal/onesignal-website-sdk
- Owner: OneSignal
- License: other
- Created: 2015-04-07T22:58:17.000Z (about 10 years ago)
- Default Branch: main
- Last Pushed: 2025-05-08T23:47:59.000Z (28 days ago)
- Last Synced: 2025-05-09T00:27:13.653Z (28 days ago)
- Topics: email, in-app-messaging, javascript, notification-service, notifications, onesignal, push-notifications, pushnotifications, serviceworker, sms, web-push, webpush
- Language: TypeScript
- Homepage:
- Size: 21.4 MB
- Stars: 392
- Watchers: 60
- Forks: 114
- Open Issues: 29
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![]()
Showing web push notifications from Chrome, Safari, and Firefox# OneSignal Web Push SDK
[OneSignal](https://onesignal.com) is the market leader in customer engagement, powering mobile push, web push, email, and in-app messages.
This SDK allows your site's visitors to receive push notifications from you. Send visitors custom notification content, target specific users, and send automatically based on triggers.
## Getting Started
View our [documentation](https://documentation.onesignal.com/docs/web-push-quickstart) to get started.
Please reference the OneSignal SDK on your webpage via our CDN URL (listed in our setup documentation) instead of copying the source into another file. This is because our SDK updates frequently for new features and bug fixes.
## Local Development
Install the dependencies `npm install` then you can `npm run dev`. This will start a dev server on port 4001.
The code will use navigator register on OneSignalSDKWorker.js to register the code as service worker.## Preview
To preview with the actual bundle you can run the build first e.g. `npm run build:dev` then cd into the `preview` folder and follow the instructions in that folder. But generally you can run `docker-compose up` or `npm start`.