Is it possible to get push notification stats like count of deliveries and opens when sending messages through Firebase notification API? - firebase

We are about to switch to Firebase notifiaction API from Parse.com (that are retiring their service in jan 2017) to send push notification to our android and iOS Apps.
My question now is that I can't see any statistics about counts of successful deliveries and opens in the Firebase Console for a specific message ? The only thing we get when posting to https://fcm.googleapis.com/fcm/send is a message_id
{"message_id":123456789}
But I havn't seen any documentation on a api how to follow up a sent message with this message_id. And the Firebase console has only the these kind of stats for messages created in the Console Gui, not the one create through an api post.
These stats was availible in Parse.com. But it seems as Firebase Cloud Messaging is a bit more low level, and perhaps these stats doesn't come out the box, so they might have to be custom made in a logging app etc by sending back events from the apps when messages as received and opened etc. Or is there a standardized way that I've missed when reading the Firebase Notification api docs ?

When you send notifications from the Firebase Notifications console, you get statistics about how many people received and opened the messages. But there is no API (yet) for Firebase Notifications.
If you're using the Firebase Cloud Messaging API (https://fcm.googleapis.com/fcm/send), the message statistics don't show up in the Firebase Notifications console. You can (as AL. says) get delivery statistics in the Google Play Developer Console in that case.

firebase allows you to view sent/delivered/opened statuses by default from their website
http://console.firebase.google.com
at the notification section
but I am not sure about the parse.com implementations
also if you are a new comer to firebase let it collect user data for about 24 hours after successfully migrating to firebase
I found that in the first day the notifications weren't really reporting immediately

I think you're looking for the FCM Diagnostics and Statistics feature.
However, this is not visible in the Firebase Console, only in your Google Play Developer Console. And the feature only works if your app is at least in Alpha Testing.

Related

Firebase cloud messaging message log

In my Android app I receive messages sent using Firebase, the problem is not all messages arrive and sometimes messages arrival is very slow.
In my server side I track the messages I send to FCM and I always receive success: 1 response from FCM, still there are messages I do not receive in my Android app.
I thought an FCM messages log would be a great help in cases like described above but I don't sure if this option exist.
Is there a way to browse Firebase Messages log ?
First of all, did you know that Firebase Cloud Messages can be delayed if the connected device is in doze mode and your app's standby bucket is not high enough to wake up the device? Therefore, even if FCM sends the message to your target device in time, there is still a chance that it will be delayed by the Android platform. Also, if the message is sent with high priority, you might have a chance to wake up the device from doze mode to be able to receive the message in time.
The following two docs will give you a more detailed explanation:
https://developer.android.com/training/monitoring-device-state/doze-standby
https://developer.android.com/topic/performance/power/power-details
Besides, FCM provides three sets of tools to help you get insight into message delivery:
Firebase console message delivery reports (go to Firebase Console -> Messaging -> Reports)
Aggregated Android SDK delivery metrics from the Firebase Cloud Messaging Data API
Comprehensive data export to Google BigQuery
All these three tools can help you understand your message delivery, the following docs have a pretty good explanation about how to use them:
https://medium.com/firebase-developers/what-is-fcm-aggregated-delivery-data-d6d68396b83b
https://firebase.google.com/docs/cloud-messaging/understand-delivery?platform=android#count-data-messages-sent

Firebase Diagnostics on Play Console

I have a firebase project. I want to know the details diagnostics and statistics of every campaigns. We have panel for scheduling and sending notification to devices. Firebase deliver notifications to devices.
I want to know to which devices, the notifications are delivered, to which it is undelivered. I have read something about play console. I have followed the steps and linked my Firebase project with Google play console
but, still I am unable to see any stats.
Unfortunately, the FCM Diagnostics tool has been removed. From the links:
November 30, 2017: FCM diagnostics data removed
You can no longer access FCM diagnostics data in the Play Console.
You can still use other Firebase Cloud Messaging features.

How to View Firebase Notification Delivery Reports?

