> For the complete documentation index, see [llms.txt](https://doc.dastra.eu/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.dastra.eu/nl/features/cookies/integration/quickstart.md).

# Snel aan de slag

Leer hoe u de Dastra-cookiebanner met de JavaScript-SDK in een webpagina integreert.

## Voorwaarde: een openbare API-sleutel ophalen

De banner heeft een openbare API-sleutel nodig. Klik op het tandwielpictogram in de bovenbalk (**Organisatie-instellingen**) en daarna op **API-sleutels** in het linkermenu. Zie [API-sleutelbeheer](https://doc.dastra.eu/nl/features/settings/api-keys.md).

<figure><img src="https://996651476-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1i0NSpf8ID0PXTpIyycA%2Fuploads%2Fgit-blob-48cf9361a1c99d0e8d5b2a5fd00bef0405f61be8%2Fcookies-quickstart-1.png?alt=media" alt="De pagina API-sleutels met de lijst met sleutels"><figcaption><p>De pagina "API-sleutels"</p></figcaption></figure>

## Uw banner configureren

Configureer uw banner met de onderstaande gids:

{% content-ref url="/pages/4HYg7K7FL55YdEFAuzVr" %}
[Banner instellen](https://doc.dastra.eu/nl/features/cookies/banner.md)
{% endcontent-ref %}

## De HTML-integratiecode invoegen

Voeg de HTML-code uit de sectie **Installatie** van de banner, kaart **JavaScript**, op alle pagina's van uw website in, **vóór de afsluitende tag `</body>`**. U kunt Google Tag Manager gebruiken om deze code dynamisch op elke pagina in te voegen.

{% hint style="info" %}
De openbare API-sleutel moet vooraf zijn geconfigureerd om de code te laten werken.
{% endhint %}

Dit is de integratiecode van de banner:

```html
<div id="dastra-cookie-consent" data-widgetid="{your_widget_id}"></div>
<script src="https://cdn.dastra.eu/sdk/dastra.js?key={your_public_key}" async></script>
```

De `div` met het id `dastra-cookie-consent` is de plaats waar de banner wordt weergegeven. Het attribuut `data-widgetid` identificeert de banner: het is een geheel getal. `{your_public_key}` is uw openbare API-sleutel, beschikbaar bij **API-sleutels**.

{% hint style="info" %}
Kopieer de code altijd uit de applicatie. Afhankelijk van de hostingregio van uw organisatie verandert het adres van het script (`cdn-bleu.dastra.eu` in plaats van `cdn.dastra.eu`) en het adres van de API (`api-bleu.dastra.eu` in plaats van `api.dastra.eu`).
{% endhint %}

Zodra de code vóór de tag `</body>` van uw website is ingevoegd, verschijnt de banner.

{% hint style="warning" %}
Voor betere prestaties bewaart de browser de banner in de `sessionStorage`.
{% endhint %}

## De banner vanaf een knop opnieuw openen

Toestemming intrekken mag niet moeilijker zijn dan toestemming geven. Voeg aan uw website, bijvoorbeeld in de voettekst, een knop toe die de banner opnieuw opent. Hetzelfde fragment staat in de sectie **Installatie** van de banner:

```html
<button type="button" onclick="dastra.openCookieConsent()">Check your cookie consent</button>
```

## WordPress

Gebruikt u WordPress, dan legt de volgende pagina uit hoe u de banner met de Dastra-plugin installeert.

{% content-ref url="/pages/xWUVhjQRbxHYvDrwRyoe" %}
[Wordpress](https://doc.dastra.eu/nl/features/cookies/integration/quickstart/wordpress.md)
{% endcontent-ref %}

Zodra de banner is geïntegreerd, gaat u verder met de testfase.

{% content-ref url="/pages/gZj5wfm3zgnApvjTzLPR" %}
[De integratie van een banner testen](https://doc.dastra.eu/nl/features/cookies/integration/test.md)
{% endcontent-ref %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://doc.dastra.eu/nl/features/cookies/integration/quickstart.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
