Push notification campaign process
Overview
Push notifications are a key way to engage users by delivering timely messages directly to their devices. Our push notification campaign process ensures that notifications are sent efficiently to the right audience, across multiple platforms, and with proper event tracking.
Platforms Supported
Web (FCM for web notifications)
Android (React Native & Kotlin apps) Version
iOS (Swift apps) Version
Firebase (Used as the notification service)
Steps in the Push Notification Campaign Process
1. Campaign Creation
The process starts when a user (admin or marketer) creates a push notification campaign in our system. The following key details are required:
Title: Name of the campaign.
Message: Content of the notification.
Target Segment: The audience to receive the notification (e.g., all users, specific user groups).
Platform Selection: Web, Android (React/Kotlin), iOS (Swift), or all.
Schedule: Immediate or scheduled delivery.
2. Fetching Target Audience
The system fetches all users who match the selected segment.
It filters out only the users who have valid FCM tokens (i.e., users who have opted in to receive notifications).
The system also ensures that only the tokens for the selected platforms are considered.
3. Sending Notification Data to Firebase
Once the audience is identified, all valid FCM tokens are compiled.
The system sends a request to Firebase Cloud Messaging (FCM) with the following details:
FCM tokens (Device identifiers for push notifications)
Message content (Title and body of the notification)
Notification options (Sound, priority, deep linking, etc.)
4. Firebase Processes the Request
Firebase distributes the notification to the respective devices based on the provided FCM tokens.
Firebase attempts to deliver the notification immediately or queues it if the device is offline.
5. Tracking Notification Events
Once Firebase sends the notifications, event tracking begins. The following key events are captured:
Sent: The notification has been sent to Firebase.
Delivered: Firebase successfully delivered the notification to the user's device.
Failed: The notification could not be delivered (e.g., invalid FCM token, user uninstalled the app, device offline for too long, etc.).
Clicked: The user interacted with the notification by tapping on it.
6. Logging & Reporting
The system logs all push notification activities for reporting and analytics.
Users can view reports on:
Delivery rate (Total delivered vs. total sent)
Failure percentage (Failed notifications vs. total sent)
Click-through rate (CTR) (Total clicks vs. total delivered)
Android-Specific Requirements
FCM Configuration: The app must be configured with Firebase Cloud Messaging (FCM) and include the correct API keys.
Foreground Services: Handle notifications properly when the app is in the foreground.
Notification Channels: Required for Android 8+ to categorize and manage notifications.
Battery Optimization Handling: Ensure push notifications are not blocked by aggressive battery optimization settings.
App Permissions: Users must grant notification permissions for push messages to be delivered.
iOS-Specific Requirements
APNs Configuration: The app must be registered with Apple Push Notification Service (APNs) and linked to Firebase.
User Permissions: Users must explicitly allow push notifications when prompted.
Background Mode: The app should support background notification processing.
Silent Notifications Handling: Ensure proper handling of background data messages.
Provisioning Profiles & Certificates: Must be correctly set up for push notification delivery.
Web-Specific Requirements
HTTPS Requirement: Web push notifications require HTTPS for security.
Service Workers: A service worker must be registered to handle background push events.
User Subscription: Users must grant permission for push notifications.
Browser Compatibility: Ensure push notifications are supported on major browsers (Chrome, Firefox, Edge, Safari, etc.).
FCM Configuration: The website must be configured with Firebase Cloud Messaging for web push.
Handling Multiple Tabs: Ensure push notifications work correctly when multiple browser tabs are open.
Browser Compatibility
Browser
notificationClick event Supported
onButtonClicked Supported
Chrome
Yes
Yes
Edge
Yes
Yes
Firefox
Yes
No
Opera
Yes
Yes
Safari
Partial
No
Process to Send a Test Notification
1. Enter Recipient Details
2. Fetch Available Platforms
Based on the provided email or phone number, the system retrieves the FCM tokens associated with the user.
The retrieved tokens determine which platforms (e.g., Android, iOS, Web) the user has access
3. Select Target Platform(s)
The user can see the detected platforms and choose one or multiple platforms to send the test notification to.
4. Send the Test Notification
Once the platform selection is made, the user initiates the test send action.
The system sends the test notification to the selected platforms using the corresponding FCM tokens.
Verified Functionality
All the following aspects have been thoroughly tested and are confirmed to be working as expected:
Push notifications are successfully sent via Firebase.
Notifications are correctly delivered to the intended target audience.
Message content appears as expected across all platforms.
Deep links within notifications open the correct screens.
Notifications appear when the app is in the background or foreground.
Clicking a notification triggers the correct app actions.
Silent push notifications are processed correctly.
Invalid FCM tokens are handled, and failures are logged appropriately.
Scheduled notifications are sent at the correct time.
Android-specific functionalities such as notification tray appearance, rich media, Do Not Disturb handling, and app state behavior are verified.
iOS-specific functionalities including notification center display, background processing, and rich media support are confirmed.
Web push notifications are successfully received, displayed, and opened across different browsers and conditions.
Conclusion
This process ensures that push notifications are delivered efficiently, with tracking in place to measure effectiveness. By leveraging Firebase Cloud Messaging, we ensure reliable message delivery across web, Android, and iOS platforms.
Last updated