Cookie declaration
Learn how to add a cookie declaration to your website.
The cookie declaration is a public list of the cookies detected on your website. It tells the visitor which cookies you use and for what purpose. It is most often placed on the subpage with the privacy and cookie policy.
The content is generated from the latest scan of your website, with the cookies divided into the relevant categories. The list refreshes itself after every scan, so you don't need to update it manually.
What the cookie declaration contains
The document consists of several elements, arranged in a fixed order:
- title,
- date of the last scan,
- introduction,
- information about the visitor's consent, with a button to change it,
- tables of cookies, one for each category.
The categories appear one after another in this order: Necessary, Functional, Analytics, Marketing and Unclassified.
The “Name” column is always visible in the table. You can turn off the others: “Provider”, “Purpose”, “Expiry” and “Type”.
How do I add a cookie declaration?
You'll find the code to paste in the panel, in the “Cookie declaration” section, in the “Installation” part. Copy it with the “Copy” button and paste it at the spot on your page where the list should appear.
The code looks like this:
<!-- CookieOfficer Cookie Declaration -->
<div id="co-cookie-declaration"></div>
<script async src="https://cdn.cookieofficer.com/declaration.js" data-co-id="co-XXXXXXXXXXXXXXXXXXXX"></script>
The string co-XXXXXXXXXXXXXXXXXXXX is where your project ID goes. The code copied from the panel already has it filled in.
The cookie declaration works independently of the cookie banner, so it will also appear on a page without the banner code.
You can paste the code in several places on your website. The list will then appear in each of them.
What can you edit in the cookie declaration?
You'll find the declaration settings in the “Cookie declaration” section. On the left you edit the content, and on the right you see a live preview.
Elements. You turn on or off the date of the last scan, the information about the visitor's consent and the button for changing consent. Here you can also set the accent colour and the frame corner radius.
Content. You change the title, the introduction and the label of the link for changing consent. The introduction can be up to 800 characters long, including bold text and links, and the other fields up to 160 characters. An empty field means that we'll show the default content.
Table columns. You decide which columns the visitor sees.
You save your changes with the “Save changes” button. The new version will appear on your website within about a minute.
Category names and descriptions
The category names and descriptions come from the cookie banner editor, from the “Content” step. This way the visitor reads about the same categories in both places.
You can change them in the cookie banner editor, in the “Consent categories” section.
Cookie declaration languages
The cookie declaration uses the same languages as the cookie banner, and you define the set of languages on the “Languages & geo rules” page. You edit the texts in the panel separately for each language.
We choose the language in the same way as for the cookie banner, so both elements always appear in the same language.
Appearance on your website
The cookie declaration takes the font, size and colour of the text from your website. In the panel you only set the accent colour and the frame corner radius.
This way the list looks like part of the privacy policy, not like a foreign element pasted into your content.
Common problems and how to solve them
If the list doesn't appear on your website, open the browser console. You'll find a message there stating the cause.
Tool code missing from the page. The code hasn't been pasted, or it is incomplete. Copy it again from the panel and replace the previous version with it.
Project ID missing from the code. As above, copy the whole code again.
404 error. Check the project ID in the code. If it is correct, prepare a cookie banner for this project, because the cookie declaration won't be created without it.
The project is suspended. The cookie declaration disappears together with the cookie banner, and changing your plan brings both back.
Instead of the tables you see a message that the list is being prepared. The scan hasn't finished yet.
Instead of the tables you see a message that no cookies were detected. The scan has finished but didn't find any cookies.