Get started
How CookieTrue works
The few ideas behind the banner: one script, the rules of each visitor's country, blocking until consent and proof of every choice.
CookieTrue has two parts: a small script that runs on your website, and a dashboard where you manage it. This page explains what the script does between a visitor arriving and a tracker loading.
#One script, loaded first
You add a single line to your website. It loads the CookieTrue banner script, about 16 KB compressed, from a CDN. It must be the first script on the page, because it can only hold back what comes after it.
The banner draws itself inside a Shadow DOM, an isolated layer. Your theme's CSS cannot restyle it and it cannot restyle your theme.
#Where is the visitor?
When a visitor arrives, CookieTrue finds out which country (and, in the USA and Canada, which state or province) they are in. This uses the visitor's connection, not their browser's location permission, so there is no pop-up asking for location. The result is kept for the visit.
If the location cannot be determined, CookieTrue applies the strictest model, consent first. Nobody is shown a weaker banner by accident.
#Which rule applies?
CookieTrue keeps a table of privacy laws. For each country or state it knows which model applies:
- Consent first (opt-in). Nothing optional runs until the visitor agrees. This is the model of the GDPR and many similar laws, with a Reject button as visible as Accept.
- Opt-out. Optional cookies run until the visitor says no, and a "Do Not Sell or Share" link must be offered. This is how most US state laws work.
- Notice only. Visitors are informed, nothing is blocked.
You can change the rule for any region. See Regions.
#What waits for consent?
In a consent-first region, CookieTrue holds back scripts, frames and images from advertising, analytics and other optional services until the visitor allows their category. It recognises 50+ services by address, such as Google Analytics, Meta Pixel, Hotjar, TikTok and YouTube. For anything it does not know yet you can add your own rule. See Blocking.
At the same time it tells Google, Microsoft and a few others what the visitor chose, so their tags behave correctly. See Google Consent Mode.
#What is stored?
When the visitor decides, CookieTrue stores the choice in a small first-party cookie so they are not asked again until it expires. It also records the choice on its servers as proof: a random consent ID, the time, the choice, the region and a shortened, hashed IP address. See Consent log.
#What keeps it current?
- Scans. CookieTrue visits your website regularly, lists the cookies and trackers it finds and describes them. See The scanner.
- Re-asking. When a scan finds a new tracking service, visitors are asked again.
- Law changes. The rule table is maintained by us. You do not have to update anything.