Setting up a Push Notification Campaign
Note: Steps 1-3 should be complete if you have already integrated Firebase with Reactiv. See Setting Up Firebase & GA4 With Reactiv
Step 1: Set Up Firebase Project
Go to the Firebase Console.
Click Add Project and follow the setup steps.
Once created, go to Project Settings > Cloud Messaging to access your Firebase server key and sender ID.
Step 2: Integrate Firebase SDK into Your App
iOS: Add Firebase SDK via CocoaPods or Swift Package Manager.
Android: Add Firebase to your Android project by adding the
google-services.json
file to yourapp
directory and updating yourbuild.gradle
files.
Step 3: Set Up FCM in Your App Code
Add the necessary code to handle FCM tokens and receive notifications.
iOS:
Request user permission to show notifications.
Implement
UNUserNotificationCenterDelegate
to handle notifications.
Android:
Initialize Firebase and set up FCM in your
Application
class.Handle notifications in
FirebaseMessagingService
.
Step 4: Enable Cloud Messaging API
In the Firebase Console, go to Project Settings > Cloud Messaging.
Enable the Cloud Messaging API for your project.
Step 5: Send a Notification from Firebase Console
Go to Run > Messaging in Firebase Console.
Click on New Campaign > Notifications. (Note that In-App Messaging is not currently supported)
Enter your Notification title and Notification text.
Optionally, you can add in a Notification Image aswell. Keep in mind that this will appear quite small on a users device
Optimal Size: Image should be at least 720px (width) by 240px (height) with an aspect ratio of 3:1. Max Size of 500KB
Once you are happy with the Notification content, click Next
Under Target, select either a specific user segment or app instance.
Segment: Target specific user properties or audiences.
App instance: Target individual device tokens (e.g., for testing).
⭐️ Reactiv Tip: To simply target all app users, match the below criteria.
Step 6: Configure Notification Options
Set the Delivery Time (e.g., immediate, or scheduled).
Define Conversion Events if you want to track specific actions after users open the notification.
You will notice an Additional Options Section. If you would like your notification to deeplink to a specific Product of Collection in the app, you will need to add in a Key/Value Pair under Custom Data
The Key will be 'url'
The Value will be the URL of the Product or Collection you are linking to.
Note: theis URL must be simplified and not include any parameters after the URL
Step 7: Preview and Send Notification
Use the Preview feature to see how the notification will look.
Click Send or Schedule (if you specified a scheduled time).
Step 8: Monitor Notification Analytics
Go to Analytics > Events in the Firebase Console to track how users engage with your notification.
Use Cloud Messaging > Reports to view metrics on delivery, opens, and conversions.
Events Tracked
This is a comprehensive list of all events that are tracked and sent to Firebase. These can be used for analytics purposes, creating user segments
ReactivEventName.ScreenViewedEvent → 'screen_view'
ReactivEventName.CollectionViewedEvent → 'view_item_list'
ReactivEventName.ShowProductEvent → 'show_item'
ReactivEventName.ProductViewedEvent → 'view_item'
ReactivEventName.SelectProductEvent → 'select_item'
ReactivEventName.CartViewEvent → 'view_cart'
ReactivEventName.CartItemAddedEvent → 'add_to_cart'
ReactivEventName.CartDiscountCodeAddedEvent → 'view_promotion'
ReactivEventName.CheckoutStartedEvent → 'begin_checkout'
ReactivEventName.CheckoutSuccessEvent → 'purchase'
ReactivEventName.CheckoutFailedEvent → 'checkout_failed'
ReactivEventName.SearchAppliedEvent → 'perform_search'
ReactivEventName.SearchFilterAppliedEvent → 'perform_filter'
ReactivEventName.SearchSortAppliedEvent → 'perform_sort'
ReactivEventName.WishListItemAddedEvent → 'add_to_wishlist'
ReactivEventName.WishListItemRemovedEvent → 'remove_from_wishlist' (NOT AN OFFICIAL EVENT)
ReactivEventName.CartItemUpdatedEvent → 'update_cart_item'
ReactivEventName.CartItemRemovedEvent → 'remove_from_cart'
ReactivEventName.CartDiscountCodeSeenEvent → 'viewed_promotion' (NOT AN OFFICIAL EVENT)
ReactivEventName.CartDiscountCodeRemovedEvent → 'remove_promotion' (NOT AN OFFICIAL EVENT)
ReactivEventName.AccountSignUpSuccessEvent → 'sign_up'
ReactivEventName.AccountSignUpFailedEvent → 'sign_up_failed'
ReactivEventName.AccountSignInSuccessEvent → 'login'
ReactivEventName.AccountSignInFailedEvent → 'login_failed'
ReactivEventName.AccountForgotPasswordEvent → 'forgot_password' (NOT AN OFFICIAL EVENT)
ReactivEventName.AccountRecoveredPasswordEvent → 'recover_password' (NOT AN OFFICIAL EVENT)
ReactivEventName.AccountAddressAddedEvent → 'add_address'
ReactivEventName.AccountAddressUpdatedEvent → 'update_address'
ReactivEventName.AccountAddressRemovedEvent → 'remove_address'
ReactivEventName.ExternalLinkClickedEvent → 'click_external_link' (NOT AN OFFICIAL EVENT)
ReactivEventName.WebpageViewedEvent → 'view_webpage'
ReactivEventName.SubscribedToMarketingEvent → 'subscribe_marketing' (NOT AN OFFICIAL EVENT)
ReactivEventName.QRCodeScannedEvent → 'scan_qr_code'
ReactivEventName.PushPermissionAcceptedEvent → 'mobile_app_accept_push' (NOT AN OFFICIAL EVENT)
ReactivEventName.PushPermissionDeclinedEvent → 'mobile_app_decline_push' (NOT AN OFFICIAL EVENT)
ReactivEventName.LocationPermissionAcceptedEvent → 'mobile_app_accept_location' (NOT AN OFFICIAL EVENT)
ReactivEventName.LocationPermissionDeclinedEvent → 'mobile_app_decline_location' (NOT AN OFFICIAL EVENT)
ReactivEventName.AdsTrackingPermissionAcceptedEvent → 'mobile_app_accept_ads_tracking' (NOT AN OFFICIAL EVENT)
ReactivEventName.AdsTrackingPermissionDeclinedEvent → 'mobile_app_decline_ads_tracking' (NOT AN OFFICIAL EVENT)
ReactivEventName.ApplicationInstalledEvent → 'mobile_app_install' (NOT AN OFFICIAL EVENT)
ReactivEventName.NotificationReceivedEvent → 'notification_received'
ReactivEventName.NotificationClickedEvent → 'notification_opened'
(NOT AN OFFICIAL EVENT) = namespace reserved event with google