Adding a cookie manually
Find out how to manually add a cookie to the list in the CookieOfficer panel.
You can supplement the cookie list yourself. Use this when you know about a cookie that isn't on the list yet. Most often this concerns areas available after logging in, the cart and checkout, forms, and tools added for the duration of a specific campaign.
How do I add a cookie manually?
- In the CookieOfficer panel, go to the “Cookies” section.
- Click the “Add cookie” button in the top right corner of the screen.
- Fill in the fields in the “Add a cookie manually” window.
- Confirm with the “Add cookie” button.
After saving, you'll see the confirmation “Cookie added”.
Fields in the add window
| Field | What to enter | Example | If you leave it empty |
|---|---|---|---|
| Cookie name | the name of the cookie, exactly as it is stored on the device | shop_cart | required field, you'll see the message “Enter the cookie name” |
| Lifetime | how long the cookie stays on the visitor's device | 1 year | a dash |
| Provider | the name of the tool or company that sets the cookie | Google Analytics | “Unknown”, and we'll put the cookie on the combined card of that name |
| Domain | the domain on which the cookie is set. This lets us tell apart two cookies with the same name from different parts of the website | shop.com | stays empty, and we merge such cookies into one entry |
| Category | one of the four categories | Necessary | “Unclassified” |
| Party | whether the cookie comes from your domain or from an external one | Own (first-party) | “External (third-party)” |
| Purpose | a short description of what the cookie is for, shown in the declaration | Stores the contents of the cart | a dash, and in the declaration we'll show the category description |
We save the description from the “Purpose” field in the default language of the cookie banner. A visitor with a different language will therefore see it in your default language.
There is no “Kind” field in the window, because we determine the kind during the scan. In the declaration, we describe every manually added cookie with the kind “HTTP cookie”.
Will a manually added cookie be blocked?
No. A manual addition is an entry in the declaration, not a blocking rule.
We block scripts, not the cookies themselves. During a scan, we record the address of the script that set a given cookie, and it is this address that we hold back until the visitor gives consent. A manually added cookie has no such address, so we have nothing to hold back.
Assigning a category to a manual entry gives you two things:
- the switch for that category on the cookie banner,
- a row in the public cookie declaration.
It doesn't, however, prevent the cookie from being stored on the device of a visitor who has rejected this category.
How do I block a manually added cookie until the visitor gives consent?
If you know which script sets this cookie, add your own blocking rule. You'll find it in the “Cookies” section, on the “Providers” tab, in the “Custom blocking rules” part.
Enter part of the script address and the category it should belong to. From then on, we hold this script back until the visitor gives consent, and the cookie isn't created at all.
The rule applies when automatic blocking is used. In manual mode, we hold back only the scripts that you've marked with the data-co-cat attribute. This is described in the article Automatic and manual blocking.
Cookies set by the server
Cookies set with the Set-Cookie header can't be stopped by CookieOfficer or by any other tool that runs in the browser.
Here the decision is up to your application. Check the visitor's consent status in it, and don't set the cookie until there is consent.
When will the changes be visible on the website?
We place the added cookie in the public cookie declaration and on the preferences screen of the cookie banner.
We refresh the declaration within about a minute and the cookie banner within about five minutes.
What happens when that cookie appears in a scan result?
If the name and domain are the same, we keep the entry from the scan result and don't show yours a second time. So you won't see a duplicate.
We don't delete your entry. We keep it in the configuration and will show it again if a later scan doesn't detect this cookie. We also keep the category you assigned.
We merge entries based on the name and the domain. If the domain contains a typo or the field is empty, you'll see two rows.
How do I recognise a manually added cookie?
In the “Cookies” section, we don't mark manually added cookies with a separate badge. There is one visible difference. For a cookie from a scan result you'll find the provider and the kind under the name, and for a manually added one only the provider.
You can check this in the edit window. Open a specific entry by clicking the pencil icon, and see whether the fields have padlocks and whether the window contains a “Remove” button.
That's why it's worth filling in the “Purpose” field. With your own description, you'll recognise your entries even after several months.
How do I remove a manually added cookie?
Click the pencil icon next to the chosen entry, and then the “Remove” button in the edit window. You'll see the confirmation “Cookie removed”.
We show the “Remove” button only for manually added cookies. Cookies from a scan result can't be removed, because we remove them ourselves when a later scan doesn't detect them.