Turn on the Cookie Consent kit in TermsFeed AutoTerms and add each tracking script as a vendor script, so that under the default GDPR preference it waits for consent. The kit loads TermsFeed Free Cookie Consent 4.2.0 from www.termsfeed.com on your WordPress website, and the Cookie Consent script releases each vendor script when its category is allowed to run. Setup takes 6 steps and about 15 minutes.

Sign in before you start as an Administrator who holds the WordPress unfiltered_html capability, or as a user with a plugin role and that capability. The kit screens need the right to save settings, and the code fields need unfiltered_html. Copy the tracking code of each tool you use, such as the Google tag of Google Analytics 4. Then remove that code from your WordPress theme and from other plugins, because the kit holds back only the scripts in its own list. Read who holds unfiltered_html on your WordPress website in TermsFeed AutoTerms Capabilities and Roles.

Open TermsFeed > Compliance Kits in your WordPress admin and click the "Configure" button in the Cookie Consent box. The box reads "Get explicit user consent before placing cookies on user devices." and shows the status "Disabled" after install. The "Configure" button opens the "Customization" tab, the first of 3 tabs, followed by "Vendor Scripts" and "Configuration Parameters".

The Cookie Consent box on the Compliance Kits screen with the status Disabled and the Enable and Configure buttons marked

Tick "Enabled" at the top of the Customization tab, or click the "Enable" button in the Cookie Consent box on the Compliance Kits screen. The "Enable" button acts at once and shows the notice "Cookie Consent enabled.", while the checkbox takes effect when you click the "Save Changes" button. The consent banner appears on every page of your WordPress website as soon as the kit is on and your page cache is cleared. Logged-in users see the consent banner too, because the kit has no setting to hide it from them.

Step 3: Check the Compliance preference

Keep "Compliance preference" on "GDPR Directive (i.e. I Agree & I Decline buttons)", the default, for any site with visitors from the EU, the UK, or Switzerland. This setting is express consent: with the default page_load_consent_levels, only strictly-necessary vendor scripts run before the visitor accepts a category. The other choice, "ePrivacy Directive (i.e. OK button)", is implied consent and by default runs the vendor scripts of all 4 categories on every page load until the visitor turns a category off.

Fill in the fields below the Compliance preference on the Customization tab, then click the "Save Changes" button. Each field has a default that works, so change only what your WordPress website needs.

  • "Website name" holds the WordPress Site Title from Settings > General by default.
  • "Notice banner style" sets the layout, "Headline" by default. Compare the layouts in Cookie Banner Layouts in Free Cookie Consent.
  • "Color palette" sets "Light", the default, or "Dark".
  • "Default language" sets 1 of 36 languages, English by default, for the consent banner and the Preferences Center on every page.
  • "Insert link for users to open Preferences Center" stays ticked to print an "Update cookies preferences" link at the end of every page. Untick it only after you add your own link with the id open_preferences_center.

The Preview on the right of the tab redraws the consent banner as you change the name, style, palette, and language. Look up every value and default in Customize the WordPress Cookie Banner.

The Customization tab of the Cookie Consent kit with the Compliance preference marked, the name, style, palette, and language fields, and the Preview of the consent banner

Step 5: Add each tracking script as a vendor script

Add every script that sets cookies or tracks visitors to the kit, with the category it waits for.

  1. Open the "Vendor Scripts" tab.
  2. Type a Name, choose a Type, and paste the vendor code into the "Script" field.
  3. Click the "Add vendor script" button.
  4. Click the "Save Changes" button, because the plugin stores the list only when you save.

Google Analytics 4 takes the Type "Tracking and Performance (i.e. Google Analytics)", which is the tracking category, and an advertising pixel takes "Targeting and Advertising (i.e. Google AdSense, Google AdWords)". Follow every rule for pasted code, the warnings, and the order of the list in Block WordPress Scripts Until Consent.

The checks assume the default GDPR preference with page_load_consent_levels at ["strictly-necessary"].

The Preview on the Customization tab shows only the look of the consent banner. It runs in demo mode, draws the consent banner on every reload, and does not keep an answer. Clear your page cache after every change to the kit, with the steps in WordPress Caching Plugins.

Confirm on your live WordPress website that the vendor request waits for the "I agree" button.

  1. Close every private window, open a new one, open Chrome DevTools, select the Network tab, and type cookie-consent.js in the filter box. Load any page and confirm a request to www.termsfeed.com with status 200 and the consent banner on screen.
  2. Change the filter to the host a vendor script loads from, such as googletagmanager.com for Google Analytics 4. With the GDPR preference, confirm that no request appears before you answer, unless the vendor script is "Strictly Necessary".
  3. Click the "I agree" button and confirm that the vendor request appears with status 200. For Google Analytics 4, then change the filter to collect and confirm a collect request with status 204.
  4. Select the Application tab, open Cookies and your domain, and type cookie_consent in the filter box. Confirm the consent cookies that the Cookie Consent script writes, and read what each one holds in Consent Cookie Storage and Duration in Free Cookie Consent.

Test the "I decline" button in a new window too, because a saved answer hides the consent banner on reload. Close every private window, open a new one, open Chrome DevTools on the Network tab filtered on the vendor host, and load the page. Click the "I decline" button and confirm that no vendor request appears. Find the cause of a consent banner that never shows in WordPress Cookie Banner Not Appearing.