Set Cookie Consent script options that have no field on the Customization tab
The Configuration Parameters tab of the Cookie Consent kit holds the JSON object that TermsFeed AutoTerms passes to TermsFeed Free Cookie Consent 4.2.0 on every page. The plugin manages 10 keys of that object, 6 of them set by Customization fields, and passes every other key as you wrote it. The object takes any option of the Cookie Consent script, such as website_privacy_policy_url or cookie_duration. Find every option in the Free Cookie Consent API Reference.
The default "Configuration Parameters"
A new installation holds only the keys the plugin manages. The website_name value is the WordPress Site Title, "My Website" in this example.
{
"website_name": "My Website",
"notice_banner_type": "headline",
"consent_type": "express",
"palette": "light",
"language": "en",
"page_load_consent_levels": [
"strictly-necessary"
],
"notice_banner_reject_button_hide": false,
"preferences_center_close_button_hide": false,
"page_refresh_confirmation_buttons": false,
"callbacks": "{\r\n 'i_agree_button_clicked': () => {\r\n\r\n },\r\n 'scripts_specific_loaded': (level) => {\r\n switch (level) {\r\n case 'targeting':\r\n if (typeof gtag === 'function') {\r\n gtag('consent', 'update', {\r\n 'ad_storage': 'granted',\r\n 'ad_user_data': 'granted',\r\n 'ad_personalization': 'granted',\r\n 'analytics_storage': 'granted'\r\n });\r\n }\r\n break;\r\n }\r\n }\r\n }"
}
The callbacks key holds the code as a single escaped string. Edit it in the "Callbacks" field of the Customization tab with Cookie Consent Callbacks in WordPress.
The 10 keys the plugin manages
A save on either tab updates the other.
| Key | Customization field | Accepted values |
|---|---|---|
website_name |
"Website name" | A string |
notice_banner_type |
"Notice banner style" | "simple", "headline", "interstitial", "standalone" |
consent_type |
"Compliance preference" | "express", "implied" |
palette |
"Color palette" | "light", "dark" |
language |
"Default language" | 1 of the 36 lower-case codes of the "Default language" select, such as "en", "de", or "en_gb" |
page_load_consent_levels |
None | An array of category IDs that follows consent_type |
notice_banner_reject_button_hide |
None | true or false |
preferences_center_close_button_hide |
None | true or false |
page_refresh_confirmation_buttons |
None | true or false |
callbacks |
"Callbacks" | A string of JavaScript code |
Write true or false for the 3 booleans. For language, pick a code such as "de", not a browser language tag such as "de-DE", from Cookie Banner Languages in Free Cookie Consent.
How page_load_consent_levels follows consent_type
page_load_consent_levels lists the categories that run before the visitor answers, and a change of consent_type resets it, unless the same save edits the list. Express consent sets ["strictly-necessary"], and implied consent sets all 4 categories, ["strictly-necessary", "functionality", "tracking", "targeting"]. A change of "Compliance preference" on the Customization tab resets the list too, and a list you edit while consent_type stays the same is kept. Compare the 2 consent types in Express and Implied Consent in Free Cookie Consent.
Save errors of the "Configuration Parameters"
A save that fails a check shows an error at the top of the tab. Invalid JSON keeps the previous object, and a value outside the accepted list keeps the previous value of that key while the rest of the save applies. Read each message and its fix in Cookie Banner Save Errors in WordPress.
What invalid "Configuration Parameters" do to your WordPress website
Stored Configuration Parameters that are not valid JSON stop the consent banner, the "Update cookies preferences" link, and every vendor script on your WordPress website. The tab refuses invalid JSON, so such a value comes from other code, such as wp option update, or a database import. The Preview still shows a consent banner, with the default options. Find this cause among the others in WordPress Cookie Banner Not Appearing.
Reload the page after each consent banner answer
Replace the default page_refresh_confirmation_buttons line with this one, then click the "Save Changes" button. The page then reloads after a click on the "I agree", "I decline", or "Save my preferences" button. Decide whether your WordPress website needs the reload with Reload the Page After Consent.
"page_refresh_confirmation_buttons": true,