Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 776
malwatte Avatar asked Mar 10 '17 05:03

malwatte


People also ask

How do I check my Firebase notification history?

You can log into your firebase console and check the Cloud Messaging section for the detailed overview of the notifications sent. You can check this answer as well for better understanding. To understand more about the lifetime of a message, you can see their developer documentation here.

Does FCM guarantee delivery?

FCM does not guarantee the order of delivery. Some typical use cases of non-collapsible messages are chat messages or critical messages. For example, in an IM app, you would want to deliver every message, because every message has different content.

Where is notification composer in Firebase?

To access the Notification Composer in the Firebase console, click the project name. Since the project is new, you'll find the option to Send your first message.

What is Messagingsenderid in Firebase?

A sender ID: set in the code of your app. Android Studio uses automatically the Sender ID of your Firebase Project. If you are still using GCM, you have probably set manually the sender ID in the code of your app. The sender ID identifies your app to Firebase Cloud Messaging when it asks for a token.


2 Answers

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)

enter image description here

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

like image 112
AL. Avatar answered Sep 19 '22 13:09

AL.


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).

like image 24
Gene M Avatar answered Sep 19 '22 13:09

Gene M