flutterfire
flutterfire copied to clipboard
(analytics) Add the option to set default config on Web
According to https://github.com/firebase/firebase-js-sdk/issues/5812 we can have the same behaviour as setDefaultEventParameters by using https://firebase.google.com/docs/reference/js/analytics.md?hl=fi#initializeanalytics
Having investigated this, we would have to pass default event parameters into FirebaseAnalytics.instanceFor. If the default parameters are not passed into initializeAnalytics on first initialization, they will not become default parameters.
We've done something similar on FirebaseAuth for persistence on web (https://github.com/firebase/flutterfire/pull/9138).
I'm not sure about having two separate APIs for default event parameters 🤔