CookieHub Docs

Cookie categories

The five categories CookieHub sorts cookies into, their IDs, and what the Necessary category means for consent.

Visitors consent to cookies by category, not one cookie at a time. CookieHub uses five standard categories throughout: in the consent dialog, in the cookie declaration, in the Dashboard's cookie management and in the IDs you use to tie your own scripts and tags to consent.

NameIDPurpose
NecessarynecessaryEssential cookies needed to enable core functionality.
PreferencespreferencesCookies that are not strictly essential but improve the visitor's experience without collecting behavioural data or personal information.
AnalyticsanalyticsCookies that monitor visitor behaviour and collect information about website usage for analytical purposes, so that website owners can understand how visitors interact with the site and improve it.
MarketingmarketingCookies that track visitor behaviour and gather data on website usage for marketing purposes, so that advertising and promotional content can be tailored to the visitor's preferences and browsing patterns.
UncategorizeduncategorizedAny cookie that does not fall under the four categories above, or whose purpose is unknown.

Necessary is the exception

Necessary is the only category that does not require consent: its cookies are set whether or not the visitor has answered. Whether a cookie belongs there depends on what it does on your website, not on its general type. A cookie that is necessary on one site can be optional on another. Review every cookie the scanner places in Necessary before you publish, and move the ones that are not essential to the category that fits.

How cookies get their category

The cookie scanner finds the cookies on your website and suggests a category for each from CookieHub's cookie database. The suggestion is a starting point: you can change the category and the description of any cookie in the Dashboard's Cookies tab. A cookie the database does not know lands in Uncategorized, and the scan report asks you to categorize it. See Cookie management.

Uncategorized behaves like the other categories: whether a service whose cookies sit there is blocked follows the acceptance state of the Uncategorized category. You can show Uncategorized as a choice in the consent dialog, but CookieHub recommends against it; place each cookie in one of the four categories above instead, so visitors choose between things they can understand.

Using the IDs

The category IDs are what you use to make your own scripts and tags wait for consent:

  • On a direct installation, a script or HTML tag marked for a category is held back until that category is allowed. See Conditional HTML tags.
  • In Google Tag Manager, each category has a CookieHub trigger. See Triggers.
  • In the JavaScript API, the IDs name the categories in events and methods.

Where to next

On this page