api-docs/docs/node-tracker/markdown/node-tracker.buildconsentgranted.md
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@snowplow/node-tracker](./node-tracker.md) > [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