The Firebase Analytics service interface.

Do not call this constructor directly. Instead, use firebase.analytics().

Index

Properties

app

app: App

The app associated with the Analytics service instance.

example
var app = analytics.app;

Methods

logEvent

  • logEvent(eventName: "add_payment_info", eventParams?: object, options?: AnalyticsCallOptions): void
  • Sends analytics event with given eventParams. This method automatically associates this logged event with this Firebase web app instance on this device. List of official event parameters can be found in the gtag.js reference documentation.

    Parameters

    • eventName: "add_payment_info"
    • Optional eventParams: object
      • [key: string]: any
    • Optional options: AnalyticsCallOptions

    Returns void

  • logEvent(eventName: "add_to_cart" | "add_to_wishlist" | "remove_from_cart", eventParams: object, options?: AnalyticsCallOptions): void
  • Sends analytics event with given eventParams. This method automatically associates this logged event with this Firebase web app instance on this device. List of official event parameters can be found in the gtag.js reference documentation.

    Parameters

    • eventName: "add_to_cart" | "add_to_wishlist" | "remove_from_cart"
    • eventParams: object
      • [key: string]: any
      • Optional currency?: string
      • Optional items?: Array
      • Optional value?: number
    • Optional options: AnalyticsCallOptions

    Returns void

  • logEvent(eventName: "begin_checkout", eventParams: object, options?: AnalyticsCallOptions): void
  • Sends analytics event with given eventParams. This method automatically associates this logged event with this Firebase web app instance on this device. List of official event parameters can be found in the gtag.js reference documentation.

    Parameters

    • eventName: "begin_checkout"
    • eventParams: object
      • [key: string]: any
      • Optional coupon?: string
      • Optional currency?: string
      • Optional items?: Array
      • Optional value?: number
    • Optional options: AnalyticsCallOptions

    Returns void

  • logEvent(eventName: "checkout_progress", eventParams: object, options?: AnalyticsCallOptions): void
  • Sends analytics event with given eventParams. This method automatically associates this logged event with this Firebase web app instance on this device. List of official event parameters can be found in the gtag.js reference documentation.

    Parameters

    • eventName: "checkout_progress"
    • eventParams: object
      • [key: string]: any
      • Optional checkout_option?: string
      • Optional checkout_step?: number
      • Optional coupon?: string
      • Optional currency?: string
      • Optional items?: Array
      • Optional value?: number
    • Optional options: AnalyticsCallOptions

    Returns void

  • logEvent(eventName: "exception", eventParams: object, options?: AnalyticsCallOptions): void
  • Sends analytics event with given eventParams. This method automatically associates this logged event with this Firebase web app instance on this device. List of official event parameters can be found in the gtag.js reference documentation.

    Parameters

    • eventName: "exception"
    • eventParams: object
      • [key: string]: any
      • Optional description?: string
      • Optional fatal?: boolean
    • Optional options: AnalyticsCallOptions

    Returns void

  • logEvent(eventName: "generate_lead", eventParams: object, options?: AnalyticsCallOptions): void
  • Sends analytics event with given eventParams. This method automatically associates this logged event with this Firebase web app instance on this device. List of official event parameters can be found in the gtag.js reference documentation.

    Parameters

    • eventName: "generate_lead"
    • eventParams: object
      • [key: string]: any
      • Optional currency?: string
      • Optional transaction_id?: string
      • Optional value?: number
    • Optional options: AnalyticsCallOptions

    Returns void

  • logEvent(eventName: "login", eventParams: object, options?: AnalyticsCallOptions): void
  • Sends analytics event with given eventParams. This method automatically associates this logged event with this Firebase web app instance on this device. List of official event parameters can be found in the gtag.js reference documentation.

    Parameters

    • eventName: "login"
    • eventParams: object
      • [key: string]: any
      • Optional method?: string
    • Optional options: AnalyticsCallOptions

    Returns void

  • logEvent(eventName: "page_view", eventParams: object, options?: AnalyticsCallOptions): void
  • Sends analytics event with given eventParams. This method automatically associates this logged event with this Firebase web app instance on this device. List of official event parameters can be found in the gtag.js reference documentation.

    Parameters

    • eventName: "page_view"
    • eventParams: object
      • [key: string]: any
      • Optional page_location?: string
      • Optional page_path?: string
      • Optional page_title?: string
    • Optional options: AnalyticsCallOptions

    Returns void

  • logEvent(eventName: "purchase", eventParams: object, options?: AnalyticsCallOptions): void
  • Sends analytics event with given eventParams. This method automatically associates this logged event with this Firebase web app instance on this device. List of official event parameters can be found in the gtag.js reference documentation.

    Parameters

    • eventName: "purchase"
    • eventParams: object
      • [key: string]: any
      • Optional coupon?: string
      • Optional currency?: string
      • Optional items?: Array
      • Optional shipping?: string | number
      • Optional tax?: string | number
      • transaction_id: string
      • Optional value?: number
    • Optional options: AnalyticsCallOptions

    Returns void

  • logEvent(eventName: "refund", eventParams: object, options?: AnalyticsCallOptions): void
  • Sends analytics event with given eventParams. This method automatically associates this logged event with this Firebase web app instance on this device. List of official event parameters can be found in the gtag.js reference documentation.

    Parameters

    • eventName: "refund"
    • eventParams: object
      • [key: string]: any
      • Optional currency?: string
      • Optional items?: Array
      • Optional shipping?: string | number
      • Optional tax?: string | number
      • transaction_id: string
      • Optional value?: number
    • Optional options: AnalyticsCallOptions

    Returns void

  • logEvent(eventName: "screen_view", eventParams: object, options?: AnalyticsCallOptions): void
  • Sends analytics event with given eventParams. This method automatically associates this logged event with this Firebase web app instance on this device. List of official event parameters can be found in the gtag.js reference documentation.

    Parameters

    • eventName: "screen_view"
    • eventParams: object
      • [key: string]: any
      • Optional app_id?: string
      • Optional app_installer_id?: string
      • app_name: string
      • Optional app_version?: string
      • screen_name: string
    • Optional options: AnalyticsCallOptions

    Returns void

  • logEvent(eventName: "search" | "view_search_results", eventParams: object, options?: AnalyticsCallOptions): void
  • Sends analytics event with given eventParams. This method automatically associates this logged event with this Firebase web app instance on this device. List of official event parameters can be found in the gtag.js reference documentation.

    Parameters

    • eventName: "search" | "view_search_results"
    • eventParams: object
      • [key: string]: any
      • Optional search_term?: string
    • Optional options: AnalyticsCallOptions

    Returns void

  • logEvent(eventName: "select_content", eventParams: object, options?: AnalyticsCallOptions): void
  • Sends analytics event with given eventParams. This method automatically associates this logged event with this Firebase web app instance on this device. List of official event parameters can be found in the gtag.js reference documentation.

    Parameters

    • eventName: "select_content"
    • eventParams: object
      • [key: string]: any
        <