-
Notifications
You must be signed in to change notification settings - Fork 928
A Pure JS Firebase Analytics implementation #2644
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I found a few problems with this issue:
|
Hi - thanks for the detailed explanation and code. First, the key part of your question, about the use of Measurement Protocol v2: It is not currently stable and that team is still in the process of working out all the use cases they plan to support. Because of this, we can't officially incorporate its use into the Firebase JS SDK at this time. If you or anyone wants to create a community solution based on it, the fact that it is still in progress and not yet officially supported should be taken into consideration. Smaller questions: One thing I was a little bit unclear about, when you mention "Native Firebase", do you mean the From what I know about the supporting multiple-apps-in-a-single-app problem, the react-native-firebase team wouldn't actually be able to solve it on their end - their library actually depends on the Firebase iOS and Android SDKs, both of which would have to make significant changes to support react-native-firebase providing this functionality, so this change would be a pretty big effort. I can't say how likely it is or isn't but keep that in mind. Finally, the Firebase Analytics in this project (the JS SDK, no relation to react-native-firebase) also doesn't work in React Native, but for different reasons - because it is based on gtag.js, the browser JS library for Analytics, and gtag.js requires cookies to work. |
Hi Christina!
Thank you for the feedback and elaborating on that. We understand there is a danger (for us) and that things might change on the Google side of things. Would there be a way for us to know if any (breaking) changes are coming so we can anticipate? Having access to a changelog/release-notes would be great, but I understand if you want to keep that internal for now.
Yes, we are well aware of
Yes exactly, that was also one of the reasons for creating this community implementation. We'd also rather not build & support something like this, but we also want to provide a working & testable Analytics experience to our Firebase users on the standard Expo client. Thank you for feedback so far and good to know Google doesn't disapprove of this 👍 regards, |
@IjzerenHein I haven't seen many updates on this feature request. Is this still an issue for your team? Please let us know |
Hey @IjzerenHein. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically. If you have more information that will help us get to the bottom of this, just add a comment! |
Since there haven't been any recent updates here, I am going to close this issue. @IjzerenHein if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this. |
Hey guys, first of all, I'm a big fan of Firebase and keep up the great work! 👍 🔥🔥
I'd like to sketch a scenario and would love to hear your feedback. We at expo.io are working on getting Native Firebase working on the Expo Client. Due to the fact that we have a single universal App that can host multiple app experiences (with potentially a different firebase configuration for each project), this is quite a challenge.
One of these challenges is getting Firebase Analytics to work, which is a Singleton and does not seem to support the scenario that we want to provide to our users.
As such, we have created a Pure JavaScript Firebase Analytics implementation that we can load into our environment, on a per project basis. So our users can still log events and test their Firebase Analytics configuration. It uses the (undocumented) Measurement Protocol 2 to do it's logging. It has no external dependencies and doesn't track any app lifecycle events, but you can still call
logEvent
to log events and set userId & user-properties.Source code:
https://gist.github.com/IjzerenHein/df3f65093038dd70ad871f926be6f45e
What are your thoughts on this and how do you see the existence of something like this in the Firebase eco-system? Is this something you would support; and to what extend do you consider the Measurement Protocol 2 to be stable?
Ideally, we would like to create multiple instances of the the Native Firebase Analytics module. Perhaps "lite" versions, that don't require hooks into certain lifecycle events, nor a persistent database. Are there plans in this area?
best regards,
Hein
The text was updated successfully, but these errors were encountered: