RocketChat / RocketChat/Rocket.Chat.ReactNative
Send FCM push message as labeled data messages, so they show up in Firebase Cloud Messaging Reports
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.4k
- Forks
- 1.5k
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 90
Description
Description:
As of 3.6.3, FCM push notifications are sent without analytics label, meaning they don't show up in Firebase Cloud Reports.
Propose to add (meaningful) analytics labels, so they show up in Firebase Cloud Reports, for analytics purpose or for troubleshooting/diagnostics purposes.
Steps to reproduce:
- Ensure you set your own FCM account
- Sign in with Android mobile app
- Close the app (make it in background)
- Send a message from another user
- Notice that push notification is received
- Go to Firebase Cloud Reports
Expected behavior:
You get 1 data point, with at least 1 Send and 1 Receive, and probably 1 Impression and 1 Open.
Actual behavior:
No data:

Server Setup Information:
- Version of Rocket.Chat Server: 3.6.3
- Operating System: linux x64 4.14.193-149.317.amzn2.x86_64
- Deployment Method: AWS Fargate (Docker)
- Number of Running Instances: 1
- DB Replicaset Oplog:
local - NodeJS Version: 12.6.1
- MongoDB Version: 4.2.9
Client Setup Information
- Desktop App or Browser Version: Rocket.Chat.ReactNative for Android 4.10.0
- Operating System: Android 10
Additional context
Relevant logs:
I20200929-11:57:30.171(0) server.js:204 Push ➔ debug sendGCM [ 'fkhBWgHdTBS...RLX-k6' ] { createdAt: 2020-09-29T11:57:30.162Z, createdBy: '<SERVER>', sent: false, sending: 0, from: 'push', title: '#ATG-test', text: 'hendy: Cek', userId: 'RejdvL7N9tgtAhHHs', payload: { host: 'https://chat.soluvas.com/', messageId: 'YR2ITYBVY2XaVI2VR', notificationType: 'message', rid: 'SAPhPv73kzD7c5vY3', sender: { _id: 'WF888NBfytPJMnuu2', username: 'hendy' }, type: 'p', name: 'ATG-test' }, badge: 2, sound: 'default', notId: 1633641473, apn: { category: 'MESSAGE' }, gcm: { image: 'https://chat.soluvas.com/images/logo/android-chrome-192x192.png', style: 'inbox' }, image: 'https://chat.soluvas.com/images/logo/android-chrome-192x192.png', style: 'inbox' }
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no implementation file or test. Start with the referenced Firebase Cloud Messaging analytics-label documentation, then locate the React Native FCM message-sending entry point and verify the change by checking that sent notifications produce data in Firebase Cloud Reports.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, firebase, react-native, typescript
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100