> 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/en/features/cookies/banner/classify.md).

# Classify cookies by consent categories

Learn how to classify cookies by consent categories.

In its [draft recommendation](https://www.cnil.fr/fr/la-cnil-lance-une-consultation-publique-sur-son-projet-de-recommandation-cookies-et-autres-traceurs) on cookies and other trackers (in French), the CNIL recommends that you list and categorize the cookies on your website according to whether or not they require consent.

{% hint style="info" %}
For more information on the CNIL recommendations on cookies, read the article "[The CNIL's cookie recommendations explained to your boss](https://www.dastra.eu/fr/article/recommendations-CNIL-cookies-expliquees-a-votre-boss/104)" (in French).
{% endhint %}

In Dastra, the category of a cookie is the category of the service it belongs to: you choose the **purpose** of each service, and all its cookies inherit it. The available categories are:

* **Strictly necessary**: cookies that are exempt from consent by their nature, for example session or consent cookies;
* **Preferences**;
* **Analytic**;
* **Marketing**;
* **Social network**;
* **Other**.

{% content-ref url="/pages/1T5zJslQz7mvpsDUKYB2" %}
[The purposes of cookies](https://doc.dastra.eu/en/features/cookies/banner/purposes.md)
{% endcontent-ref %}

## Choose the purpose of a service

1. Open the banner: **Cookie consent** > **Banners**, then click the banner.
2. Expand the **Services** section.
3. Click the service to classify. In the **Service infos** tab, choose a value in the **Service's purpose** field.
4. Confirm, then click **Save changes**.

<figure><img src="https://2697025545-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LvBxs22wUMicv9uWp6C-1972196547%2Fuploads%2Fgit-blob-8a504bad49f05b2dd5b7553dbd100d39a0524b0b%2Fcookies-classify-1.png?alt=media" alt="The Services section of the banner editor, with the purpose shown under the name of each service"><figcaption><p>The purpose of each service is shown under its name</p></figcaption></figure>

<figure><img src="https://2697025545-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LvBxs22wUMicv9uWp6C-1972196547%2Fuploads%2Fgit-blob-6ac568cf145447e7667432e4f6ed47c7a16b02ac%2Fcookies-classify-2.png?alt=media" alt="The service form with the Service&#x27;s purpose field"><figcaption><p>The "Service's purpose" field in the service form</p></figcaption></figure>

A service cannot be saved with the "Unclassified" purpose: choose one of the categories above.

{% hint style="info" %}
You decide case by case whether consent must be requested for a service with the **Request consent for these cookies? (display buttons)** option. It is disabled for the **Strictly necessary** category.
{% endhint %}

{% hint style="warning" %}
A cookie detected by the scan but not linked to any service (unclassified cookie) is never displayed in the public banner. Add it to an existing service or create a service from it: see [Handle unclassified cookies](https://doc.dastra.eu/en/features/cookies/banner/scan.md#handle-unclassified-cookies).
{% endhint %}

Once all your cookies belong to a service classified by category, you can configure the banner.

{% content-ref url="/pages/-M378oB2HodWBFfDdJsg" %}
[Set up the cookie consent banner](https://doc.dastra.eu/en/features/cookies/banner/configure.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/en/features/cookies/banner/classify.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.
