OneTrust Cookie Consent
PlatformCookie banner and consent platform with a browser JavaScript API
- Erişim
- OneTrust tenant and domain script
Hakkında
OneTrust Web CMP publishes cookie banners and a preference center. Its browser script exposes consent-change callbacks. With logging enabled, it records visitor choices for receipt lookup. Set up and publish a domain script in a OneTrust tenant before using the API.
Neler yapabilirsin
- Show a cookie banner and let visitors choose consent categories
- Open the preference center from a custom privacy settings button
- Log each visitor's cookie consent choices for later receipt lookup
Başlarken
- Configure and publish a Web CMP domain script in OneTrust
- Add the published script to your site's head using its domain script ID
- Use OneTrust.OnConsentChanged to react when preferences change
Örnek kod
<script src="https://cdn.cookielaw.org/scripttemplates/otSDKStub.js"
data-domain-script="YOUR_DOMAIN_SCRIPT_ID"></script>
<script>
function OptanonWrapper() {
OneTrust.OnConsentChanged(function () {
console.log(window.OnetrustActiveGroups);
});
}
</script>Ayrıntılar
- Barındırma
- Hazır hizmet (bulut)
- Kullanılabildiği yerler
- Tüm dünya
- MCP sunucusu
- Yok