Home > @firebase/analytics > setAnalyticsCollectionEnabled
setAnalyticsCollectionEnabled() function
Sets whether analytics collection is enabled for this app on this device. window['ga-disable-analyticsId'] = true;
Signature:
export declare function setAnalyticsCollectionEnabled(analyticsInstance: Analytics, enabled: boolean): void;
Parameters
Parameter | Type | Description |
---|---|---|
analyticsInstance | Analytics | Firebase Analytics instance. |
enabled | boolean | If true, enables collection, if false, disables it. |
Returns:
void