Add Web Push Notifications to Any Site

How to Add Web Push Notifications to Any Site (3 Easy Steps)

Looking for an easy way to set up push notifications to your site?

Most push notifications can be really confusing to set up. The worst part is that you’ll need a developer to go through developer documentation and API documentation to set up push notifications.

But adding web push notifications to a site isn’t really that complicated.

In this article, we’ll show you how to add push notifications to your website even if you’ve never done it before. And we’ll do it without the technical jargon. So, even if you’re not a developer, you can still install push notifications pretty easily.

For this article, we’re going to use PushEngage to set up push notifications on your website. PushEngage is the #1 push notification software in the world. So, your campaigns will be in good hands.

Let’s dive in.

How to Install Push Notifications on Your Site

Before we start, here’s a quick look at what you can expect on your site at the end of this article. If you follow the steps in this tutorial you should be able to send push notifications from your site just like this one:

1ere Abandoned Cart example

And it doesn’t matter at all if your site was built on a popular Content Management System (CMS) such as WordPress or if it’s a custom-built site. You’ll be able to install push notifications on your site no matter what.

Let’s dive in.

Step #1: Set Up Your PushEngage Account

Head over to the PushEngage home page and click the Get Started button:


You can select the free plan to try out PushEngage, or choose a paid plan if you’re serious about growing your business. The paid plans include better audience targeting options and campaign automation features.

Once you’ve signed up for an account, head over to the PushEngage dashboard and go to Settings » Site Settings » Installation Settings:

PushEngage Site Settings

This is where you configure your site details and branding. Go ahead and set a logo and site URL for your push notifications.

Your push notification subscribers will see your Site Name, Site Image, and Site URL on your notifications. So, you should set these up right now so that you can test your push notifications later on.

Step #2: Get the Installation Code from PushEngage

Next, you’ll need to head over to the PushEngage dashboard and get the installation code. Go to Settings » Site Settings » Installation Settings:

Add Push Notifications on Squarespace site

This is where things start to get a little bit technical.

Inside this tab, you’ll see that you can get a different code for different types of websites.

Find the right one for your site and copy it.

If you’re running a site on a CMS that isn’t listed in the tab, you can head over to either HTTP or HTTPS tabs based on whether your site has an SSL certificated installed.

A really important part of this step if you’re using an HTTPS site is having access to your server’s root folder. For push notifications to work on an HTTPS site, you’ll need to download the service-wroker.js file from the same tab. And then, upload it to your root folder.

NOTE: If you can’t upload the service-worker file to the root folder, you can still upload the file to another folder. Go to PushEngage Dashboard » Settings » Site Settings » Advanced Settings

Just follow the instruction in the Service Worker Settings and you’re golden:

Service Worker Settings

Finally, you’ll want to place the installation code for PushEngage in the HTML <head> of your website. If you’re a developer who’s used to coding in HTML, you already know how to do this.

But if you’re new to HTML and you’re using a CMS to run your site, don’t worry. The process to edit the HTML <head> is different for different platforms. So, we’ve created detailed, step-by-step guides for the most popular platforms for you:

For certain CMSs, you can insert your installation code directly from your dashboard. In other instances as with PrestaShop, you’ll need to use the PushEngage API Key instead. So, we recommend following these platform-specific tutorials to add the push notification code correctly.

Step #3: Configuring the PushEngage Opt-In

Finally, in your PushEngage dashboard, go to Settings » Subscription Settings » Subscription Dialogbox » Edit:

PushEngage Installation Settings

From here, you can customize your push notification opt-in. If you need help with that, you should check out this article on how to create a custom push notification opt-in.

If you need some inspiration, you can check out this article on high-converting push notification opt-ins

BONUS Step: Create a Welcome Notification

Once you’re done setting up the opt-in, your site can collect subscribers.

But how do you know if your push notifications are working properly?

We recommend that you create a welcome push notification to test if your setup went smoothly. A welcome notification is a push notification you send a new subscriber to confirm their subscription and welcome them on board. 

Head over to Settings » Site Settings » Installation Settings and configure your welcome message:

New Welcome Push Notification

Finally, head back to your site and opt for your own push notifications to test whether it’s all working smoothly.

And that’s all there is to it!

You have successfully set up web push notifications on your website. It’s time to head back to your PushEngage dashboard and start creating your push notification campaigns.

Wrapping Up

That’s all for this one, folks!

If you’re new to push notifications, you should follow a full-blown push notification testing process before you go live. It’ll help you troubleshoot common issues before your visitors see them and start complaining about a broken user experience.

We recommend that you get in touch with our Customer Success Managers if you’re stuck with any of this. We’re more than happy to help you with any issue.

And if you haven’t already, go ahead and give PushEngage a try. PushEngage is the #1 push notification service in the world. So, if you’re serious about growing your business, PushEngage is the right option for you.

Get started with PushEngage today!

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

Engage and Retain Visitors AfterThey’ve Left Your Website

Increase the value of every web visit with Push Notifications that are hard to miss.

  • Forever Free Plan
  • Easy Setup
  • 5 Star Support