snowplow/snowplow-javascript-tracker

View on GitHub
api-docs/docs/browser-tracker/markdown/browser-tracker.disableanonymoustracking.md

Summary

Maintainability
Test Coverage
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@snowplow/browser-tracker](./browser-tracker.md) &gt; [disableAnonymousTracking](./browser-tracker.disableanonymoustracking.md)

## disableAnonymousTracking() function

Disables anonymous tracking if active (ie. tracker initialized with `anonymousTracking`<!-- -->) For stateStorageStrategy override, uses supplied value first, falls back to one defined in initial config, otherwise uses cookieAndLocalStorage.

<b>Signature:</b>

```typescript
declare function disableAnonymousTracking(configuration?: DisableAnonymousTrackingConfiguration, trackers?: Array<string>): void;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  configuration | DisableAnonymousTrackingConfiguration | The configuration for disabling anonymous tracking |
|  trackers | Array&lt;string&gt; | The tracker identifiers which the event will be sent to |

<b>Returns:</b>

void