4

I'm manually handling firebase notifications by overriding the onHandle intent of the FirebaseMessagingService.

And using the intent I generate a notification.

Is there a way to manually report the notification opened to the Firebase at all because I'm not getting opened statistics reported back to the firebase console.

As above, even when letting firebase notifications get handled per normal, these open notifications are not being reported either.

Thanks!

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
JoshuaTree
  • 1,211
  • 14
  • 19

3 Answers3

3

The stats shown in the notifications panel of the Firebase console are only for messages sent from that notification panel. There is currently no way to trigger the stats for messages sent through the Firebase Cloud Messaging API directly.

Update: since late 2018 the Firebase now also reports messages sent through called to the Firebase Cloud Messaging API.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
  • Hi Frank, this is a very useful answer. What recommended alternative strategy could we use to track push message engagement with existing firebase features in this way. – JoshuaTree Mar 31 '18 at 08:34
  • 1
    Using the FCM API to send data messages, using Analytics to record receipt of the message, and then e.g. export to BigQuery and use Data Studio to visualize. But to be honest, there are likely dozens of other approaches that work too. – Frank van Puffelen Mar 31 '18 at 14:34
  • Thanks, that is what I imagined. It was just a sanity check, thank you. – JoshuaTree Apr 02 '18 at 08:50
  • Hi Frank, just out of curiosity, what method does the firebase SDK on Android use to track it's notification opened stats (When sent from console)? Is it also for example an Analytics event which is then converted into the graphs on the console when received? I'm really quite bleak that the IO's source code is available and not android .... (c''_) – JoshuaTree Apr 18 '18 at 06:38
  • 3
    This answer is outdated, the Cloud Messaging report now includes notifications sent through the API as well. – jävi Jan 22 '19 at 16:45
2

For those curious to know my workaround at this time.

We run push campaigns. For each campaign we created a distinct, reusable event. We register the event "campaign_received" and "campaign_opened" When a message is received, we trigger the event. When the notification is opened, we trigger the event.

Then, under each event, we just select the event, and file their stats per day, week, month, etc.

One needs to select the event to get to the event dashboard area, since the event list view shows the total amount of events sent and or received.

For bespoke notifications the 500 event limit might be reached quite quickly, so be sure to bundle your notifications into reusable event categories if possible.

karel
  • 5,489
  • 46
  • 45
  • 50
JoshuaTree
  • 1,211
  • 14
  • 19
2

According to https://firebase.google.com/docs/cloud-messaging/understand-delivery only "Sends" work for data-only messages:

Sends — The data message or notification message has been enqueued for delivery or has been successfully passed to a third-party service like APNs for delivery. See lifetime of a message for more information.

Impressions (available only for notification messages on Android devices) — The display notification has been displayed on the device.

Opens — The user opened the notification message.

Gavriel
  • 18,880
  • 12
  • 68
  • 105