As the web becomes more powerful and there are more ways to engage with users, we must remember to use the new power responsibly.

I've been seeing a disturbing new trend far too often lately. I click on a link I find somewhere, the page loads, and then this pops up:

Web Push Notification prompt example
An unprompted prompt.

I've never been to your website before, Oklahoma Channel 4. I haven't even spent enough time here to read a single article. Yet you think I might be interested in signing up for what is no doubt a barrage of daily "breaking news" alerts from you?

This is the best way to not only slightly irritate your users, but to ensure that they won't register for push notifications. This is a lose-lose situation.

Mobile app developers have had access to push notifications for many years. It has always been a best practice to ask for push notification permission with a value proposition, often after a positive interaction. For a news site, this is likely after you've noticed a user has come to your site and read a few articles from start to finish. They obviously like your content at that point, so wait until then to hit them with the push notification option. For an e-commerce site, this might be after a user has bought a product. At that point, let them know they can be notified about important delivery updates, but don't hit every brand new user to your site with such a prompt.

OneSignal is a company that offers multi-platform push notification delivery services, including the web. It is their JavaScript SDK that powers most of the uncalled for push notification prompts I encounter. To be clear, I do not think OneSignal is in the wrong here whatsoever — it looks like they offer a nice product. What is interesting about this is that they have lowered the barrier to entry for enabling push notifications on a web site. It feels like a lot of businesses, upon realizing they can serve web users with push notifications at a low development cost, simply slap this feature on their site and call it a day. This is not how push notifications should be treated. It is going to desensitize users to these prompts, not unlike pop-up ads. Unlike pop-up ads however, push notifications offer businesses a powerful way to engage with users outside of active website viewing. But you have to offer a value proposition to the user, like I described above. Do this right, and you turn a lose-lose into a win-win. Again, mobile app developers have known this for a long time, and for very good reason. These powerful features arriving to the web platform are supposed to help bridge the gap between a web page and a native app, so it's worth treating the features as if it was a native app.

Another feature you may have noticed in the screenshot above is the red bell icon in the bottom right corner. This is also a part of the OneSignal SDK, and it appears that by default it is always fixed in a corner of the page as you scroll. I have not used their product so I don't know if this is opt-in or not, but I'm seeing it on too many sites. Think about it — there is a position: fixed icon of which the only purpose is to trigger a prompt asking if you want push notifications. No you say? The bell icon stays in case you (presumably) change your mind. This is crazy, because no self-respecting native app would do this. If you want to provide an opportunity for re-engagement of push notifications, try putting a button at the bottom of your news articles (because only users who are genuinely interested in your content will see it). Or place the button on a thank-you page after a user purchases a new item. Make it a value proposition to users with a track record of engagement. Don't spam all users all the time, that's a horrible experience.

This advice doesn't stop at push notifications. The same practices should be extended to any powerful web platform feature that requires prompting the user for permission, such as camera access or installing a progressive web app. Browsers could theoretically try to mitigate spammy behavior with more sophisticated logic around showing these prompts, but it's likely this would also create more trouble for developers who are already doing it correctly. That's definitely not ideal.

Please think about your users before implementing powerful features like push notifications, and help keep the web a great platform for everyone!