Getting Started
SharePush Web SDK — Documentation
Complete reference for the SharePush Web SDK: installation, configuration, prompts, event tracking, browser support, and troubleshooting.
SharePush Web SDK — Documentation
The SharePush Web SDK is a single JavaScript snippet you add to your website. It handles web-push subscription, the opt-in prompts (push + "install app"), delivery/click/view analytics, and graceful fallbacks for browsers and in-app webviews that don't fully support push.
This guide is split into focused pages:
| Page | What's inside |
|---|---|
| 1. Overview & Quick Start | What the SDK does and the minimal setup to go live |
| 2. Configuration Reference | Every Sharepush.init() option, its type and default |
| 3. Push Notification Prompt | The opt-in prompt, two-step flow, auto-prompt |
| 4. PWA Install Prompt | The "install app" prompt, per-platform targeting, iOS |
| 5. In-App Browser Bridge | Handling Instagram/Facebook/TikTok webviews |
| 6. Event Tracking & Analytics | delivered / clicked / closed / viewed, attribution, props/UTMs |
| 7. Triggers, Theming & Localization | Delay vs scroll triggers, themes, languages |
| 8. Browser & Platform Support | iOS 16.4+, DuckDuckGo, desktop, tablets |
| 9. Troubleshooting & FAQ | Common issues and how to diagnose them |
#At a glance
- One snippet.
<script src=".../api/v1/sdk.js"></script>+ aSharepush.init({...})call. - Required:
apiUrl,apiKey, and a service worker file on your origin (/sharepush-sw.jsby default). - Three prompt surfaces, coordinated so a visitor never sees two at once: the push opt-in, the PWA install invite, and the in-app bridge.
- Four analytics events:
delivered,clicked,closed(fired by the service worker) andviewed(fired by the SDK on the landing page). - Privacy-aware: degrades cleanly on browsers that block push (DuckDuckGo, in-app webviews) and on iOS versions below 16.4.
Version note: this documentation reflects the SDK as currently built in
resources/js/sharepush/sdk/. The served bundle is/api/v1/sdk.js; the service-worker logic is/api/v1/sw-logic.js.