PWA
Last updated
Last updated
PushExpress -- SDK PWA Native Push
Create new application.
Choose type of application Web Push.
After creating the application, push_express_app_id will be available.
The VAPID KEY will also be available in application settings. You will need it when integrating the sdk in the app.
Add PushExpress library below
Perform the SDK initialization
Example code index.html
Create service worker file in your project. The file name must be as follows "push-express-sw.js".
[!IMPORTANT] The service worker file must have a name push-express-sw.js . Otherwise, the installation of service worker will fail.
Add pushExpressConfig in service worker.
push Express Config contains the following required settings - appID, vapidKey. As well as optional externalID and tags fields.
Send the unique installation id here.
Example code push-express-sw.js
appID required field is located on the application page in the Push Express service ().
The vapidKey is located in your application settings ( ).
The segment code. Use it to add a device to a segment. Segments can be created in the of your personal account.
To transfer devices to other users of the service, use the functionality of webmasters. You can add a webmaster in the of your personal account. 6. Import library in service worker.