Choose whether your scripts wait for an answer by default or run at once
With the default settings, express consent holds every tagged script outside strictly-necessary until the visitor accepts its category, and implied consent runs them on page load. TermsFeed Free Cookie Consent uses express consent unless you set consent_type to "implied".
Express consent holds optional tagged scripts by default until the visitor agrees
In express mode, each optional tagged script waits until the visitor accepts its category, unless page_load_consent_levels lists that category. The consent banner offers the "I agree", "I decline", and "Change my preferences" buttons. The held scripts run the moment the visitor clicks the "I agree" button or saves a category as active in the Preferences Center. The page does not reload.
The General Data Protection Regulation (GDPR) defines consent as a "clear affirmative action" in Article 4(11), and the ePrivacy Directive requires consent before non-essential cookies are stored.
Implied consent runs every category you use on page load by default
In implied mode, every category you use runs on page load by default, and the consent banner shows the "OK" and "Change my preferences" buttons, with no "I decline" button. The "OK" button accepts every category you use and hides the consent banner. A visitor who wants to refuse opens the Preferences Center, turns categories off, and saves. Tagged scripts that already ran keep running until the next page load. A page reload after each answer stops those scripts at once. Find what Google tags receive without a reload in Reload the Page After Consent.
Implied mode writes the cookie_consent_user_consent_token cookie on the first page load, before any answer, unless demo is on. In the generator, implied consent is the option labeled "ePrivacy Directive", a label that does not match what that directive requires.
How to choose between express and implied consent
Let the location of your visitors decide the consent type, and pick express consent whenever you are unsure. Cookie Consent shows the same consent banner to every visitor. On a site set to implied consent, tagged scripts therefore run by default for a visitor from the European Union (EU) before any answer. Read which laws require a consent banner and for which cookies in Do I Need a Cookie Banner? EU, UK, and US Rules.
| Your visitors | Consent type | Tagged scripts that run before the answer |
|---|---|---|
| Any visitors from the EU, the UK, or Switzerland | Express ("express", the default) |
strictly-necessary scripts only, by default |
| No visitors from the EU, the UK, or Switzerland | Implied ("implied") |
Every category you use, by default |
| You do not know where your visitors come from | Express ("express") |
strictly-necessary scripts only, by default |
Untagged scripts run on page load in both consent types, because Cookie Consent holds only the scripts you tag.
Release some categories on page load with page_load_consent_levels
The page_load_consent_levels option lists the categories that run on page load before the visitor answers, in both consent types. Every optional category outside page_load_consent_levels waits for the answer. The switches in the Preferences Center show the categories in page_load_consent_levels as on until the visitor answers. The "I agree" button, or the "OK" button in implied mode, still accepts every category you use.
The generator writes this option into your code, so the code shows what runs before the answer. It writes ["strictly-necessary"] for express consent and all 4 categories for implied consent.
This configuration runs functionality scripts, such as a chat widget, before the answer in express mode.
cookieconsent.run({
"consent_type": "express",
"page_load_consent_levels": ["strictly-necessary", "functionality"]
});
An empty array does not run any optional category in either mode. The option applies only to visitors who have not answered; after an answer, the saved choice decides.
How to set the consent type in your code
Set consent_type to "express" or "implied" in the object you pass to cookieconsent.run(). The value ignores case, and an unknown value gives express consent. Visitors who already answered keep their answer when you change the consent type, so the change applies only to visitors who have not answered. A switch from implied to express needs page_load_consent_levels set to ["strictly-necessary"] too, or the implied-consent value of the generator, all 4 categories, keeps the optional tagged scripts running before the answer. Look up consent_type and the other options in Free Cookie Consent API Reference.
Check which tagged scripts run before the answer on your site.
- Deploy your
consent_typechange and clear any page cache. - Close every private window and open a new one.
- Open DevTools on the Network tab, filter it on the host of an optional tagged script, such as
googletagmanager.comfor a tagged Google tag, and then load your site. - Read the requests. In express mode with
page_load_consent_levelsleft out or at["strictly-necessary"], no request appears before a click on the "I agree" button. In implied mode withpage_load_consent_levelsleft out or at the generator value, the requests appear on page load. An untagged Google tag under Consent Mode loads fromgoogletagmanager.combefore the answer by design. In express mode, open the Application tab instead, and confirm that no_gacookie appears before the answer.