snowplow/snowplow-javascript-tracker

View on GitHub
api-docs/docs/node-tracker/markdown/node-tracker.buildconsentgranted.md

Summary

Maintainability
Test Coverage
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@snowplow/node-tracker](./node-tracker.md) &gt; [buildConsentGranted](./node-tracker.buildconsentgranted.md)

## buildConsentGranted() function

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

<b>Signature:</b>

```typescript
declare function buildConsentGranted(event: ConsentGrantedEvent): EventPayloadAndContext;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  event | ConsentGrantedEvent | Contains the properties for the Consent Granted event |

<b>Returns:</b>

EventPayloadAndContext

An object containing the PayloadBuilder to be sent to  and a 'consent\_document' context