Is this page not displaying properly for you? Try disabling your ad-blocker... (it's because the domain contains 'cookie-notice')

Getting Started
Introduction Installation Configuration
Events Translating
Examples
Checking consent with Alpine.js Google Tag Manager

Example: Checking consent with Alpine.js ​

If you're using Alpine.js & need to conditionally display elements based on consent status, you may do something like this, using the x-show directive:

<div x-show="window.cookieNotice.hasConsent('Marketing')">
<iframe src="https://youtube.com/embed/xxx">
</div>
← Translating Google Tag Manager →
Getting Started
Introduction Installation Configuration
Events Translating
Examples
Checking consent with Alpine.js Google Tag Manager