Cookie Declaration
Showing the cookie declaration is pretty straightforward.
When your application is not a single page application (Angular, Vue, ...), only following script should be included at the place where you want the cookie declaration to show up.
javascript
<script
id="CookieDeclaration"
src="https://consent.cookiebot.com/33655448-1393-4b43-8126-e8b9cd543ac6/cd.js"
type="text/javascript"
async
></script>
When using a single page application framework, we need to programmatically inject the script. The Codey module can be used:
javascript
import { loadScript } from "@xerius/codey-cookiebot";
loadScript(
yourDomElementReference,
`https://consent.cookiebot.com/33655448-1393-4b43-8126-e8b9cd543ac6/cd.js`,
[{ name: "async", value: true }]
);