> 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/de/features/gerer-le-consentement-aux-cookies/integration-technique/integration-dans-les-cms.md).

# Schnellstart

Erfahren Sie, wie Sie das Dastra-Cookie-Widget mithilfe des JavaScript-SDK in eine Webseite integrieren.

## Voraussetzung: Abruf eines öffentlichen API-Schlüssels

Um einen öffentlichen Schlüssel des Dastra-SDK abzurufen, besuchen Sie diese Seite: <https://app.dastra.eu/general-settings/api>

![](https://1094947073-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgG4SiA7dB1sjSI91cItk%2Fuploads%2Fgit-blob-0e0968af03ffbfa2854706753b50e805f98b8170%2FCookie12.png?alt=media)

<figure><img src="https://1094947073-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgG4SiA7dB1sjSI91cItk%2Fuploads%2Fgit-blob-d4b4927851df922972b52039ffb0812bbf5968ad%2FCookie13.png?alt=media" alt=""><figcaption></figcaption></figure>

## Konfigurieren Sie Ihr Widget

Konfigurieren Sie Ihr Widget anhand des folgenden Leitfadens

{% content-ref url="/pages/dC0IAXQfVHePjDXk00VE" %}
[Einrichtung des Banners](/de/features/gerer-le-consentement-aux-cookies/configuration-du-widget.md)
{% endcontent-ref %}

## Fügen Sie den HTML-Integrationscode ein

Fügen Sie den HTML-Code, der im Bereich „Code" des Dastra Cookie-Einwilligungsmoduls verfügbar ist, **vor dem Ende des \<BODY>-Tags** Ihrer Website auf allen Seiten ein. Sie können den Google Tag Manager verwenden, um diesen Code dynamisch auf jeder Seite einzufügen.

{% hint style="info" %}
Damit der Code korrekt funktioniert, stellen Sie sicher, dass der öffentliche Schlüssel Ihrer API zuvor korrekt konfiguriert ist.
{% endhint %}

So sieht der Integrationscode des Widgets aus

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

Das div mit der ID „dastra-cookie-consent" ist der Platzhalter für die Darstellung Ihres Einwilligungs-Widgets. Das Attribut „data-widgetid" identifiziert das aufgerufene Widget, es ist häufig eine Zahl (int32). {your\_public\_key} entspricht Ihrem öffentlichen [API-Schlüssel, der hier abrufbar ist](https://app.dastra.eu/general-settings/api)

Sobald der Code im \<body>-Tag Ihrer Website eingefügt ist, wird das Widget auf Ihrer Website angezeigt.

{% hint style="warning" %}
Für optimale Leistung wird das Widget automatisch vom Browser im sessionStorage zwischengespeichert
{% endhint %}

## WordPress

Wenn Sie WordPress verwenden, finden Sie im folgenden Link weitere Informationen darüber, wie der generierte Code am Ende des HTML-Tags Ihrer Website eingefügt werden kann.

{% content-ref url="/pages/X5iE4lu9lXWrLHBBOy2S" %}
[Wordpress](/de/features/gerer-le-consentement-aux-cookies/integration-technique/integration-dans-les-cms/wordpress.md)
{% endcontent-ref %}

Sobald das Widget integriert ist, fahren Sie mit der Testphase fort.

{% content-ref url="/pages/in1xQGT2NCXG5890pODd" %}
[Widget-Integration testen](/de/features/gerer-le-consentement-aux-cookies/integration-technique/comment-tester-lintegration-dun-widget.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/de/features/gerer-le-consentement-aux-cookies/integration-technique/integration-dans-les-cms.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.
