Firebase's Audiences feature allows you to create user segments based on their behavior (app events) or user properties, which can then be used in Firebase Cloud Messaging to send personalized push notifications. This feature is supported from v3.7.7 of the Mobile App.
This article will show you how to ensure that you are only including users that have opted in to your marketing push notifications in your Audiences. This article only applies to brands that have GDPR opt-in enabled. You can find more information about that here.
To send push notifications to your entire user base, please see here.
- Log in to the Firebase Console and select your project
- In the left navigation, select Audiences from the Analytics section
- Click on New audience
- Either create a new custom audience or select a suggested audience
After creating conditions for your audience, make sure to add a condition that only includes users where the user property MarketingPushOptIn is set to true:
- Select Add new condition in the Include Users when section
- Select MarketingPushOptIn from Dimensions -> Registered
Please note: in order to be able to use this Marketing Push Opt In user attribute in the segmentation, it's necessary to setup Custom Dimension. Please reach out to Firebase to make it happen.
- From the comparisons dropdown, choose exactly matches (=)
- Enter or select true in the field to the right of the comparisons dropdown
- Specify a name & description and save your audience
Send Push Notification to Audience
- In the left navigation, select Cloud Messaging from the Grow section
- Click New notification and compose your message
- In Step 2 Target open the Select an app dropdown
- Select the Android app
- Click on and
- From the Select dropdown, select User audience(s)
- From the Select audience(s) dropdown, select the Audience you created
- Click on Target another app and repeat the same steps above for the iOS app
- Click on Next and complete configuring your message
Please sign in to leave a comment.