Amazon sns firebase analytics label

Viewed 187

I'm able to send and create firebase analytics label using firebase REST:

enter image description here

However, how can I do it in Amazon SNS (which is connected to firebase)?

{
  "GCM":"{ \"notification\": { \"body\": \"BobyTest\", \"title\":\"TitleTest\" } }"
}

I've tried:

{
  "GCM":"{ \"notification\": { \"body\": \"BobyTest\", \"title\":\"TitleTest\" },\"fcm_options\": {\"analytics_label\":\"testAnalyticsLabel\"}}\" }"
}

Able to receive the push notification but the analytics label is not created.

Tried to refer to SNS docs - sns-send-custom-platform-specific-payloads-mobile-devices, the list of the key-value pairs documents is referring to the legacy API:

enter image description here

Noticed the "fcm_options" is only available in the new API:

enter image description here

Is there a way to achieve this using SNS? I need the analytics label to filter the data in the cloud messaging report:

enter image description here

0 Answers
Related