All Blog Posts

Cookie Consent Plugin for WordPress: How to Set It Up and Avoid Common Mistakes

Close
Read time
9 mins
Published
Sep 2, 2026
Share
  • A cookie consent plugin for WordPress is only effective if tracking technologies respond correctly to the choices visitors make.
  • Your consent banner should reflect both the privacy requirements that apply to your visitors and the technologies running on your site.
  • Cookie blocking needs to be tested in practice. A banner appearing correctly is not proof that non-essential tracking is being held back.
  • WordPress can introduce tracking through plugins, embeds, GTM, or old scripts, creating consent gaps that are easy to overlook.
  • Consent management is ongoing: changes to your WordPress site can introduce new cookies and trackers that need to be accounted for.

Installing a cookie consent plugin on WordPress doesn’t guarantee that your consent setup is working correctly. Your banner can appear as expected while tracking technologies still load before a visitor makes a choice.

WordPress makes these issues easy to miss. Plugins, themes, and performance tools can affect when scripts load and whether cookie blocking works as intended. A few targeted checks can help identify these issues before they undermine your consent setup.

Installing a cookie consent plugin is the easy part. The setup needs to make sure your banner reflects the right consent choices and that cookies and trackers respond to those choices as intended. On WordPress, where tracking technologies can be added in several ways, getting the configuration right from the start can prevent problems later.

Here’s how to set it up.

Start by installing and activating a cookie consent plugin from your WordPress dashboard. If you’re using Cookiebot, you’ll also need to create an account and add the domain you want to manage.

Once you add your domain, Cookiebot automatically starts scanning your site for cookies and trackers. The first scan can take up to 24 hours to complete.

The last step is to connect the WordPress plugin to the domain you added in Cookiebot. Cookiebot does this using a unique Domain Group ID, which you can find in the Implementation section of your account. Copy the ID, then return to WordPress and paste it under Cookiebot CMP > Settings > General Settings.

Next, configure how your banner works and which consent choices visitors can make. The exact setup will depend on the privacy requirements you need to comply with, such as the General Data Protection Regulation (GDPR)in the EU or the California Privacy Rights Act (CPRA). You may need different configurations for different regions.

Your cookie banner design matters, too. Options to accept or reject cookies should be clear and easy to find, without design choices that steer visitors toward one response.

If you’re using Cookiebot™, you can configure the banner’s content, appearance, consent options, and regional settings from your account. You can also enable a privacy trigger so visitors can reopen their settings and change or withdraw their consent later.

Displaying a consent banner does not automatically stop cookies and tracking scripts from loading. You also need to make sure that any non-essential scripts wait until the visitor has given the appropriate consent.

If you’re using Cookiebot, Automatic Cookie Blocking can handle this for scripts loaded directly on your WordPress site. Cookiebot uses the results of your website scan to identify cookies and trackers and blocks those that require consent until the visitor accepts the relevant category.

You can also block scripts manually. This involves assigning individual scripts to a consent category, such as Preferences, Statistics, or Marketing, so they only run when the visitor accepts that category. Manual blocking is mainly useful when a script is not handled correctly by the automatic setup or needs specific configuration.

If you use Google Tag Manager (GTM), keep in mind that Cookiebot’s automatic script blocking won’t reach tags deployed inside your GTM container. Instead, you need to make sure those tags follow the consent choices visitors make through your banner. For example, an advertising tag should not run as though consent has been granted when a visitor has rejected marketing cookies.

With Cookiebot, you can enable Google Consent Mode under Cookiebot CMP > Settings in WordPress. Then import the official Cookiebot CMP tag from the GTM Community Template Gallery into your container.

Google Consent Mode sends consent signals to supported Google services, such as Google Analytics and Google Ads, allowing them to adjust how they operate based on the visitor’s choices.

After configuring your setup, use GTM Preview Mode to check that your tags respond correctly.

Once your WordPress cookie consent plugin is configured, check the setup from a visitor’s perspective. A banner appearing on the page is a good start, but it doesn’t tell you whether the right technologies have been identified or whether consent choices are working across your site.

Here are five checks to make once your plugin is configured:

Test your banner in a fresh browser session

Open your site in an incognito window or clear your existing cookies so previous consent choices don’t affect the test. Check that visitors can accept, reject, or manage cookie categories, then confirm they can reopen their settings to change or withdraw consent.

Check the scan results for unclassified cookies or trackers that haven’t been assigned to the right category. These may need to be reviewed or configured manually before your setup is complete.

Before making a consent choice, check which cookies and trackers are already active. Non-essential technologies that require prior consent should wait until the visitor has made a choice. Then test both rejection and acceptance to confirm that trackers respond correctly. If needed, you can use your browser’s developer tools to inspect cookies and network requests to see what’s loading in the background.

Check more than your homepage

Visit different page types and pay particular attention to pages that use third-party features, such as video embeds, forms, maps, or advertising. A tracker that isn’t present on your homepage may still be active elsewhere on your site.

Recheck your setup when your site changes

New WordPress plugins and third-party integrations can introduce cookies and trackers that weren’t part of your original setup. Repeat these checks after making significant changes to your site.

Even a correctly configured cookie consent plugin can run into problems elsewhere in your WordPress setup. If your checks uncover cookies firing too early, content loading when it shouldn’t, or scripts that don’t respond to consent, the cause may sit outside the plugin itself.

Here are some common problems to check.

