integreat-cms
integreat-cms copied to clipboard
Attach region as analytics label to fcm call
Short description
To implement ticket #589 and display the number of users who will be reached by a notification (news), I've added the region as an analytics label to all Firebase Cloud Messaging (FCM) calls. The original plan was to call an API that returns the count of subscribed devices per Firebase topic. Unfortunately, Firebase does not offer such an API.
By adding the analytics label, we can leverage the Firebase Cloud Messaging Data API to get an approximate number of delivered messages per topic. It will take some time for users on the live system to send push notifications, and for the API to deliver real data grouped by the analytics label.
Therefore, I propose merging this pull request first so that I can work on the analytics aspect in parallel and hopefully test with real data before merging the next pull request.