简体   繁体   中英

Track Firebase Push notification for web in console

Is there any way to track the count of successfully sent push notifications in FCM? I can see the messages sent using Firebase console but i need to track the number of messages sent via web app to the devices.

I have tried the same using onMessaging event of firebase, tried sending direct hit for google analytics as well from service worker but without any success.

return fetch('https://www.google-analytics.com/collect', {
  method: 'post',
  body: payloadString
})

Also tried logEvent using following -

 const analytics = firebase.analytics();
  logEvent(analytics, 'web_notification', {action : 'send'});

No event is getting saved in firebase console. Is there any way I can achieve the same?

You can check those data in BigQuery export . Just link your Firebase app to BigQuery. From there, you can query the messages that were successfully sent.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM