How CookieHub works on a page
What happens from the moment the CookieHub script loads: region detection, the consent dialog, blocking, storage and the consent log.
CookieHub is a script on your website. Everything it does for a visitor follows from the order in which that script runs, which is why installation pages insist on loading it before anything that sets cookies.
When the page loads
- The CookieHub script loads first. It is added with the HTML tag, the Google Tag Manager template or your platform's plugin, and it has to run before the services that set cookies. See Install.
- Automatic cookie blocking holds back known services. Before any other JavaScript runs, CookieHub detects the scripts of commonly used services that set tracking cookies and delays them until their category is allowed. This is optional, and it is not used with Google Tag Manager, where tags are controlled by triggers instead. See Automatic cookie blocking.
- The region is detected. CookieHub's servers detect the visitor's region from the IP address of the request, and discard the address once the region is known. The region decides which consent type, legal framework and texts apply. See Regions and Anonymization of IP addresses.
- The consent dialog is shown, or not. If the visitor has already answered, CookieHub reads their choices from its first-party cookie and applies them. If not, the consent dialog appears and asks.
When the visitor chooses
- The choice is stored in the visitor's browser, in the first-party cookie named
cookiehub, so the dialog is not shown again on the next page or visit. The cookie lasts a year by default; its name, lifetime andSecureattribute are set under Consent storage. What it contains is in Cookies and storage used by CookieHub. - The allowed categories are released. Scripts held back by automatic cookie blocking, or tags waiting on a CookieHub trigger in Google Tag Manager, run for the categories the visitor allowed. Cookies of categories the visitor did not allow are removed. See Domain settings.
- Consent is passed on. Where enabled, CookieHub updates Google Consent Mode, writes the TCF or GPP string and signals the integrated tools. See Compliance and Integrations.
- A consent log entry is written, if the consent log is enabled for the domain: the choice, the page, the time, an anonymized IP address and the consent token that also sits in the cookie. See Consent log.
The visitor can change their choices at any time by reopening the preference center, from the CookieHub icon or a link you add to your pages; see Resurface dialog. A changed choice goes through the same steps.
In the background
- Scans. The cookie scanner crawls your website when you add the domain, to find the cookies in use and check the CookieHub setup. On paid plans it scans again on a schedule, monthly on Basic and Business and weekly on Enterprise; changes are published to the cookie declaration and a scan report is sent to the domain's users. See Cookie scans and the plans.
- Publishing. Changes you make in the Dashboard reach your website when you click Save & publish; until then, the website runs the published configuration.
Performance
Any external service integrated into a website can affect its speed. CookieHub is optimized to keep the widget's effect on your website's performance to a minimum.
Where to next
- What CookieHub is and Consent management.
- Install, then Configure to set up your first domain.
- Troubleshooting when the dialog does not appear or cookies are set before consent.
What CookieHub is
A consent management platform: what it does on your website, what is included free and what is paid, and the products around it.
Consent management and the consent dialog
What consent management means, what the consent dialog and preference center are for, and how a visitor's choices are stored and proven.