HomeHow to

A step-by-step guide to push notifications in Bootstrap

This tutorial shows you how to add push notifications to your Bootstrap app using the Web Push API. Get all the information you need to send and manage push notifications without writing code.

A step-by-step guide to push notifications in Bootstrap Logo
Large cover image for A step-by-step guide to push notifications in Bootstrap

Step 1: Set up your Bootstrap project

Progressier can enhance your Bootstrap web app with additional features such as push notifications and the ability to be installed as a Progressive Web App (PWA). You can incorporate Progressier into your project when your app is live and accessible at a custom domain.

Step 2: Sign up for Progressier

Progressier is a web toolkit that allows you to easily add new capabilities to your Bootstrap app (and apps from hosting providers as well) using little to no code at all.

If you haven’t done so already, create your Progressier account. It comes with a free trial (no credit card required!) so you can test all features free of charge for 14 days without risk.

Step 3: Create your PWA

Next, create your Bootstrap app in Progressier. Go to New PWA, then select Bootstrap in the first dropdown menu. Give your app a name and paste the URL of your Bootstrap project in the third field.

Step 4: Wrap up your Bootstrap PWA setup

On the next screen, you'll see a few easy tasks to complete. Click on each to display detailed instructions, and click Done to mark them as complete. Progressier automatically shields you from a number of gotchas and potential mistakes.

Step 5: Allow notifications from your domain

Head back to your app's domain. You should be prompted to allow notifications. If not, click on the Floating Action Button at the bottom-right corner of your app. There are also other widgets you can use to ask users to allow notifications.

Step 6: Compose your first notification

Our Push Composer allows you to compose a notification, select a specific group of users of your Bootstrap app to send it to, and even schedule its actual delivery from 15 minutes to 14 days in the future.

Step 7: Sync push subscriptions with user profiles (optional)

Sending the same notification to every user for marketing purposes is one thing. Sending notifications programmatically to a user to react to events in your Bootstrap app is another. Luckily, Progressier comes with a solution for both use cases. Simply connect your user data (e.g. a user ID or user email), then call our Push API in your server-side code to send a push notification to a specific user. You don't have to manage push subscriptions on your end.

Benefits of enhancing your web app with push capabilities

1. Improving user engagement: Push notifications can help keep users engaged with your app by delivering timely and relevant updates and information.

2. Driving traffic to the app: Push notifications can help drive traffic back to your Bootstrap app by providing users with a reason to open it.

3. Increasing retention rates: Push notifications can help keep users coming back to the app by providing them with valuable and interesting content.

4. Boosting conversion rates: By delivering personalized and targeted messages to users, push notifications can help increase conversion rates and drive sales.

5. Providing a better user experience: Push notifications can provide a more convenient way for users to receive updates and information from your app, improving the overall user experience.

The disadvantages of push notifications in Bootstrap

Apple has announced that push notifications will be coming to iOS in 2023. But in the meantime, the Web Push API only works on desktop and Android, so if your web app is mobile-first, only half of your users will be able to benefit from receiving push notifications.

Because of their limited deliverability, push notifications are not as flexible as email or even text messages as a communication tool. Also it's easy for users to unsubscribe from your notifications, so you'll have to make sure you don't notify them too frequently.

What are the best push services for Bootstrap apps?

Here are some popular examples of push services Bootstrap app owners like to use:

- Firebase Cloud Messaging (FCM): This is a free, cross-platform messaging service provided by Google that allows you to send push notifications to Android, iOS, and web devices.

- OneSignal: Probably the most popular option for push notifications. OneSignal works well across platforms and provide more options than FCM but can be quite costly, especially at scale.

- Progressier: Progressier is a PWA toolkit that allows developers and no-code makers to effortlessly send push notifications for marketing or targeted messaging purposes. It is built specifically for web apps and may not be the best option for websites or native apps.

- WonderPush: WonderPush is a cloud-based push notification service that enables developers to send targeted messages to their users on various devices.

Developing your own push notification solution

If you prefer to build your own push notification solution, this is also possible, although it will take you a lot more time and effort. I've written about the process of creating a complete push solution that can scale to 1 million users with Firebase. A push service has these components:

1. Prompts to allow push notifications: the first step is to ask users to allow notifications in their browser. There are several ways to do this, but it often involves building some custom UI

2. A database to save push subscriptions: a push subscription is essentially an API endpoint. When a user allows notifications, you need to save this endpoint in your database with additional information about the preferences of that user. This can be topics or a specific user ID or email.

3. A push composer: composer the content of the notification with a title, body and the icon of your Bootstrap app. Then make a POST request to that endpoint.

4. A push queue: send the payload of the push notification to the API endpoint of a particular subscription, and they'll receive your notification.

Which platforms are compatible with push notifications?

The Web Push API is compatible with Windows (via Chrome, Edge, Firefox, Opera), macOS (Firefox, Chrome, Edge, Safari 16 on macOS Ventura), Android (Samsung Internet, Chrome, Firefox). Push notifications will also soon be available on iOS with Safari.

Your app here

Augment your Bootstrap app with push notifications

Elevate your app with our no-code push notification toolkit

Get started See plans