Web push notifications on BigCommerce
BigCommerce makes the script easy — Script Manager can add it to every page. The service worker is the hard part: BigCommerce doesn’t let you upload a file to your store’s root. Here’s an honest look at what works.
- The snippet goes in Storefront → Script Manager (Head, All pages).
- BigCommerce’s WebDAV only lets you upload under /content/ (and /.well-known/), not the store root.
- Pusharoo’s worker needs to be served at /sw.js with scope /, so a /content/ upload isn’t enough on its own.
- If your domain is proxied by Cloudflare, a Worker route can serve /sw.js; otherwise collect subscribers on a site you control.
Why the service worker is the hard part
Every web push service has the same requirement: browsers only deliver push to a service worker served from your domain, and Pusharoo registers its worker with scope /, so https://yoursite.com/sw.js must open as JavaScript. Platforms where you control the web root make this a one-minute job; hosted platforms that don’t let you place a root file need a workaround or won’t work.
BigCommerce’s own help article on File Access (WebDAV) explains that the root directory is shared by all stores and can’t be edited; you upload into folders such as content, which appear at /content/…. A worker served from /content/sw.js can only control /content/ unless the server sends a Service-Worker-Allowed: / header — which you can’t set there. Some push vendors design their worker for a subfolder; Pusharoo’s standard install needs the root.
Option 1: a Cloudflare Worker for /sw.js
If your store’s custom domain runs through Cloudflare’s proxy, a tiny Cloudflare Worker can answer only /sw.js and pass every other request through to BigCommerce. Download the ready-made Worker from your website page in the Pusharoo dashboard, deploy it in Cloudflare (Workers & Pages → Create → Worker) and add the route yourstore.com/sw.js*. The Shopify guide walks through the same steps with screenshots of what to check.
Before proxying a hosted store through your own Cloudflare zone, check BigCommerce’s current guidance for custom domains and test on a non-production domain: certificate issuance and domain verification can be affected by proxy settings.
Option 2: collect subscribers on a site you control
If you also run a blog, lookbook or landing site on your own hosting, install Pusharoo there and link to products in the store from each notification. Subscriptions belong to the origin where people subscribed, so this works well when the blog has real traffic of its own.
Adding the snippet with Script Manager
- In the BigCommerce control panel open Storefront → Script Manager → Create a Script.
- Name it “Pusharoo”, set Location to Head, Pages to All pages and Script type to Script.
- Paste the snippet:
<script src="https://pusharoo.com/sdk/pusharoo.js" data-site="pk_your_site_key" async></script> - Choose the consent category (see below) and save.
Cookie consent categories
If you enable BigCommerce’s cookie consent banner, Script Manager loads each script only when its category is allowed. Pusharoo doesn’t set cookies — it uses the browser’s push subscription and localStorage for “Not now” — and the browser asks separate permission before any notification. Many stores therefore classify it as functional; pick the category your privacy policy supports, and remember visitors who decline that category won’t see the prompt (consent notes).
A BigCommerce push plan
| Moment | Notification | How with Pusharoo |
|---|---|---|
| New subscriber | “You’re in — here’s this week’s bestsellers” | Automation on subscribe |
| Cart left | “Still deciding? Your cart is saved” | Send added_to_cart/purchase events from your theme; automation with “stop if purchase” |
| Restock | “Back in stock: Linen Shirt, size M” | REST API from your stock system, filtered by a wishlist tag |
| Sale | “48-hour sale starts now” | Scheduled campaign to “seen in last 30 days” |
Test checklist
- Open
https://yoursite.com/sw.js— you should see JavaScript, not a 404 or your theme’s error page. - Open the site in Chrome, wait for the prompt and allow twice.
- Check that the subscriber count rises in the dashboard, then send yourself a test.
- Repeat on Android, and on iPhone after adding the site to the Home Screen (testing guide).
Questions
Can I upload sw.js to the root of a BigCommerce store?
No. BigCommerce’s WebDAV root is shared and read-only; uploads go into folders like /content/. That’s why a Cloudflare Worker route or another site you control is needed for Pusharoo.
Does BigCommerce have built-in push notifications?
Not as a core storefront feature at the time of writing; stores use apps or third-party services.
Will the snippet slow my store?
It loads asynchronously and waits before prompting, so it doesn’t block rendering.
Keep reading
Web push on Shopify: what works, honestly
Why Shopify blocks a root sw.js, and the workarounds that genuinely work.
Push notifications for online stores
Flash sales, back-in-stock, price drops and retargeting — without paying for ads.
Abandoned cart push notifications, honestly explained
What cart reminders need technically, timing and copy, and which tools trigger them — honestly.
Web push on Wix, Squarespace and Webflow
Why the root service worker file is the blocker on hosted builders, and the honest workarounds.
More in Platforms: Web push for WordPress and WooCommerce · WooCommerce push notifications: setup and playbook · Magento 2 push notifications · Web push notifications for PrestaShop · Web push notifications for Joomla · Web push notifications for Drupal · Web push notifications for Ghost blogs · All guides
Free for life. No limits.
Unlimited subscribers, campaigns and automations. No badges. About five minutes to install.