I am using Firebase Cloud Messaging for sending notifications to the user. But i am not getting notifications consistently on all devices. I am sending notifications to audience around 7M. Below is the report given by FCM aggregated delivery API:
"data": {
"countMessagesAccepted": "6882886",
"messageOutcomePercents": {
"delivered": 51,
"pending": 5,
"droppedAppForceStopped": 6,
"droppedDeviceInactive": 41
},
"deliveryPerformancePercents": {
"deliveredNoDelay": 32,
"delayedDeviceOffline": 19
}
}
}
This was sent using Firebase User Segments(Analytics Targeting), it shows that 41% of the sends is dropped due to inactive device. Same is the case when pushing notifications using the Firebase Topics, around 50% is droppedDeviceInactive. So my question is:
- Do we need to unsubscribe users from topics if the FCM token is past staleness window? The documentation doesn't say we need to explicitly unsubscribe from topics but says doing so will result in faster fanout rate. So does this affect the delivery success. What if i don't store FCM token in the server.
- There is no unsubscribe in case of User Segments(Analytics Targeting)`. What to do in that case?
- What should i do to ensure success of the most of the messages or to diagnosis what is going wrong with my notification?
I tried using Last Engagement in the User Segments and sent the notification only to the devices that were active in the last month. Looking at the target number users were cut in half, which means now the inactive devices will not be targeted. But still i am not reliably getting notifications in test devices i have setup which are eligible for the notification campaign. I was expecting that 95% of the devices will get the notification as the FCM documentation says. While setting up 10 test devices to test the push notifications, I only get the notifications on 2-3 devices on average. I also checked the FCM diagnostics event log on phone to see if the notification is received but not getting broadcasted to the app. That is not the case and the notification is not received by the FCM backend also.
Note-: I can get the notification in the same device when sending it to individually using fcm token. But the problem is when sending to large amount of users using Topics or User Segments