node-tracker.trackercore.addglobalcontexts
Home > @snowplow/node-tracker > TrackerCore > addGlobalContexts
TrackerCore.addGlobalContexts() method
Adds contexts globally, contexts added here will be attached to all applicable events
Signature:addGlobalContexts(contexts: Array<ConditionalContextProvider | ContextPrimitive> | Record<string, ConditionalContextProvider | ContextPrimitive>): void;
Parameters
Parameter | Type | Description |
---|---|---|
contexts | Array<ConditionalContextProvider | ContextPrimitive> | Record<string, ConditionalContextProvider | ContextPrimitive> | An array containing either contexts or a conditional contexts |
void