Index
Properties
Methods
Properties
app
The app associated with the Analytics
service
instance.
Methods
logEvent
-
Sends 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.Parameters
-
eventName: "add_payment_info"
-
Optional eventParams: { coupon?: EventParams["coupon"]; currency?: EventParams["currency"]; items?: EventParams["items"]; payment_type?: EventParams["payment_type"]; value?: EventParams["value"] }
-
[key: string]: any
-
Optional coupon?: EventParams["coupon"]
-
Optional currency?: EventParams["currency"]
-
Optional items?: EventParams["items"]
-
Optional payment_
type?: EventParams["payment_type"] -
Optional value?: EventParams["value"]
-
-
Optional options: AnalyticsCallOptions
Returns 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 recommended event parameters can be found in the GA4 reference documentation.Parameters
-
eventName: "add_shipping_info"
-
Optional eventParams: { coupon?: EventParams["coupon"]; currency?: EventParams["currency"]; items?: EventParams["items"]; shipping_tier?: EventParams["shipping_tier"]; value?: EventParams["value"] }
-
[key: string]: any
-
Optional coupon?: EventParams["coupon"]
-
Optional currency?: EventParams["currency"]
-
Optional items?: EventParams["items"]
-
Optional shipping_
tier?: EventParams["shipping_tier"] -
Optional value?: EventParams["value"]
-
-
Optional options: AnalyticsCallOptions
Returns 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 recommended event parameters can be found in the GA4 reference documentation.Parameters
-
eventName: "add_to_cart" | "add_to_wishlist" | "remove_from_cart"
-
Optional eventParams: { currency?: EventParams["currency"]; items?: EventParams["items"]; value?: EventParams["value"] }
-
[key: string]: any
-
Optional currency?: EventParams["currency"]
-
Optional items?: EventParams["items"]
-
Optional value?: EventParams["value"]
-
-
Optional options: AnalyticsCallOptions
Returns 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 recommended event parameters can be found in the GA4 reference documentation.Parameters
-
eventName: "begin_checkout"
-
Optional eventParams: { coupon?: EventParams["coupon"]; currency?: EventParams["currency"]; items?: EventParams["items"]; value?: EventParams["value"] }
-
[key: string]: any
-
Optional coupon?: EventParams["coupon"]
-
Optional currency?: EventParams["currency"]
-
Optional items?: EventParams["items"]
-
Optional value?: EventParams["value"]
-
-
Optional options: AnalyticsCallOptions
Returns 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 recommended event parameters can be found in the GA4 reference documentation.Parameters
-
eventName: "checkout_progress"
-
Optional eventParams: { checkout_option?: EventParams["checkout_option"]; checkout_step?: EventParams["checkout_step"]; coupon?: EventParams["coupon"]; currency?: EventParams["currency"]; items?: EventParams["items"]; value?: EventParams["value"] }
-
[key: string]: any
-
Optional checkout_
option?: EventParams["checkout_option"] -
Optional checkout_
step?: EventParams["checkout_step"] -
Optional coupon?: EventParams["coupon"]
-
Optional currency?: EventParams["currency"]
-
Optional items?: EventParams["items"]
-
Optional value?: EventParams["value"]
-
-
Optional options: AnalyticsCallOptions
Returns void
-
-
Sends analytics event with given
eventParams
. This method automatically associates this logged event with this Firebase web app instance on this device. See Measure exceptions.Parameters
-
eventName: "exception"
-
Optional eventParams: { description?: EventParams["description"]; fatal?: EventParams["fatal"] }
-
[key: string]: any
-
Optional description?: EventParams["description"]
-
Optional fatal?: EventParams["fatal"]
-
-
Optional options: AnalyticsCallOptions
Returns 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 recommended event parameters can be found in the GA4 reference documentation.Parameters
-
eventName: "generate_lead"
-
Optional eventParams: { currency?: EventParams["currency"]; value?: EventParams["value"] }
-
[key: string]: any
-
Optional currency?: EventParams["currency"]
-
Optional value?: EventParams["value"]
-
-
Optional options: AnalyticsCallOptions
Returns 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 recommended event parameters can be found in the GA4 reference documentation.Parameters
-
eventName: "login"
-
Optional eventParams: { method?: EventParams["method"] }
-
[key: string]: any
-
Optional method?: EventParams["method"]
-
-
Optional options: AnalyticsCallOptions
Returns void
-
-
Sends analytics event with given
eventParams
. This method automatically associates this logged event with this Firebase web app instance on this device. See Page views.Parameters
-
eventName: "page_view"
-
Optional eventParams: { page_location?: string; page_path?: string; page_title?: string }
-
[key: string]: any
-
Optional page_
location?: string -
Optional page_
path?: string -
Optional page_
title?: string
-
-
Optional options: AnalyticsCallOptions
Returns 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 recommended event parameters can be found in the GA4 reference documentation.Parameters
-
eventName: "purchase" | "refund"
-
Optional eventParams: { affiliation?: EventParams["affiliation"]; coupon?: EventParams["coupon"]; currency?: EventParams["currency"]; items?: EventParams["items"]; shipping?: EventParams["shipping"]; tax?: EventParams["tax"]; transaction_id: EventParams["transaction_id"]; value?: EventParams["value"] }
-
[key: string]: any
-
Optional affiliation?: EventParams["affiliation"]
-
Optional coupon?: EventParams["coupon"]
-
Optional currency?: EventParams["currency"]
-
Optional items?: EventParams["items"]
-
Optional shipping?: EventParams["shipping"]
-
Optional tax?: EventParams["tax"]
-
transaction_
id: EventParams["transaction_id"] -
Optional value?: EventParams["value"]
-
-
Optional options: AnalyticsCallOptions
Returns void
-
-
Sends analytics event with given
eventParams
. This method automatically associates this logged event with this Firebase web app instance on this device. See Track Screenviews.Parameters
-
eventName: "screen_view"
-
Optional eventParams: { firebase_screen: EventParams["firebase_screen"]; firebase_screen_class: EventParams["firebase_screen_class"] }
-
[key: string]: any
-
firebase_
screen: EventParams["firebase_screen"] -
firebase_
screen_ class: EventParams["firebase_screen_class"]
-
-
Optional options: AnalyticsCallOptions
Returns 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 recommended event parameters can be found in the GA4 reference documentation.Parameters
-
eventName: "search" | "view_search_results"
-
Optional eventParams: { search_term?: EventParams["search_term"] }
-
[key: string]: any
-
Optional search_
term?: EventParams["search_term"]
-
-
Optional options: AnalyticsCallOptions
Returns 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 recommended event parameters can be found in the GA4 reference documentation.Parameters
-
eventName: "select_content"
-
Optional eventParams: { content_type?: EventParams["content_type"]; item_id?: EventParams["item_id"] }
-
[key: string]: any
-
Optional content_
type?: EventParams["content_type"] -
Optional item_
id?: EventParams["item_id"]
-
-
Optional options: AnalyticsCallOptions
Returns 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 recommended event parameters can be found in the GA4 reference documentation.Parameters
-
eventName: "select_item"
-
Optional eventParams: { item_list_id?: EventParams["item_list_id"]; item_list_name?: EventParams["item_list_name"]; items?: EventParams["items"] }
-
[key: string]: any
-
Optional item_
list_ id?: EventParams["item_list_id"] -
Optional item_
list_ name?: EventParams["item_list_name"] -
Optional items?: EventParams["items"]
-
-
Optional options: AnalyticsCallOptions
Returns 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 recommended event parameters can be found in the GA4 reference documentation.Parameters
-
eventName: "select_promotion" | "view_promotion"
-
Optional eventParams: { items?: EventParams["items"]; promotion_id?: EventParams["promotion_id"]; promotion_name?: EventParams["promotion_name"] }
-
[key: string]: any
-
Optional items?: EventParams["items"]
-
Optional promotion_
id?: EventParams["promotion_id"] -
Optional promotion_
name?: EventParams["promotion_name"]
-
-
Optional options: AnalyticsCallOptions
Returns 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 recommended event parameters can be found in the GA4 reference documentation.Parameters
-
eventName: "set_checkout_option"
-
Optional eventParams: { checkout_option?: EventParams["checkout_option"]; checkout_step?: EventParams["checkout_step"] }
-
[key: string]: any
-
Optional checkout_
option?: EventParams["checkout_option"] -
Optional checkout_
step?: EventParams["checkout_step"]
-
-
Optional options: AnalyticsCallOptions
Returns 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 recommended event parameters can be found in the GA4 reference documentation.Parameters
-
eventName: "share"
-
Optional eventParams: { content_type?: EventParams["content_type"]; item_id?: EventParams["item_id"]; method?: EventParams["method"] }
-
[key: string]: any
-
Optional content_
type?: EventParams["content_type"] -
Optional item_
id?: EventParams["item_id"] -
Optional method?: EventParams["method"]
-
-
Optional options: AnalyticsCallOptions
Returns 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 recommended event parameters can be found in the GA4 reference documentation.Parameters
-
eventName: "sign_up"
-
Optional eventParams: { method?: EventParams["method"] }
-
[key: string]: any
-
Optional method?: EventParams["method"]
-
-
Optional options: AnalyticsCallOptions
Returns 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 recommended event parameters can be found in the GA4 reference documentation.Parameters
-
eventName: "timing_complete"
-
Optional eventParams: { event_category?: string; event_label?: string; name: string; value: number }
-
[key: string]: any
-
Optional event_
category?: string -
Optional event_
label?: string -
name: string
-
value: number
-
-
Optional options: AnalyticsCallOptions
Returns 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 recommended event parameters can be found in the GA4 reference documentation.Parameters
-
eventName: "view_cart" | "view_item"
-
Optional eventParams: { currency?: EventParams["currency"]; items?: EventParams["items"]; value?: EventParams["value"] }
-
[key: string]: any
-
Optional currency?: EventParams["currency"]
-
Optional items?: EventParams["items"]
-
Optional value?: EventParams["value"]
-
-
Optional options: AnalyticsCallOptions
Returns 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 recommended event parameters can be found in the GA4 reference documentation.Parameters
-
eventName: "view_item_list"
-
Optional eventParams: { item_list_id?: EventParams["item_list_id"]; item_list_name?: EventParams["item_list_name"]; items?: EventParams["items"] }
-
[key: string]: any
-
Optional item_
list_ id?: EventParams["item_list_id"] -
Optional item_
list_ name?: EventParams["item_list_name"] -
Optional items?: EventParams["items"]
-
-
Optional options: AnalyticsCallOptions
Returns 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 recommended event parameters can be found in the GA4 reference documentation.Type parameters
-
T: string
Parameters
-
eventName: CustomEventName<T>
-
Optional eventParams: {}
-
[key: string]: any
-
-
Optional options: AnalyticsCallOptions
Returns void
-
setAnalyticsCollectionEnabled
-
Sets whether analytics collection is enabled for this app on this device. window['ga-disable-analyticsId'] = true;
Parameters
-
enabled: boolean
Returns void
-
setCurrentScreen
-
Use gtag 'config' command to set 'screen_name'.
Parameters
-
screenName: string
-
Optional options: AnalyticsCallOptions
Returns void
-
setUserId
-
Use gtag 'config' command to set 'user_id'.
Parameters
-
id: string
-
Optional options: AnalyticsCallOptions
Returns void
-
setUserProperties
-
Use gtag 'config' command to set all params specified.
Parameters
-
properties: CustomParams
-
Optional options: AnalyticsCallOptions
Returns void
-
The Firebase Analytics service interface.
Do not call this constructor directly. Instead, use
firebase.analytics()
.