Get the SDK


Note: Please follow our Angular guide if you're using Angular.

Our Web Push SDK currently supports the following browsers and platforms:

  • Safari: iOS 16.4 +
  • Chrome: Windows / Mac / Android / iOS 16.4 +
  • Firefox: Windows / Mac / Android / iOS 16.4 +
  • Opera: Windows / Mac / Android / iOS 16.4 +
  • UC Browser: Android
  • Microsoft Edge: Windows / Mac

Note: Web Push for Google Chrome is currently blocked in China.

Important: Your website must be served over HTTPS for Web Push integration to work (except for when developing on http://localhost/).

Get the SDK


If you're using JavaScript modules, install version 1.0.9 of the Pushy Web SDK from npm using the following command:

npm install pushy-sdk-web --save

Alternatively, import version 1.0.9 by adding the following line to the <head> tag:

<script src="https://sdk.pushy.me/web/1.0.9/pushy-sdk.js"></script>

If you're interested, check out the SDK changelog to see what's new in the latest version of the SDK.

Create Service Worker


Create a file called service-worker.js in the root directory of your website with the following contents:

// Import Pushy Service Worker 1.0.9
importScripts('https://sdk.pushy.me/web/1.0.9/pushy-service-worker.js');

This file must be accessible at https://example.com/service-worker.js, where example.com is your website hostname.