Marketing Cloud Personalization supports Push Notification campaigns for Android apps using Firebase Cloud Messaging.
If you're using Personalization to send push notifications to your app via Firebase Cloud Messaging, you'll need to provide your Legacy Server Key. To retrieve your Legacy Server Key and add it to Personalization, do the following.
- Open your Firebase Cloud Messaging console for your app.
- At the top-right corner of the app card, click the ... menu.
- Click Settings.
- Open the Cloud Messaging tab.
- Copy the Legacy Server Key.
- Log in to the Personalization UI and select the Dataset.
- From the left-hand menu, click Mobile > your app, and then Mobile Push Setup.
- Under Firebase Cloud Messaging, paste your Legacy Server Key.
- Click Save.
To set up your app to use Firebase Cloud Messaging, do the following.
- Set up your app to use Firebase Cloud Messaging by following the instructions on Set up a Firebase Cloud Messaging client app on Android.
- To allow the collecting and sending of users' Firebase tokens to Personalization, your app must opt-in to Personalization push notification campaigns. For more information, see
usePushNotifications. For example code, refer to the
- Your app must call
setFirebaseTokenas described in the
- You can only send push notifications to the most recent user. For more information, see
- Personalization automatically tracks clicks and opens from Firebase notifications under typical circumstances. However, when the app receives push notifications while foregrounded, if you decide to display custom content or launch an Activity with a
standard, you can ensure accurate campaign click tracking by following the instructions in the method documentation for