Skip to main content

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

ParameterTypeDescription
contextsArray<ConditionalContextProvider | ContextPrimitive> | Record<string, ConditionalContextProvider | ContextPrimitive>An array containing either contexts or a conditional contexts
Returns:

void