<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@snowplow/react-native-tracker](./react-native-tracker.md) &gt; [TrackerCore](./react-native-tracker.trackercore.md) &gt; [addGlobalContexts](./react-native-tracker.trackercore.addglobalcontexts.md)

## TrackerCore.addGlobalContexts() method

Adds contexts globally, contexts added here will be attached to all applicable events

<b>Signature:</b>

```typescript
addGlobalContexts(contexts: Array<ConditionalContextProvider | ContextPrimitive> | Record<string, ConditionalContextProvider | ContextPrimitive>): void;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  contexts | Array&lt;ConditionalContextProvider \| ContextPrimitive&gt; \| Record&lt;string, ConditionalContextProvider \| ContextPrimitive&gt; | An array containing either contexts or a conditional contexts |

<b>Returns:</b>

void

