Web Push Setup
This guide walks through configuring OneSignal web push notifications for your Shopify store using Vendo.
Prerequisites
- A Shopify store with the Vendo app installed
- A OneSignal account (free tier available)
Step 1: Create a OneSignal App
- Log in to OneSignal
- Click New App/Website
- Enter your app name (e.g., your store name)
- Select Web as the platform
- Choose Custom Code as the integration type
Step 2: Configure Web Push Platform
In the OneSignal setup wizard:
- Site Name — Your store name
- Site URL — Your Shopify store URL (e.g.,
https://yourstore.myshopify.com) - Default Icon URL — Upload your store icon (recommended: 256x256 PNG)
Service Worker Configuration
This is critical for Shopify stores. Shopify does not allow serving files from the site root, so the service worker must use a custom path:
| Setting | Value |
|---|---|
| Service Worker Path | /apps/vendo/ |
| Service Worker Filename | OneSignalSDKWorker.js |
| Service Worker Scope | /apps/vendo/ |
- Click Save to complete the web platform setup
Step 3: Get Your Credentials
From the OneSignal dashboard, navigate to Settings > Keys & IDs:
- App ID — Your OneSignal application ID
- REST API Key — Used for server-side event syncing (optional but recommended)
Step 4: Configure in Vendo
- In the Vendo Shopify app, navigate to Destinations > OneSignal
- Enter your OneSignal App ID
- Optionally enter your REST API Key for server-side events
- Click Save
Step 5: Enable the Theme Block
- In your Shopify admin, go to Online Store > Themes > Customize
- Click App embeds (in the left sidebar)
- Enable the Vendo theme block
- Save the theme
The Vendo theme block loads the OneSignal SDK on your storefront and handles:
- SDK initialization with your App ID
- Service worker registration at the correct path
- Push prompt display based on your settings
- User identification (push subscription, login, newsletter signup)
- Tag syncing for identified users
Step 6: Configure Push Prompts
In the Vendo app under OneSignal > Push Settings, customize:
Subscription Bell
A floating button that visitors can click to subscribe:
| Setting | Options |
|---|---|
| Enable | On / Off |
| Position | Bottom Right / Bottom Left |
Slide-Down Prompt
A banner that slides down from the top of the page:
| Setting | Description |
|---|---|
| Enable | On / Off |
| Message | Custom prompt message |
| Accept Button | Text for the subscribe button |
| Cancel Button | Text for the dismiss button |
Prompt Timing
| Setting | Description |
|---|---|
| Auto-Register | Prompt immediately on page load |
| Delay | 0–60 seconds before showing the prompt |
Welcome Notification
Sent immediately after a user subscribes:
| Setting | Description |
|---|---|
| Enable | On / Off |
| Title | Notification title |
| Message | Notification body text |
Step 7: Select Events to Sync
In the Vendo app under OneSignal > Events:
Server-Side Events
| Event | Default |
|---|---|
| Order Received | Enabled |
| Order Fulfilled | Enabled |
| Order Delivered | Enabled |
| Order Refunded | Enabled |
| Order Partially Refunded | Enabled |
| Cart Abandoned | Enabled |
Client-Side Events
| Event | Default |
|---|---|
| Page Viewed | Enabled |
| Product Viewed | Enabled |
| Collection Viewed | Enabled |
| Search Submitted | Enabled |
| Product Added to Cart | Enabled |
| Cart Viewed | Enabled |
| Checkout Started | Enabled |
| Checkout Completed | Enabled |
Step 8: Verify Setup
Check Service Worker
Visit your store and open browser DevTools (F12):
- Go to Application > Service Workers
- Verify
OneSignalSDKWorker.jsis registered - The scope should show
/apps/vendo/
Test Notifications
- Subscribe to push notifications on your store
- In the OneSignal dashboard, go to Messages > New Push
- Send a test notification to yourself
- Verify the notification appears
Verify in OneSignal Dashboard
- Go to Audience > All Users
- Confirm your test subscription appears
- Check that user tags are being synced (email, name, etc.)
Troubleshooting
Service Worker Returns 404
The service worker path must be /apps/vendo/OneSignalSDKWorker.js. Verify:
- The Vendo theme block is enabled in your Shopify theme
- You’re accessing the store via its primary domain
Push Prompt Not Appearing
- Check that the Vendo theme block is enabled in App embeds
- Ensure your browser allows notifications (check browser settings)
- Verify you haven’t already dismissed or subscribed
- Try an incognito/private window
Notifications Show “Delivered” But Don’t Appear
- Check your OS notification settings (System Preferences > Notifications)
- Verify the browser has notification permissions
- Some browsers require the site to be served over HTTPS
Tags Not Appearing in OneSignal
- Tags sync only for identified users (logged in, subscribed to push, signed up for newsletter, or completed a purchase)
- Anonymous visitors are not tracked in OneSignal
- Check the Vendo app logs for sync errors
Events Not Triggering
- Verify the events are enabled in OneSignal > Events in the Vendo app
- Client-side events require the Web Pixel to be active and the user to be identified
- Server-side events require the REST API Key to be configured
- See How It Works for details on user identification