UNPKG

@datadog/browser-logs

Version:
16 lines 673 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.startTrackingConsentContext = startTrackingConsentContext; const browser_core_1 = require("@datadog/browser-core"); function startTrackingConsentContext(hooks, trackingConsentState) { function isConsented() { const wasConsented = trackingConsentState.isGranted(); if (!wasConsented) { return browser_core_1.DISCARDED; } return browser_core_1.SKIPPED; } hooks.register(0 /* HookNames.Assemble */, isConsented); hooks.register(1 /* HookNames.AssembleTelemetry */, isConsented); } //# sourceMappingURL=trackingConsentContext.js.map