Your Changes Aren’t Showing on the Live Site

A consent setting has been changed, but the live site still behaves exactly as it did before. In many cases, the browser is simply receiving an older cached version of the page.

Start by clearing the cache in the WordPress caching plugin. If the site uses a CDN such as Cloudflare, clear its cache as well. Then open the site in a private or incognito window and repeat the consent test.

If the problem remains, check whether a performance plugin is delaying or optimizing JavaScript. Temporarily turn off that feature and test the consent banner again.

If consent works normally with the optimization disabled, the performance setting is interfering with the consent script. Check the performance plugin for an option to exclude the consent script from JavaScript delay or optimization.

Google Tag Manager may be responsible when an analytics or advertising tag starts before the visitor has accepted the consent category it requires. This is because Cookiebot’s automatic script blocking does not control tags that are loaded from inside the GTM container. Consent therefore also needs to be configured correctly in GTM.

To do this, open GTM Preview Mode, connect it to the website, and load the site without accepting or rejecting the cookie banner. Preview Mode will show which tags ran when the page loaded. Look specifically for analytics or advertising tags that should require consent. For example, if a Google Ads tag appears as fired before advertising consent has been granted, that tag is running too early.

Open that tag in GTM and check its consent requirements and the trigger that causes it to fire. The goal is for GTM to hold the tag until the required consent has been granted.

Videos, maps, and other third-party embedded tools can create a different problem. The content may begin loading as soon as the page opens, before the required consent has been given.

This is usually easy to check from the page itself. Open a page containing the video or map in a private browser window. Do not make a choice on the consent banner. If the video player or map loads immediately when it should be blocked, check how that embed was added to WordPress. It may come from a page builder block, an embed plugin, or code pasted directly into the page.

That embed needs to be included in the consent solution’s blocking setup. For example, the YouTube embed should remain blocked until the consent category assigned to YouTube has been accepted.

After making the change, reload the page in another fresh session. The content should be unavailable before consent and load normally after the relevant category is accepted.

A WordPress Plugin Is Loading Its Own Tracker

Some WordPress plugins add tracking scripts automatically. This can happen even when the main analytics and advertising tags have already been configured through GTM.

A cookie scan can provide the first clue. For example, it may report a cookie or tracking service that does not appear anywhere in the GTM setup.

Search the WordPress Plugins screen for a plugin connected to that service. If the scan finds tracking from a chat service, for example, check whether the site has a plugin installed for that chat tool. Then, open the plugin’s settings and look for cookie, privacy, or consent options. Some plugins can be connected directly to the existing consent solution so their tracking does not start until permission has been given.

If the plugin has no consent controls, check the plugin documentation for a supported consent integration. Otherwise, a different method may be needed to prevent its tracking script from loading too early.

Old or Duplicate Tracking Scripts Are Still Running

Sometimes a tracker continues to appear even after its GTM tag has been removed or the WordPress plugin that added it has been uninstalled. That usually means another copy of the tracking code is still present elsewhere on the site.

The tracking ID is often the easiest way to find it. For Google Analytics, for example, this may be an ID beginning with G-. Search for that ID in places where custom tracking code may have been added, such as the theme settings or a plugin used to insert header and footer scripts.

Then, remove the old implementation once it has been found, clear the site cache, and repeat the test.

This also prevents another common problem: the same tracker running twice and recording duplicate data.

A tracker may be successfully blocked when the page first opens but still fail to start after the visitor gives permission.

First, confirm which consent category the tracker requires. An advertising tag, for example, should not be waiting for a different category by mistake. For a tag managed through Google Tag Manager, open GTM Preview Mode and load the site without giving consent. Confirm that the tag has not fired. Then accept the required category and check Preview Mode again.

If the tag remains inactive after consent has been granted, open the tag in GTM and inspect its trigger. A tag configured to run only when the page first loads may miss a consent change that happens several seconds later.

The trigger then needs to allow the tag to run when the required consent becomes available, rather than only during the initial page load.

WordPress makes it easy to add new functionality, but every new plugin, embed, or tracking tool can change what happens behind your consent banner. That’s why a strong consent setup depends on more than getting the initial configuration right.

Cookiebot gives you the tools to manage that complexity in one place. Automated scanning helps uncover the technologies running across your site, while consent controls and integrations help ensure they respond to visitor choices as intended. It’s a more reliable way to manage WordPress consent without having to rebuild your process every time your site changes.

Frequently asked questions

No. WordPress does not include a built-in cookie consent banner. If your site uses cookies or trackers that require consent, you’ll need to add a consent management solution, such as a WordPress cookie consent plugin.

The simplest option is to install a cookie consent plugin from your WordPress dashboard. You can then configure your banner, consent choices, and cookie blocking based on the privacy requirements that apply to your visitors.

Go to Plugins > Add New in your WordPress dashboard, search for your chosen cookie consent plugin, then install and activate it. Depending on the plugin, you may also need to connect an account or add your website before configuring your consent settings.

After installing your consent plugin, configure which choices appear on the banner and how cookies and trackers should respond to them. You should then test the banner and cookie blocking in a fresh browser session to make sure your setup works as intended.

Common causes include caching or JavaScript optimization, incorrectly configured Google Tag Manager tags, third-party embeds, plugin conflicts, and tracking scripts added directly to your theme or site. Clear your cache first, then check which scripts load before consent to narrow down the cause.