Firebase Javascript Analytics Package
Jump to navigation
Jump to search
A Firebase Javascript Analytics Package is a Firebase Analytics Package (is a Firebase package that is an application analytics SDK.
- Context:
- It can be composed of Firebase Analytics Functions.
- …
- Counter-Example(s):
- See: GCP Firebase, Firebase SDK.
References
2021
Function Description getAnalytics(app) Returns an Analytics instance for the given app. initializeAnalytics(app, options) Returns an Analytics instance for the given app. isSupported() This is a public static method provided to users that wraps four different checks:1. Check if it's not a browser extension environment. 2. Check if cookies are enabled in current browser. 3. Check if IndexedDB is supported by the browser environment. 4. Check if the current browser context is valid for using IndexedDB.open(). logEvent(analyticsInstance, eventName, eventParams, options) Sends a Google Analytics event with given eventParams. This method automatically associates this logged event with this Firebase web app instance on this device. List of recommended event parameters can be found in the GA4 reference documentation. ... setAnalyticsCollectionEnabled(analyticsInstance, enabled) Sets whether Google Analytics collection is enabled for this app on this device. Sets global window['ga-disable-analyticsId'] = true; setCurrentScreen(analyticsInstance, screenName, options) Use gtag config command to set screen_name. settings(options) Configures Firebase Analytics to use custom gtag or dataLayer names. Intended to be used if gtag.js script has been installed on this page independently of Firebase Analytics, and is using non-default names for either the gtag function or for dataLayer. Must be called before calling getAnalytics() or it won't have any effect. setUserId(analyticsInstance, id, options) Use gtag config command to set user_id. setUserProperties(analyticsInstance, properties, options) Use gtag config command to set all params specified.