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. Open TermsFeed > Compliance Kits in your WordPress admin, click the "Configure" button in the Cookie Consent box, and select the "Configuration Parameters" tab.

The object takes any option of the Cookie Consent script, such as website_privacy_policy_url or cookie_duration. Find the type, the default, and the effect of every option in the Free Cookie Consent API Reference.

The default "Configuration Parameters"

A new installation holds only the keys the plugin manages, with their defaults. The website_name value is the WordPress Site Title from Settings > General, "My Website" in this example, and callbacks holds the default Callbacks as a JSON string.

{
    "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 plugin prints the Callbacks in a script of their own, so they reach the Cookie Consent script apart from the other keys. Read the readable form of the default Callbacks in Cookie Consent Callbacks in WordPress.

The 10 keys the plugin manages

The Customization tab and the Configuration Parameters tab share the managed keys, and a save on either tab updates the other. The 3 booleans have no Customization field. consent_type, notice_banner_type, palette, and language take only the lower-case values of a fixed list.

Key Customization field Accepted values
website_name "Website name" A string; any other type is ignored
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; any other type is ignored

The 3 booleans accept true, false, 1, 0, "yes", "no", "on", and "off", and the tab shows them as true and false after the save. The plugin refuses a browser language tag such as "de-DE" for language. Pick a code such as "de" from Cookie Banner Languages in Free Cookie Consent.

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"]. After a switch to express consent, the reset stops the other 3 categories from running before the visitor answers.

A change of "Compliance preference" on the Customization tab resets the list too. 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.

Keys you add to the "Configuration Parameters"

The plugin does not check the value or type of a key outside the 10 it manages, apart from the limits for users without unfiltered_html. It passes each such key to the Cookie Consent script, and the Customization tab never overwrites it. A misspelled option name or an unaccepted value then reaches the script as you wrote it. Look up every option you add, such as callbacks_force or website_privacy_policy_url, in the Free Cookie Consent API Reference.

What the "Configuration Parameters" tab shows after a save

The tab shows the whole object again after each save, with every key and value you kept and a uniform indentation. Your own spacing is replaced, while addresses such as https:// and accented text such as "Café" read as you typed them.

An empty field gets the 10 keys back, with the values of the Customization fields, on the next save or the next opening of the Customization tab. A [] or null that other code stores is rebuilt the next time the Customization tab opens. A save of the JSON from the WordPress "All Settings" screen at wp-admin/options.php reaches your WordPress website from the next page load, once your page cache is cleared. The next opening of the Customization tab then writes its own values back over the 10 keys, except a page_load_consent_levels list saved under the same consent type.

Save errors of the "Configuration Parameters"

A save that fails a check shows an error at the top of the tab. The invalid JSON message and the accepted-values message keep the previous value, and the Callbacks error saves the Callbacks but leaves them out of your WordPress website. Invalid JSON, such as a missing comma, and JSON that is not an object, such as a bare array or null, are refused whole.

Configuration Parameters must be a valid JSON object, for example {"website_name": "My website"}. Your changes were not saved.

A value outside the accepted list for consent_type, notice_banner_type, palette, or language keeps the previous value of that key and names the accepted values. The rest of the save is applied.

Configuration Parameters: "<parameter>" must be one of: <values>. The previous value was kept.

A boolean that the plugin does not read as true or false, such as "maybe", gives the same message with the values true, false. A null value does not give a message, and the plugin keeps the stored value. Callbacks that are not an object between { and } give the Callbacks error. Read the exact Callbacks error in the Callbacks confirmation and error messages, and fix each error with 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 and every vendor script on your WordPress website. The tab refuses invalid JSON, so such a value comes from other code or a database import. The "Update cookies preferences" link disappears from the footer too. Compare what the page source holds while the JSON is invalid in Cookie Banner Code on WordPress Pages.

The Preview on the Customization tab runs the default Cookie Consent options while the stored JSON is invalid. The Preview therefore shows a consent banner while your WordPress website shows none. The Customization tab shows a notice that its changes are not applied until you correct the JSON. Find this cause among the others in WordPress Cookie Banner Not Appearing.

Configuration Parameters without the unfiltered_html capability

A user without the WordPress unfiltered_html capability saves the Configuration Parameters under limits that keep code and markup from reaching your WordPress website through them. Changed Callbacks go back to the stored code, and the plugin removes the markup from a changed string. A changed value under a key that ends in _url keeps only an http or https address. The plugin checks only the values that differ from the stored ones, and saves booleans, numbers, and arrays of category IDs as usual. Find each error, and which users lack the capability, in TermsFeed AutoTerms Capabilities and Roles.

The key page_refresh_confirmation_buttons has no Customization field, so set it on the Configuration Parameters tab. The default JSON carries it as false. Replace the default line with this one to reload the page 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,

Save the change, then test it as a visitor.

  1. Click the "Save Changes" button. The value stays in place when you open or save the Customization tab.
  2. Clear your page cache, close every private window, open a new one, and load a page of your WordPress website.
  3. Click the "I agree" button and confirm that the page reloads.