Skip to main content

node-tracker.buildconsentgranted

Home > @snowplow/node-tracker > buildConsentGranted

buildConsentGranted() function

Build a Consent Granted Event Used for tracking when a user grants their consent

Signature:
declare function buildConsentGranted(event: ConsentGrantedEvent): {
event: PayloadBuilder;
context: {
schema: string;
data: Record<string, unknown>;
}[];
};

Parameters

ParameterTypeDescription
eventConsentGrantedEventContains the properties for the Consent Granted event
Returns:

{ event: PayloadBuilder; context: { schema: string; data: Record&lt;string, unknown&gt;; }\[\]; }

An object containing the PayloadBuilder to be sent to and a 'consent_document' context