> 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/gerer-le-consentement-aux-cookies/integration-technique/identification.md).

# Gebruikersidentificatie

Deze pagina legt uit hoe u de interne identifiers van de organisatie kunt traceren in de toestemmingsbewijzen

## Hoe het werkt

Het principe is als volgt: u stuurt de **unieke identifier van de geauthenticeerde gebruiker** in uw intranet naar de dastra widget en deze zal deze id versturen bij het verzamelen van de toestemming van de gebruiker. Het is dan mogelijk om het bewijs van toestemming te koppelen aan de klantendatabase (CRM, klantendatabase, klantendatabase, etc.). Eenmaal in het weergavegebied van de toestemmingsbewijzen wordt de geduwde gebruikers-ID weergegeven.

## Stap 1: Kies de gebruikers-ID

Hiervoor moet je een variabele kiezen die je naar de widget wilt overbrengen. Je kunt het base64 gehashte e-mailadres van de gebruiker, een interne klant-ID of een CRM ID gebruiken. Deze variabele moet beschikbaar zijn op de webpagina en wordt in duidelijke tekst doorgegeven. Het mag geen persoonlijke informatie over de gebruiker bevatten (achternaam, voornaam, ongecodeerd e-mailadres).

{% hint style="info" %}
Als u een base64 gecodeerde string verstuurt, wordt deze automatisch gedecodeerd wanneer de toestemming van de gebruiker wordt ontvangen in de Dastra database.
{% endhint %}

## Stap 2: Pas de integratiecode aan

```markup
<div id="cookie-consent"></div>
<script src="https://cdn.dastra.eu/sdk/dastra.js?key={YOUR PUBLIC KEY HERE}" async></script>
<script>

// Dastra's array's initialization
window.dastra = window.dastra || [];

// Load the cookie consent in page
dastra.push(['loadCookieConsent', {
    widgetId: {Paste your widgetId here (digit)},
    selector: '#cookie-consent',
    userId: {The userId's variable (email 64bits hash or whatever...)}
}]);
</script>
```

Je kunt ook de "set"-methode gebruiken

```markup
<div id="cookie-consent"></div>
<script src="https://cdn.dastra.eu/sdk/dastra.js?key={YOUR PUBLIC KEY HERE}" async></script>
<script>

// Dastra's array's initialization
window.dastra = window.dastra || [];

// Load the cookie consent in page
dastra.push(['loadCookieConsent', {
    widgetId: {Paste your widgetId here (digit)},
    selector: '#cookie-consent'
}]);

// Push the userId to dastra's cookies
// It must be pushed after the loadCookieConsent method
dastra.push(['set','cookie:userId',{The userId's variable (email 64bits hash or whatever...)}])
</script>
```


---

# 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/gerer-le-consentement-aux-cookies/integration-technique/identification.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.
