<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@firebase/analytics](./analytics.md)

## analytics package

Firebase Analytics

## Functions

|  Function | Description |
|  --- | --- |
|  [getAnalytics(app)](./analytics.getanalytics.md) | Returns a Firebase Analytics instance for the given app. |
|  [isSupported()](./analytics.issupported.md) | 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)](./analytics.logevent.md) | Sends analytics event with given <code>eventParams</code>. 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 gtag.js reference documentation](https://developers.google.com/gtagjs/reference/event)<!-- -->. |
|  [logEvent(analyticsInstance, eventName, eventParams, options)](./analytics.logevent_9.md) | Sends analytics event with given <code>eventParams</code>. 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 gtag.js reference documentation](https://developers.google.com/gtagjs/reference/event)<!-- -->. |
|  [logEvent(analyticsInstance, eventName, eventParams, options)](./analytics.logevent_10.md) | Sends analytics event with given <code>eventParams</code>. 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 gtag.js reference documentation](https://developers.google.com/gtagjs/reference/event)<!-- -->. |
|  [logEvent(analyticsInstance, eventName, eventParams, options)](./analytics.logevent_11.md) | Sends analytics event with given <code>eventParams</code>. 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 gtag.js reference documentation](https://developers.google.com/gtagjs/reference/event)<!-- -->. |
|  [logEvent(analyticsInstance, eventName, eventParams, options)](./analytics.logevent_12.md) | Sends analytics event with given <code>eventParams</code>. 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 gtag.js reference documentation](https://developers.google.com/gtagjs/reference/event)<!-- -->. |
|  [logEvent(analyticsInstance, eventName, eventParams, options)](./analytics.logevent_13.md) | Sends analytics event with given <code>eventParams</code>. 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 gtag.js reference documentation](https://developers.google.com/gtagjs/reference/event)<!-- -->. |
|  [logEvent(analyticsInstance, eventName, eventParams, options)](./analytics.logevent_14.md) | Sends analytics event with given <code>eventParams</code>. 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 gtag.js reference documentation](https://developers.google.com/gtagjs/reference/event)<!-- -->. |
|  [logEvent(analyticsInstance, eventName, eventParams, options)](./analytics.logevent_15.md) | Sends analytics event with given <code>eventParams</code>. 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 gtag.js reference documentation](https://developers.google.com/gtagjs/reference/event)<!-- -->. |
|  [logEvent(analyticsInstance, eventName, eventParams, options)](./analytics.logevent_16.md) | Sends analytics event with given <code>eventParams</code>. 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 gtag.js reference documentation](https://developers.google.com/gtagjs/reference/event)<!-- -->. |
|  [logEvent(analyticsInstance, eventName, eventParams, options)](./analytics.logevent_17.md) | Sends analytics event with given <code>eventParams</code>. 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 gtag.js reference documentation](https://developers.google.com/gtagjs/reference/event)<!-- -->. |
|  [logEvent(analyticsInstance, eventName, eventParams, options)](./analytics.logevent_18.md) | Sends analytics event with given <code>eventParams</code>. 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 gtag.js reference documentation](https://developers.google.com/gtagjs/reference/event)<!-- -->. |
|  [logEvent(analyticsInstance, eventName, eventParams, options)](./analytics.logevent_1.md) | Sends analytics event with given <code>eventParams</code>. 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 gtag.js reference documentation](https://developers.google.com/gtagjs/reference/event)<!-- -->. |
|  [logEvent(analyticsInstance, eventName, eventParams, options)](./analytics.logevent_19.md) | Sends analytics event with given <code>eventParams</code>. 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 gtag.js reference documentation](https://developers.google.com/gtagjs/reference/event)<!-- -->. |
|  [logEvent(analyticsInstance, eventName, eventParams, options)](./analytics.logevent_20.md) | Sends analytics event with given <code>eventParams</code>. 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 gtag.js reference documentation](https://developers.google.com/gtagjs/reference/event)<!-- -->. |
|  [logEvent(analyticsInstance, eventName, eventParams, options)](./analytics.logevent_21.md) | Sends analytics event with given <code>eventParams</code>. 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 gtag.js reference documentation](https://developers.google.com/gtagjs/reference/event)<!-- -->. |
|  [logEvent(analyticsInstance, eventName, eventParams, options)](./analytics.logevent_2.md) | Sends analytics event with given <code>eventParams</code>. 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 gtag.js reference documentation](https://developers.google.com/gtagjs/reference/event)<!-- -->. |
|  [logEvent(analyticsInstance, eventName, eventParams, options)](./analytics.logevent_3.md) | Sends analytics event with given <code>eventParams</code>. 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 gtag.js reference documentation](https://developers.google.com/gtagjs/reference/event)<!-- -->. |
|  [logEvent(analyticsInstance, eventName, eventParams, options)](./analytics.logevent_4.md) | Sends analytics event with given <code>eventParams</code>. 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 gtag.js reference documentation](https://developers.google.com/gtagjs/reference/event)<!-- -->. |
|  [logEvent(analyticsInstance, eventName, eventParams, options)](./analytics.logevent_5.md) | Sends analytics event with given <code>eventParams</code>. 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 gtag.js reference documentation](https://developers.google.com/gtagjs/reference/event)<!-- -->. |
|  [logEvent(analyticsInstance, eventName, eventParams, options)](./analytics.logevent_6.md) | Sends analytics event with given <code>eventParams</code>. 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 gtag.js reference documentation](https://developers.google.com/gtagjs/reference/event)<!-- -->. |
|  [logEvent(analyticsInstance, eventName, eventParams, options)](./analytics.logevent_7.md) | Sends analytics event with given <code>eventParams</code>. 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 gtag.js reference documentation](https://developers.google.com/gtagjs/reference/event)<!-- -->. |
|  [logEvent(analyticsInstance, eventName, eventParams, options)](./analytics.logevent_8.md) | Sends analytics event with given <code>eventParams</code>. 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 gtag.js reference documentation](https://developers.google.com/gtagjs/reference/event)<!-- -->. |
|  [setAnalyticsCollectionEnabled(analyticsInstance, enabled)](./analytics.setanalyticscollectionenabled.md) | Sets whether analytics collection is enabled for this app on this device. window\['ga-disable-analyticsId'\] = true; |
|  [setCurrentScreen(analyticsInstance, screenName, options)](./analytics.setcurrentscreen.md) | Use gtag 'config' command to set 'screen\_name'. |
|  [settings(options)](./analytics.settings.md) | Configures Firebase Analytics to use custom <code>gtag</code> or <code>dataLayer</code> names. Intended to be used if <code>gtag.js</code> script has been installed on this page independently of Firebase Analytics, and is using non-default names for either the <code>gtag</code> function or for <code>dataLayer</code>. Must be called before calling <code>getAnalytics()</code> or it won't have any effect. |
|  [setUserId(analyticsInstance, id, options)](./analytics.setuserid.md) | Use gtag 'config' command to set 'user\_id'. |
|  [setUserProperties(analyticsInstance, properties, options)](./analytics.setuserproperties.md) | Use gtag 'config' command to set all params specified. |

## Interfaces

|  Interface | Description |
|  --- | --- |
|  [Analytics](./analytics.analytics.md) | The Firebase Analytics service interface. |
|  [AnalyticsCallOptions](./analytics.analyticscalloptions.md) | Additional options that can be passed to Firebase Analytics method calls such as <code>logEvent</code>, <code>setCurrentScreen</code>, etc. |
|  [ControlParams](./analytics.controlparams.md) | Standard gtag.js control parameters. For more information, see [the gtag.js documentation on parameters](https://developers.google.com/gtagjs/reference/parameter)<!-- -->. |
|  [CustomParams](./analytics.customparams.md) | Any custom params the user may pass to gtag.js. |
|  [EventParams](./analytics.eventparams.md) | Standard gtag.js event parameters. For more information, see [the gtag.js documentation on parameters](https://developers.google.com/gtagjs/reference/parameter)<!-- -->. |
|  [Item](./analytics.item.md) | Item field used by some Analytics events. |
|  [Promotion](./analytics.promotion.md) | Field previously used by some Analytics events. |
|  [SettingsOptions](./analytics.settingsoptions.md) | Specifies custom options for your Firebase Analytics instance. You must set these before initializing <code>firebase.analytics()</code>. |

## Type Aliases

|  Type Alias | Description |
|  --- | --- |
|  [Currency](./analytics.currency.md) | Currency field used by some Analytics events. |
|  [CustomEventName](./analytics.customeventname.md) | Any custom event name string not in the standard list of recommended event names. |
|  [EventNameString](./analytics.eventnamestring.md) | Type for standard gtag.js event names. <code>logEvent</code> also accepts any custom string and interprets it as a custom event name. |

