Firebase Cloud Messaging
Learn how to send push notifications to users with Firebase Cloud Messaging.
Table of Contents
Firebase Cloud Messaging helps engage push notification-registered users by sending them messages while outside of the app.
How to send a cloud message/push notification
Enter your Firebase project, selecting Cloud Messaging on the left menu and select "New notification".
Message content
Fill in your notification content on the interface as displayed below.
How to send cloud messaging tests to a device
As well as Firebase Cloud Messagings preview screen, you can also send test push notifications directly to devices which can be useful. Download the app onto a device and check in device settings that notifications for the app are turned on.
Go into the app > Settings > tap x10 on Powered by Pugpig and the Custom Settings modal will appear. Copy the Push identifier and paste into the FCM registration token field in Firebase.
Click the blue "Send test message" button and then press test as seen below.
Targeting
Select the iOS and/or Android versions of your app.
Reasons you may prefer to send individual messages per platform include; if your app is named differently per platform; if it's a subscription related message and pricing is different; if you publish different content per platform.
Scheduling
Schedule your message and/or set your recurring details.
Conversion events
You can optionally choose a desired analytics event you'd like users to trigger as a result of your push, a common example would be "in_app_purchase". If this is configured you'll be able to measure the efficacy of each push in achieving the specified goal.
Deeplinking and additional options
You can add a URL into your push by adding "deepLink" into the Custom data Key field and your URL into the Value field. The list of supported deep linking is here. See example below.
Be aware the URL will not appear directly in the message, often it's recommended to include "swipe to" or "open now" into the message content for users.
New edition push notifications
To send a Firebase Cloud message with a link directly through to an edition, find the URL by going into Distribution > Content Feed > click on the edition > then right hand click on the covers "Page Title" for the URL (if the edition is paywalled, make sure you don't click through to the cover and take the URL because this will take a different URL). See example below.
Analytics
To track the performance of your notifications you can use the BoltNotificationOpen event in your analytics provider. By populating the PPCampaign value you can attribute opens to a specific push campaign (using the KGLabel or pugpigCampaign dimension).
To do this, you need to add a custom data key into the "Additional options" section of the notification composer. The key must be "PPCampaign" and the value should identify your push notification campaign, for example:
After sending the campaign, the PPCampaign value will populate the KGLabel/pugpigCampaign dimension of your BoltNotificationOpen events, allowing you to track the performance of specific campaigns.