> For the complete documentation index, see [llms.txt](https://docs.openli.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.openli.com/docs/cookie-consent-management/cookie-widget/how-to-create-a-cookie-widget.md).

# Create a cookie widget

## Before you start

Before following these steps, please be sure that you have:

1. Added your website's URL (*either during the signup process or in the settings page*)
2. [Created a cookie policy](/docs/cookie-consent-management/cookie-widget/how-to-create-a-cookie-policy.md)

## Step 1: Creating the widget

Creating the widget is simple and quick. Simply go to your Openli dashboard and select "**Widgets"** from the side menu. Once your on our widgets page click the "New widget"-bottom.

![](/files/lfoiYqDdcOSwSrVEhLsK)

From the overview select Cookie consent to get started:

![](/files/6FUcyXPSf9Wkox3Ee3ky)

## Step 2: Configuring your widget

Each cookie widget must have an assigned cookie policy. Select the policy that you've created for your cookie widget. If you only have one cookie policy, the widget will automatically use it.&#x20;

Openli provides you with a different set of options to customise your widget.&#x20;

![](/files/7yTEcZSsT4EmsSWzNwfD)

## Step 3: Done!

That's it! You've now created your cookie consent widgets, ready to be installed on your website.&#x20;

{% hint style="warning" %}
Note that the default language for the widget is English.\
[To change the language of the widget follow this guide.](/docs/cookie-consent-management/cookie-widget/setup-widget-language.md)
{% endhint %}

![](/files/kbctJ1tKZGdORQ2M2rP4)


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.openli.com/docs/cookie-consent-management/cookie-widget/how-to-create-a-cookie-widget.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
