You can create FCM push notifications, using the Notifications Composer, which is available via the Firebase Console:
- Make sure your app has the Firebase configuration JSON or Plist files installed via the version 'general' section in Zapp (Android) or via the "Firebase Base" plugin (iOS). This will allow the app to communicate with Firebase. Click Here for more information on the configuration of Firebase in your app.
- Make sure to have installed the "Firebase Notification" plugin, on your app version. Click Here for more information on the "Firebase Notification" plugin.
- Make sure your app is installed and running in the background, and that your device has an active Internet connection.
- In the Firebase Console, select “Cloud Messaging” from the left-hand menu.
- Select “Send your first message.”
- Give your message a title and some body text, and then click “Next.”
- Open the “Select app” dropdown, and choose your application from the list.
This section also includes some advanced options that you can use to create targeted notifications, based on factors such as app version, the device’s locale, and the last time the user engaged with your app. You can explore the options by clicking on “and…”, and selecting the relevant options from the subsequent dropdown menu. (More information to be found below).
- Once you’ve finished editing this section, click “Next.”
- Assuming you want to send this message immediately, open the “Send to eligible users” dropdown and select “Now.”
- In the bottom-right of the screen, click “Publish.”
- Check all the information in the subsequent popup, and if you’re happy to proceed then select “Publish.”
After a few moments, all the client devices that you targeted should receive this notification in their system tray.
Targeting your users
You can use the Notification Composer to send different notifications, to different parts of your user base. Head over to the Notification Composer and create your notification as normal, but in the “Target” section, click “and.” This gives you access to a new dropdown, containing the following options:
- Version. This allows you to target, or exclude, devices running specific versions of your application.
- Language. You can use this setting to target or exclude the different languages and locales that your application supports, such as creating notifications that are tailored for different time zones or languages.
- User audience(s). This lets you target, or exclude different sections of your audience. For example, you could use this setting to tempt people who have a history of making in-app purchases, by offering them a discount or drawing their attention to all the amazing new in-app products you’ve just released.
- User property. If you’ve setup Firebase Analytics, then you’ll have access to a range of information about your audience, via user properties. You can use these properties in combination with FCM, to send targeted notifications to very specific sections of your user base, such as people within the 25-34 age range who are interested in sports.
- Prediction. If you’ve setup Firebase Predictions, then you can target users based on how likely they are to engage in a particular behaviour over the next 7 days. For example, if Predictions warns that someone is likely to disengage from your mobile game, then you could use FCM to invite them to take part in a new quest, or to send them some in-game currency.
- Last app engagement. If a user hasn’t launched your app in a while, then you can use this setting to send them a few notifications, just to remind them about all the great content that your app has to offer.
- First open. This lets you send notifications based on the first time the user opened your app, for example you might help new users get up to speed by sending them notifications containing useful tips and advice.
Setting some goals: Notification conversion events
When creating a notification, you’ll usually have a goal in mind – whether that’s driving users back to your app, convincing them to splash out on an in-app purchase, or simply opening your notification.
You can assign a goal to your notification, using the Notification Composer, and then track that notification’s performance in the FCM reporting dashboard.
To set a goal, click to expand the Navigation Composer’s “Conversion events” section, then open the accompanying dropdown and choose from the available conversion events.
Additional Options & Deep Linking
The 5th stage before publishing your Push Notification, enables to add "Additional Options (optional)".
Once selected please configure the section titles "Custom Data", which is to be found inside:
If a user clicked on a push with this configuration, it would launch the app and then this url from within the app, using a URL Scheme (for more information on URL Schemes, click here).
After sending a notification message, you can analyze its performance in the FCM reporting dashboard, which should load automatically every time you send a new message, or you can access the dashboard directly.
Even if you didn’t set any explicit conversion goals, you can still gauge whether users are acting on your notifications, by comparing the number of messages delivered, to the number of messages opened.
You can also select any message in this list, to see the send, open and conversion data as a graph. If you set any conversion goals, then this is also where you’ll find the statistics relating to those goals.