<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@snowplow/node-tracker](./node-tracker.md) &gt; [TrackerCore](./node-tracker.trackercore.md)

## TrackerCore interface

Export interface containing all Core functions

<b>Signature:</b>

```typescript
interface TrackerCore 
```

## Properties

|  Property | Type | Description |
|  --- | --- | --- |
|  [addPayloadPair](./node-tracker.trackercore.addpayloadpair.md) | (key: string, value: unknown) =&gt; void | Set a persistent key-value pair to be added to every payload |
|  [track](./node-tracker.trackercore.track.md) | (pb: PayloadBuilder, context?: Array&lt;SelfDescribingJson&gt; \| null, timestamp?: Timestamp \| null) =&gt; Payload \| undefined | Call with a payload from a buildX function Adds context and payloadPairs name-value pairs to the payload Applies the callback to the built payload |

## Methods

|  Method | Description |
|  --- | --- |
|  [addGlobalContexts(contexts)](./node-tracker.trackercore.addglobalcontexts.md) | Adds contexts globally, contexts added here will be attached to all applicable events |
|  [addPayloadDict(dict)](./node-tracker.trackercore.addpayloaddict.md) | Merges a dictionary into payloadPairs |
|  [addPlugin(configuration)](./node-tracker.trackercore.addplugin.md) | Add a plugin into the plugin collection after Core has already been initialised |
|  [clearGlobalContexts()](./node-tracker.trackercore.clearglobalcontexts.md) | Removes all global contexts |
|  [deactivate()](./node-tracker.trackercore.deactivate.md) | Deactivate tracker core including all plugins. This is useful for cleaning up resources or listeners that have been created. Once deactivated, the tracker won't be able to track any events. |
|  [getBase64Encoding()](./node-tracker.trackercore.getbase64encoding.md) | Get current base64 encoding state |
|  [removeGlobalContexts(contexts)](./node-tracker.trackercore.removeglobalcontexts.md) | Removes previously added global context, performs a deep comparison of the contexts or conditional contexts |
|  [resetPayloadPairs(dict)](./node-tracker.trackercore.resetpayloadpairs.md) | Replace payloadPairs with a new dictionary |
|  [setAppId(appId)](./node-tracker.trackercore.setappid.md) | Set the application ID |
|  [setBase64Encoding(encode)](./node-tracker.trackercore.setbase64encoding.md) | Turn base 64 encoding on or off |
|  [setColorDepth(depth)](./node-tracker.trackercore.setcolordepth.md) | Set the color depth |
|  [setIpAddress(ip)](./node-tracker.trackercore.setipaddress.md) | Set the IP address |
|  [setLang(lang)](./node-tracker.trackercore.setlang.md) | Set the language |
|  [setPlatform(value)](./node-tracker.trackercore.setplatform.md) | Set the platform |
|  [setScreenResolution(width, height)](./node-tracker.trackercore.setscreenresolution.md) | Set the screen resolution |
|  [setTimezone(timezone)](./node-tracker.trackercore.settimezone.md) | Set the timezone |
|  [setTrackerNamespace(name)](./node-tracker.trackercore.settrackernamespace.md) | Set the tracker namespace |
|  [setTrackerVersion(version)](./node-tracker.trackercore.settrackerversion.md) | Set the tracker version |
|  [setUseragent(useragent)](./node-tracker.trackercore.setuseragent.md) | Set the Useragent |
|  [setUserId(userId)](./node-tracker.trackercore.setuserid.md) | Set the user ID |
|  [setViewport(width, height)](./node-tracker.trackercore.setviewport.md) | Set the viewport dimensions |

