ToothlessGear / node-gcm

A NodeJS wrapper library port to send data to Android devices via Google Cloud Messaging
https://github.com/ToothlessGear/node-gcm
Other
1.3k stars 208 forks source link

fcm_options and analytics_label fields are not sent to FCM servers? #346

Closed ltnilaysahu closed 3 years ago

ltnilaysahu commented 3 years ago

i tried firebase-admin npm package with this { notification: { title: 'Title of your push notification', body: 'Body of your push notification' }, data: {score: '850', time: '2:45'}, tokens: registrationTokens, fcmOptions: {analyticsLabel: 'hello3'}, } . Observe analyticsLabel this parameter is used for firebase events, it worked. But when i tried passing via node-gcm it was not transferred to firebase

ltnilaysahu commented 3 years ago

i tried passing fcm_options: {analytics_label: 'hello3'}, this as well. didn't work

eladnava commented 3 years ago

Hi @ltnilaysahu, Please use this exact code which is confirmed to work: https://github.com/ToothlessGear/node-gcm/issues/340#issuecomment-630349825