applyConsent
function applyConsent(state, options): voidDefined in: apply.ts:60
Apply a consent state to the document by:
- Activating any
<script type="text/plain" data-tb-category="X">whose category was granted - Calling
gtag('consent', 'update', ...)ifgtagis on the global scope - Dispatching a
tickbox:consent-changedCustomEvent for any custom integrations
No-op on the server.
Parameters
| Parameter | Type |
|---|---|
state | ConsentState |
options | ApplyOptions |
Returns
void