Skip to content

Enable Firebase Message Delivery Data Export to BigQuery #156

@githubjakob

Description

@githubjakob

Is your feature request related to a problem? Please describe.
FCM provides tools to gain insights into push notification message delivery. One such tool is the BigQuery data export. The MESSAGE_DELIVERED event is not available by default, but needs to be enabled on the app level. It would be nice to enable it via the Capacitor FCM plugin.

Describe the solution you'd like
Ideally the capacitor plugin provides a interface to enable the MESSAGE_DELIVERED metric being exported to BigQuery, similar to setDeliveryMetricsExportToBigQuery(true). So that I can set it enabled during app runtime after the user provided consent to export the data.

Describe alternatives you've considered
I tried to follow the instructions given here https://firebase.google.com/docs/cloud-messaging/understand-delivery?platform=android#enable-message-delivery-data-export

For Android at least the global setting in the app manifest is straightforward, but I cannot figure out how to combine using the Capacitor FCM plugin with the native iOS and Android code snippets given in the Firebase docs.

Additional context
I'm open to provide a PR if I can figure out how to do it.

If somebody who already is using the feature could give my some pointers, I would by glad!

In particular, for iOS:
When I create the NotificationServiceExtension as suggested by the docs, I don't receive events in the didReceive callback handler, even when mutable-content is set to 1 in the message.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions