browser-tracker.addglobalcontexts
Home > @snowplow/browser-tracker > addGlobalContexts
addGlobalContexts() function
All provided contexts will be sent with every event
Signature:declare function addGlobalContexts(contexts: Array<ConditionalContextProvider | ContextPrimitive> | Record<string, ConditionalContextProvider | ContextPrimitive>, trackers?: Array<string>): void;
Parameters
Parameter | Type | Description |
---|---|---|
contexts | Array<ConditionalContextProvider | ContextPrimitive> | Record<string, ConditionalContextProvider | ContextPrimitive> | An array of contexts or conditional contexts |
trackers | Array<string> | The tracker identifiers which the global contexts will be added to |
void