# Create a cookie policy

{% embed url="<https://www.loom.com/share/392016a2d11c41199078baf352bed2b1>" %}

You must have a cookie policy that your visitors can read when they accept cookies. This is how it looks in the Openli widget:

![](/files/PKDnETwCbmYofoRHbdvn)

## 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*)](/docs/general-openli-guides/add-your-website.md)
2. [Created cookie providers and categorised all cookies](/docs/cookie-consent-management/get-started-with-legal-monster.md#step-2-create-your-cookie-providers)

## Step 1: Create an agreement

To create your first cookie policy, click on "**Agreements**" in the Openli dashboard. Click on "New agreement" and select cookie policy. Give your agreement a title and save it.&#x20;

![](/files/ywVpC9FxJIdaAuYTHwOp)

## Step 2: Fill out your agreement

Once you have created your agreement, you are asked to fill out the policy.&#x20;

![](/files/ppzUiVSk4PiCWV6j0rml)

{% hint style="danger" %}
Your privacy policy [must include certain sections](https://www.legalmonster.com/learning/cookie-compliance#what-you-need-to-include-in-your-cookie-policy) according to the law. &#x20;
{% endhint %}

When you fill out the policy, you can use our **tags** for describing your cookie providers.&#x20;

We highly recommend that you do so, as Openli will *automatically* update your policy. Scanning for cookies, adding, editing or deleting a cookie provider or adding a cookie to a provider will create a new revision of all cookie policies on a given project.

#### Tags

| Tag                            | Description                                                                                               |
| ------------------------------ | --------------------------------------------------------------------------------------------------------- |
| `[[LIST_NECESSARY_PROVIDERS]]` | This tag will show a table of your necessary cookie providers and the cookies that they set on your site. |
| `[[LIST_ANALYTICS_PROVIDERS]]` | This tag will show a table of your analytics cookie providers and the cookies that they set on your site. |
| `[[LIST_MARKETING_PROVIDERS]]` | This tag will show a table of your marketing cookie providers and the cookies that they set on your site. |

If you use the tags above, Openli generates a table that lists all of your providers within the specified category.&#x20;

Once you are satisfied with your policy, you can save it by clicking the green button "Save Draft". When you save your draft, you are asked to provide some editorial notes, so you'll have a revision trail.&#x20;

## Step 3: Publish your policy

If you're finished with your draft, you can publish it. When you publish your draft, it is live in your widgets and new users will consent to the new version of your cookie policy.&#x20;

![](/files/cG3YqSrqrHYiu66wxQNU)

If you wish to update your policy in the future, you can press "Update agreement" to create a new revision of your cookie policy.&#x20;

## Done

Congratulations on completing your first step towards collecting compliant cookie consent. Pat your self on the back and know that our privacy mascot Li is proud of you.&#x20;

![](/files/zs6pyohoGPpemrZGhYeD)


---

# Agent Instructions: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
