Self-Hosted Web Push Integration Guide
Welcome to HyperPush X! This step-by-step guide helps you quickly integrate instant web push notifications into your website or web application. In just a few minutes, you will be ready to send real-time push alerts to re-engage your visitors and boost sales.
π How Web Push Works on Your Website
π Supported Browsers & Devices
HyperPush X works seamlessly across all major modern desktop and mobile web browsers with zero browser extensions required:
| Browser | Desktop Support | Mobile & Tablet Support | Status |
|---|---|---|---|
| Google Chrome | β Supported | β Supported (Android) | Ready |
| Mozilla Firefox | β Supported | β Supported (Android) | Ready |
| Apple Safari | β Supported (macOS) | β Supported (iOS 16.4+) | Ready |
| Microsoft Edge | β Supported | β Supported (Android) | Ready |
| Brave / Opera | β Supported | β Supported (Android) | Ready |
[!NOTE] Web Push requires an HTTPS secure connection on your website (e.g.
https://yourdomain.com).
β‘ Step 1: Add Your Website to HyperPush X
First, register your website in your HyperPush X console:
- Go to Websites in your dashboard (
/websites). - Click + Add Website.
- Enter your Site Name (e.g. Acme Store) and your Site Domain (e.g.
https://acme.com). - Click Register Website.

Once added, your website receives a unique Site Key (site_key) that connects your website to your HyperPush X account.

π₯ Step 2: Download Your Integration Files
Next, download your pre-configured SDK files from your dashboard:
- In your Websites list, click the three-dots menu (
β’β’β’) next to your domain. - Click Download SDK.

- Unzip the downloaded file. You will get two files:
sdk.jsβ Client JavaScript library for your pages.sw.jsβ Service Worker file that handles background notifications.
[!IMPORTANT] Important Placement Rule:
Uploadsw.jsto the root folder of your website (e.g.,https://yourdomain.com/sw.js). This allows HyperPush X to show notifications across every page on your site.
π» Step 3: Add Code Snippet to Your Website
Standard Web Page Integration (HTML)
Paste this small code snippet into the <head> or before </body> on your site:
<!-- HyperPush X Web Push -->
<script>
window.HyperPush = window.HyperPush || [];
window.HyperPush.push(['init', {
siteKey: 'YOUR_SITE_KEY_HERE',
serviceWorkerPath: '/sw.js',
autoPrompt: true,
bellWidget: true
}]);
</script>
<script src="/sdk.js" async></script>
React / Next.js Integration
If you use React or Next.js, add the setup inside a component lifecycle hook:
import { useEffect } from 'react';
export default function WebPushSetup() {
useEffect(() => {
window.HyperPush = window.HyperPush || [];
window.HyperPush.push(['init', {
siteKey: 'YOUR_SITE_KEY_HERE',
serviceWorkerPath: '/sw.js',
autoPrompt: true
}]);
const script = document.createElement('script');
script.src = '/sdk.js';
script.async = true;
document.head.appendChild(script);
}, []);
return null;
}
Vue 3 / Nuxt Integration
If you use Vue 3 or Nuxt, add the setup inside onMounted:
<script setup>
import { onMounted } from 'vue';
onMounted(() => {
window.HyperPush = window.HyperPush || [];
window.HyperPush.push(['init', {
siteKey: 'YOUR_SITE_KEY_HERE',
serviceWorkerPath: '/sw.js',
autoPrompt: true
}]);
const script = document.createElement('script');
script.src = '/sdk.js';
script.async = true;
document.head.appendChild(script);
});
</script>
π Step 4: Customize Your Opt-in Prompts
HyperPush X includes beautiful, high-converting subscription prompts and a floating notification bell widget:
You can easily customize prompt colors, headings, button text, and bell icons right inside your HyperPush X console:

[!TIP] Pro Tip: Triggering subscription prompts after a user interacts with your page leads to much higher subscription rates compared to prompting immediately on landing.
π·οΈ Step 5: (Optional) Segment & Tag Your Subscribers
Personalize notifications by attaching custom tags (like user interest, plan, or location) to your subscribers:
Tag Subscriber Interests
window.HyperPush.push(['tag', {
category: 'sports',
user_type: 'premium'
}]);
Connect Logged-in User IDs
window.HyperPush.push(['setExternalUserId', 'user_12345']);
π§ͺ Step 6: Test & Verify Your Setup
- Open your website in your browser.
- Click Allow on your subscription prompt or notification bell.
- Check Subscribers in your HyperPush X dashboard (
/subscribers). - You will see your browser listed as an Active subscriber!

π¨ Need Help? Quick Troubleshooting
[!TIP] Why is the prompt not appearing?
Check if your site is loaded overhttps://. Also ensure you uploadedsw.jsto your root directory.
[!NOTE] What if a user accidentally blocked notifications?
Browsers do not allow websites to automatically re-prompt blocked users. The visitor can re-enable notifications anytime by clicking the lock icon next to the URL in their browser address bar.