flutterfire icon indicating copy to clipboard operation
flutterfire copied to clipboard

(analytics) Add the option to set default config on Web

Open russellwheatley opened this issue 3 years ago • 0 comments

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

russellwheatley avatar Jul 29 '22 13:07 russellwheatley

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 🤔

russellwheatley avatar Aug 18 '22 09:08 russellwheatley