The Firebase JS SDK is now in BETA!
This EAP site is no longer maintained. See the official Firebase Documentation site for the latest documentation and information about the Firebase JS SDK.

Home > @firebase/analytics > logEvent

logEvent() function

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 gtag.js reference documentation.

Signature:

export declare function logEvent(analyticsInstance: Analytics, eventName: 'add_payment_info', eventParams?: {
    coupon?: EventParams['coupon'];
    currency?: EventParams['currency'];
    items?: EventParams['items'];
    payment_type?: EventParams['payment_type'];
    value?: EventParams['value'];
    [key: string]: any;
}, options?: AnalyticsCallOptions): void;

Parameters

Parameter Type Description
analyticsInstance Analytics
eventName 'add_payment_info'
eventParams { coupon?: EventParams['coupon']; currency?: EventParams['currency']; items?: EventParams['items']; payment_type?: EventParams['payment_type']; value?: EventParams['value']; [key: string]: any; }
options AnalyticsCallOptions

Returns:

void