We use Firebase to send push notifications to both Android and iOS devices. We use Http (not XMPP).
How to get delivery reports for push notifications? We want to check if a push is delivered to devices (both Android and iOS).
I cannot see any stats or reports in Firebase console.
Please help.
As seen in the Possible Duplicate Post I linked, there is currently no available reports for FCM, other than what can be seen in the Firebase Console (if you sent the message using the console) and using the Diagnostics/Statistics tool in your Play Dev Console.
There is no API that retrieves these FCM log details as of the moment. However, there's been a recent improvement in the Firebase Notifications console where stats (sent count only for now) for messages sent using the FCM API is included in the Firebase Notification console stats. From my answer in the similar post:
As of August 2018, stats for messages sent using the FCM API are now visible from the console. From the Cloud Messaging section, click on the Reports tab. From there, you will be able to filter by message type (notification, data, and all)
It would seem that the Impressions and Opens are still only available for messages sent using the console. But Sends for sure now counts the messages sent using the FCM API.
Reference: https://firebase.googleblog.com/2018/08/in-app-messaging-crashlytics.html
Our findings: In order to view statistics for Data messages, the data messages will need to include an analytics label. Check to make sure that these are included. It is just a label, https://firebase.google.com/docs/cloud-messaging/understand-delivery#adding-analytics-labels-to-messages so even without the analytics label, the message should still be sent. It just won't be tracked by their reporting. Data messages do not automatically generate a notification though. Different app states and message types will have different message receiving behavior. A data message should be received in onMessage or setBackgroundMessageHandler for JavaScript clients. Try checking these callbacks to see if the message is received there. I'd highly recommend checking out the quickstart, which should be working fine. You can use it as a base to build off or reference to compare with your app to identify potential problem areas. So our understanding is that it needs to be handled properly on the mobile end, https://firebase.google.com/docs/cloud-messaging/js/receive (though this is the javascript client, it will still apply to mobile).
You can rather go to the Google cloud console to check messages sent.
Select period from available options on top right of the page.
https://console.cloud.google.com/apis/dashboard?folder=&organizationId=&project=[project-name]
The delivery report added to the FCM:
Received (available only on Android devices) — The data message or notification message has been received by the app. This data is available when the receiving Android device has FCM SDK 18.0.1 or higher installed.
https://firebase.google.com/docs/cloud-messaging/understand-delivery#message-delivery-reports

Firebase Cloud Messaging Statistics API

I'm using an application server to send messages by Firebase Cloud Messaging.
Firebase console does not list such a message which sent by app server.
When I use Firebase console directly to send messages, it will display some analysis on its own messages.
Like this:
The questions is, how can I access message statistics when I'm using an app servers?
As of August 2018 (announced in this blog post), API send stats can be viewed in the "Reports" tab of the FCM console. By default it only shows notification type messages, so if you're only sending data messages with the API, be sure to choose the "Data" filter.
Before August 2018:
The Firebase Notifications charts only show analytics for messages that were sent using the Firebase Notifications panel.
There is currently no public API to send Notifications to audiences. The web interface in the console is the only way to send them.
There is currently no API to feed your own FCM messages into the Firebase Notifications analytics panels.

Accessing FCM message logs

I'm having trouble figuring out whether or not FCM keeps logs of sent FCM push notifications, and if so, how to access them. I'm having intermittent issues with sending push notifications from an FCM server to an iphone app, and would love to be able to see at what stage the push is failing.
I found the below documentation that suggests that these logs should be kept somewhere:
https://support.google.com/googleplay/android-developer/answer/2663268?hl=en
("You can look up messages sent through Firebase Cloud Messaging with a registration token or message ID.")
However, I can't seem to figure out how to access them. Since my app is currently iOS only, I don't have an app in the Google Play Developer console, and my firebase console doesn't seem to contain any such logs. However, based on the possible message statuses in the documentation above (e.g. Accepted, sent to APNS), it seems like google / firebase should store message logs sent to iOS as well as to Android.
Thanks in advance for your help!

Resources