firebase / firebase-admin-node

Firebase Admin Node.js SDK
https://firebase.google.com/docs/admin/setup
Apache License 2.0
1.63k stars 371 forks source link

[FR] add firebase analytics event log to the sdk #949

Open bolds07 opened 4 years ago

bolds07 commented 4 years ago

Is your feature request related to a problem? Please describe. I use firebase realtime database and firebase functions to realize most of my backend processing for my apps. Currently firebase functions/firebase-admin-node is not able to register analytics events... this leads to several not optimal situation which i will relate one here.

When a user purchase something from my app, i use firebase functions + third party apis to process the payment and update the relevant data into the database... however this process might be asynchronous because many payments methods behave like this... So, many times, right after the user purchase, i return the status 'pending' to the user and waiting the payment follow its flow.

When i get the final answer from the payment APIs, case the order is approved i would like to register a firebase analytics event so i can monitore such events on my firebase dashboard, but even there is a standard event for such situation, firebase functions is not able to register any analytics events because such api was designed to be used only by client applications.

so in this scenario i need to publish this into a topic, subscribe the client to the topic and write the event log in the client aplication.

Describe the solution you'd like I know firebase analytics is designed to be client side because you collect many data for every event such as location, gender, age etc that only the client has... but there isn't any real tecnological limitation to avoid using it from backend ignoring the missing data.

If I the "business owner" dont care about demographic or geografical data about my purchases and only need to monitore its progress i wish i could simple register the event from firebase functions

google-oss-bot commented 4 years ago

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

hiranya911 commented 4 years ago

Related to https://github.com/firebase/firebase-admin-java/issues/137

goleary commented 3 years ago

Any update on whether this functionality is being considered for addition to the admin package?

We have backend processes that run for each user upon which we'd like to log events or add/remove them from a particular audience.

Currently it seems like this is not possible, is that correct?

Thanks!

hiranya911 commented 3 years ago

There's been some preliminary discussions about adding this feature (and even some prototyping work that we cannot share). We will continue to press the issue with the GA team and see what they think about it.

goleary commented 3 years ago

Thanks for the update @hiranya911.

🤞 the GA team is open to it.

This is a blocker for us using firebase cloud messaging as is.