16

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.

malwatte
  • 467
  • 1
  • 5
  • 16
  • Possible duplicate of [Firebase notification records/log API](http://stackoverflow.com/questions/40340076/firebase-notification-records-log-api) – AL. Mar 10 '17 at 05:49

4 Answers4

13

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

Community
  • 1
  • 1
AL.
  • 36,815
  • 10
  • 142
  • 281
  • If you've never sent a message with the console (i.e., because you're sending all messages via API), the reports tab doesn't show up. You can fix this by by creating a message (a draft is fine, as long as you never delete it). Alternatively, edit the URL, appending `/reporting` to the notification URL (the new URL will be `https://console.firebase.google.com/project/[ProjectName]-[ProjectID]/notification/reporting` ) . Based on empirical testing, messages sent using the API still show up in this report. – Brian Nov 08 '18 at 18:33
  • 1
    My reports tab always showing 'No data', any idea? selected "All" option ! – Nadhas Apr 15 '19 at 12:59
  • @Udhaya If it's been a few days and it still doesn't show anything, I suggest reaching out to Firebase Support directly. – AL. Apr 17 '19 at 09:48
  • Hi, My web app has FCM configured and is receiving notifications but the reports are not appearing. – Ujjual Nov 15 '19 at 07:10
  • Did you guys get response from Firebase Support? We're currently experiencing the same. Would love to hear what they responded to you or how you guys were able to solve this issue. Thanks – Gene M May 18 '20 at 18:22
  • In our firebase console, notification reports page is showing no data. We are sending 1000's messages via API. Is there something missing, how to view these metrics in firebase console ? We have not sent any messages via console. – Navin GV Nov 19 '20 at 14:20
  • I can still see only notifications sent via console (Dec' 20). Messages sent via API are nowhere visible in this report. – Prashant Agarwal Dec 16 '20 at 07:23
4

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

Gene M
  • 348
  • 2
  • 12
2

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]

enter image description here

Prashant Agarwal
  • 729
  • 7
  • 23
1

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