Skip to main content

How To Set Up Firebase Messaging Key For Web Push Notifications


Browser push notifications have become a mainstream solution for bloggers & websites owners to bring back their one-time visitors and convert them into steady readers.

However, many newbies who are using these services (like PushEngage, Letreach, Pushcrew, or any other) make a major mistake of not setting up their Firebase messaging key. This becomes a big problem when switching push notification providers.

Here at ShoutMeLoud, I use PushEngage for sending push notifications & they are pretty solid. I have already shared a detailed guide on setting up push notifications for your website with PushEngage over here. If you haven’t done that yet, you should do it right away.

But in this tutorial, we will look at setting up a Firebase project server key & project ID.

Now the obvious question is:

  • Why do we need to do this?

Setting up your own Firebase Cloud Messaging sender ID is very important. When you are using the default key of your push notification service (free or paid), if you ever move to some other service, you won’t be able to migrate your existing subscribers.

You can imagine how big of a loss this would be.

When you are setting up push notifications for your website & you use your own Firebase Cloud Messaging sender ID, you can easily move from one service to another in the future without losing your existing subscribers.

So now that we’re on the same page, let’s follow the steps to set up our Google Cloud Messaging key (GCM key).

How To Own Your Push Notification Subscribers: Tutorial

Head over to the Firebase console page & log in using your existing Google ID.

Click on “Create New Project”.

Create New Project

On the pop-up, give a meaningful name to the project. Something like “(domain name) Push”.

Firebase Project

It will take a few seconds to create the project & it will automatically redirect you to the project dashboard.

Now, on the left-hand side, click on the “gear” icon & select “Project settings”.

Firebase Project Settings

On the next page, click on “Cloud Messaging” & you will find your “Sender ID” & “Server key”.

Firebase Cloud Messaging Server key

That’s it. Wasn’t that simple?

Wondering what to do next?

Well, if you are using PushEngage, simply log in to your dashboard:

Go to Settings > GCM settings/FCM Settings & copy/paste the “GCM API Key or FCM Server Key” & “GCM Project Key or FCM Sender ID” value.


Then click on “Verify Settings” to ensure everything is working fine.

Here are a few common questions:

Note: This is based on my experience with PushEngage. For other services, it could be different.

Q: What will happen to the existing subscribers after setting up the Firebase messaging key?

A: Nothing; they will keep receiving updates.

Q: What else do you need to ensure you can migrate services?

A: You should definitely configure your own sub-domain. This is vital if you wish to port your existing subscribers.

Q: What will happen if I move from HTTP to HTTPS (your own sub-domain for push notifications)?

A: PushEngage uses a technique to ensure duplicates don’t happen. However, there is a chance that a few subscribers will subscribe via your sub-domain. This will cause them to receive dual notifications & could be annoying. However, as I said, PushEngage tries to minimize this, but it’s not possible to avoid it 100%. Your best bet is to shift to your own sub-domain as fast as possible for serving push notifications.

Q: How do you move to your own sub-domain (HTTPS) for push notifications?

A: I will cover this in an upcoming tutorial.

I also had a quick word with the PushEngage CEO “Ravi Trivedi” regarding upcoming features & some of them sound pretty exciting:

  • Option to segment users automatically.
  • Automatic sequencing for new subscribers.
  • Subscription page for giving subscribers the option to update their subscription settings.

The transparency & ability for users to port makes me admire the team behind PushEngage. There are also other similarly good services that you can consider using as well (mentioned in the beginning of this post).

Again, if you haven’t set up push notifications, you should definitely do that.

I hope this guide helps you understand the technical aspects of push notification services. If you have any queries, feel free to ask me in the comments below.

Don’t forget to share this post!

Subscribe on Youtube

How To Set Up Firebase Messaging Key For Web Push Notifications is a post from ShoutMeLoud - Shouters Who Inspires

from ShoutMeLoud


Popular posts from this blog

How to Get SMS Alerts for Gmail via Twitter

How do you get SMS notifications on your mobile phone for important emails in your Gmail? Google doesn’t support text notifications for their email service but Twitter does. If we can figure out a way to connect our Twitter and Gmail accounts, the Gmail notifications can arrive as text on our mobile via Twitter. Let me explain:Twitter allows you to follow any @user via a simple SMS. They provide short codes for all countries (see list) and if you text FOLLOW to this shortcode following by the  username, any tweets from that user will arrive in your phone as text notifications. For instance, if you are in the US, you can tweet FOLLOW labnol to 40404 to get my tweets as text messages. Similarly, users in India can text FOLLOW labnol to 9248948837 to get the tweets via SMS.The short code service of Twitter can act as a Gmail SMS notifier. You create a new Twitter account, set the privacy to private and this account will send a tweet when you get a new email in Gmail. Follow this account …

Instagram Story links get 15-25% swipe-through rates for brands, publishers

Instagram may arrived late as a traffic source for brands and publishers, but it’s already showing early signs of success, driving new visitors to their sites and even outperforming its parent company, Facebook.For years brands, publishers and other have tried to push people from the Facebook-owned photo-and-video-sharing app to their sites. Outside of ads and excepting a recent test with some retailers, Instagram didn’t offer much help to companies looking to use it to drive traffic. So they had to find workarounds. They put links in their Instagram bios. They scrawled short-code URLs onto their pictures. And they typed out links in their captions.Then last month Instagram finally introduced an official alternative to these hacky workarounds: the ability for verified profiles to insert links in their Instagram Stories.Almost a month after the launch, 15% to 25% of the people who see a link in an Instagram Story are swiping on it, according to a handful of brands and publishers that h…

Five great tools to improve PPC ads

Every digital marketer wants to reach the top position on the search engine results. However, if you’ve recently launched a new website or your niche is saturated, starting with paid search ads sounds like a good idea.Strategically created PPC campaigns can drive leads, sales or sign-ups to your websites. You know what? In fact, businesses earn an average of $8 for every dollar they spend on Google Ads.Optimizing PPC campaigns is not easy, but it’s very powerful if you do it properly. Just like SEO, it is essential to conduct extensive keyword research, optimize ad copy, and design high-converting landing pages.Fortunately, there are a lot of effective PPC tools that will help you analyze your competitors’ PPC strategies, figure out tricks in their campaigns, and improve your PPC campaigns.If you are ready to take an evolutionary leap in your PPC advertising, take a look at my list of five amazing tools to save you time, give you crucial insights, and raise money for your business.Fiv…