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 > settings

settings() function

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.

Signature:

export declare function settings(options: SettingsOptions): void;

Parameters

Parameter Type Description
options SettingsOptions Custom gtag and dataLayer names.

Returns:

void