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