How to add web push notifications to a Blogger blog (free setup)
Blogger is the one platform where the standard web push setup quietly breaks, and the error message does not explain why. This post covers the cause, the two setups that actually work, and the permission details that dec
Blogger is the one platform where the standard web push setup quietly breaks, and the error message does not explain why. This post covers the cause, the two setups that actually work, and the permission details that decide whether anyone ever receives your notifications.
Why Blogger needs a different setup
Web push runs on a service worker: a JavaScript file served from your site root at a fixed path, for example /pushkit-sw.js. A service worker can only control pages inside its own scope, so it has to be served from your own origin.
Blogger gives you posts, pages, a theme and gadgets. It does not give you a file manager or any way to serve a file at the blog root. That means yourblog.blogspot.com cannot host the service worker, and no snippet can change that.
There are two ways around it.
1. Serve the file yourself. If the blog sits behind a domain you control (Cloudflare Pages, Netlify, a small server, or a proxy in front of Blogger), you can host the service worker at the root and use the provider's native mode. This is the cleanest setup: the subscription belongs to your origin.
2. Popup mode. The opt-in happens in a small window on the push provider's domain, where their service worker already lives. The subscriber is still attached to your site key, so you can segment, schedule and send as usual. The tradeoffs: one extra window at opt-in time, and the subscription is tied to the provider's origin rather than yours.
For a plain blogspot.com blog, option 2 is the only one that works. It is also the one most guides leave out.
A working setup, start to finish
I will use Pushly here because it is free and I built it, but the shape is the same for any standards-based provider that offers a hosted opt-in.
Step 1. Add the site. Open the provider's dashboard, sign in, and enter the blog address. If the blog has an RSS or Atom feed, the provider can pick it up and push new posts automatically.
Step 2. Paste one line into a gadget. In Blogger: Layout, Add a Gadget, HTML/JavaScript, paste, Save.
<script async src="https://pushly.cc.cd/sdk.js"
data-site-key="YOUR_KEY"
data-mode="popup"></script>
data-mode="popup" is the part that matters on Blogger. Without it the snippet tries to register a service worker on the blog's own origin and fails silently.
Step 3. Decide when the prompt appears. Asking on the first page load is the fastest way to get a permanent no. The useful attributes are delay in seconds, scroll depth, visit count, and the wording itself:
<script async src="https://pushly.cc.cd/sdk.js"
data-site-key="YOUR_KEY"
data-mode="popup"
data-title="New posts, one tap away"
data-text="A short alert when we publish. Turn it off any time."
data-delay="20"
data-scroll="40"
data-visits="2"></script>
Step 4. Test on a real phone before you tell anyone. Open the provider's test link on an Android phone, allow, and send a test campaign to yourself. A subscription that never receives a notification is worse than no subscription.
The permission details that matter more than the snippet
Most of the work is not code.
One prompt per visitor, with a real reason. Browsers punish repeated prompts at the browser level, not the site level: a visitor who hits "block" is gone for good, and you cannot ask again. Give the reason before the native dialog appears, and make the first ask count.
Back off after a dismiss. If someone taps "not now", wait days, not hours. A good provider lets you set a backoff sequence.
Say what they get and how often. "A short alert when we publish something new, turn it off any time" converts better than "Enable notifications to stay updated", and it is honest.
Make turning it off one tap. A visible bell or a link that unsubscribes. Hiding the exit is how sites get their notifications blocked at the browser level.
iOS is a different story. Safari on iPhone and iPad only supports web push for sites added to the Home Screen, since iOS and iPadOS 16.4 (WebKit, 2023). On a blog, that is a small share of readers. Android Chrome and desktop browsers are where the subscribers actually come from. Do not promise "notifications on every device".
What to measure
Three numbers tell you whether this is working:
- Opt-in rate: subscribers divided by prompts shown. Under 2 percent usually means the timing or the wording is wrong.
- Click rate per campaign: clicks divided by delivered. A 3 to 8 percent click rate on a genuinely new post is normal; single digits on every send means you are sending too often.
- Dead endpoints: addresses the push service reports as gone (410 and 404 responses). Prune them, or your delivered count lies to you.
What I would skip
- Buying or importing subscriber lists. Web push subscriptions cannot be transferred. Anything sold as a list is junk or a scam.
- Fake urgency in every notification. It works once and then people turn you off.
- Sending daily to a small list. Notifications are for "this is new and you asked for it", not for a content treadmill.
Wrapping up
On Blogger the only real decision is popup mode versus a custom domain with your own service worker. Everything after that is permission hygiene: ask late, ask once, explain the value, and let people leave.
I build Pushly, a free web push and email tool for blogs and small sites. The free plan covers five sites with 2,000 push subscribers each, and the steps above are the ones in its docs. If you use a different provider, the same rules apply.
Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.