Do you want to add a cookies consent popup in WordPress?
Your WordPress site may be setting cookies on your visitors’ browsers, and the European Union’s cookie law requires websites to get user consent before setting any cookies on their computers.
In this article, we will show you how to add a cookies popup in WordPress.
Why Are Cookie Popups Necessary?
Apart from these, WordPress plugins can also set their own cookies to store different information or recognize repeat visitors.
While cookies are extremely useful, they can also be used to collect information about a user and share it with third party advertising platforms.
That’s why in Europe and few other countries, website owners are required to let users know about their usage of cookies. If your website targets audiences in those regions, then you need to show a cookie consent disclaimer.
The easiest way to do that is with a WordPress GDPR plugin. Cookie Notice and Cookiebot are two of the most popular cookie notification plugins and are compatible with many other popular WordPress plugins.
That being said, let’s take a look at how to easily display a cookie consent popup in WordPress.
- Method 1: Add a Cookie Popup with Cookie Notice
- Method 2: Add a Cookie Popup with Cookiebot
- Bonus: Improve GDPR Compliance with MonsterInsights
Method 1: Add a Cookie Popup with Cookie Notice
On activation, Cookie Notice will run a compliance check and offer you some premium services. We’ll only use the plugin to display a cookie notification, so you just need to scroll down and click the ‘Skip for now’ link.
The plugin will start to display a basic cookies popup to your visitors right away without any additional configuration. The default message is suitable for most websites.
If you’d like to customize the notification, then you need to visit the Cookies section of your dashboard and then scroll down to Notice Settings.
On this page, you can customize the popup message and button text.
You can also give your visitors the option of refusing and revoking consent.
To do that, just click on the ‘Refuse consent’ and ‘Revoke consent’ checkboxes. The default settings will work for most websites.
If you scroll down to the Notice Design section, then you can choose the position, animation, button style, and colors of your cookie consent popup.
You can also set a button class to add custom CSS for your popup.
Once you’re finished, click on the Save Changes button to store your settings.
You can now visit your website to see your cookie consent popup in action.
Method 2: Add a Cookie Popup with Cookiebot
Cookiebot is another popular WordPress GDPR plugin. While it’s not as easy to set up as Cookie Notice and won’t work unless you sign up for a free Cookiebot account, it does offer some additional customization options.
Once activated, a new Cookiebot section is added to your WordPress dashboard. You’ll need to navigate to Cookiebot » Settings in your WordPress dashboard to configure the plugin.
If you don’t already have a Cookiebot ID, then you’ll need to sign up for one using the ‘Sign up for free on cookiebot.com’ link. Once you’ve received your ID number by email, you need to paste it into the Cookiebot ID text field.
You might like to check ‘Auto-update Cookiebot’ in the Advanced settings section so the plugin stays up to date with any changes in GDPR legislation.
For testing purposes, you should also check ‘This checkbox will enable Cookiebot on front end while you’re logged in’.
If you leave it unchecked, then you won’t see the popup when you’re logged into your WordPress site.
After you’re done with the settings, don’t forget to click the ‘Save Changes’ button at the bottom.
Another setting to consider is CCPA configuration for visitors from California. You can enable this from the Cookiebot » Legislations page. All you need to do is check the box and then click the Save Changes button.
We’re not finished yet, but we’re getting close. To finish configuring Cookiebot, we now need to return to the Cookiebot website and log in.
First, you should add your website’s domain name to Cookiebot’s domain group. With the free version, only one domain is supported.
Once you click the Save button, your visitors will now see the default cookies popup when visiting your website.
Next, you’ll need to navigate to the Dialog tab from the Cookiebot website.
Here you can choose the location and appearance of the popup.
You can change these defaults to anything you like. We chose a different template, then changed position to Bottom, type to Accept/Decline, and method to Explicit Consent.
You’ll be able to see the changes by clicking the Preview button or returning to your website.
You need to start by navigating to the Content tab on Cookiebot’s website. By default, the cookie declaration uses Cookiebot’s default wording.
To see the declaration you need to save and preview the page. This is how the first few paragraphs look on our test website.
Bonus: Improve GDPR Compliance with MonsterInsights
That’s because MonsterInsights offers an EU Compliance addon that works out of the box. It will automatically change your analytics settings to help you stay in compliance with privacy laws.
MonsterInsights is a premium plugin, and EU compliance is included in the lowest plan. The best thing is that it automatically integrates with both Cookie Notice and Cookiebot.
The first step is to install the MonsterInsights plugin and connect it to your Google Analytics account. For more information, see our guide on how to install Google Analytics using MonsterInsights.
Once MonsterInsights is installed and set up, you’ll need to install and activate the EU Compliance addon.
You can do that by navigating to the Insights » Settings page in your WordPress dashboard. After that, you need to click on the Engagement tab and scroll down to EU Compliance.
Once you click on the ‘install and activate’ link you will see a list of all MonsterInsights addons. You need to find the EU Compliance addon and click on the Install button.
The addon will be automatically activated.
You can check this by returning to the MonsterInsights settings page. When you look at the EU Compliance section you will see that the addon has been turned on.
If you click the down arrow on the right side of the screen, then you can see a detailed list of the configuration changes the addon has made to your website.
We hope this article helped you add a cookie consent popup to your WordPress site.
You may also want to see our step by step guide on how to properly move your WordPress site from HTTP to HTTPS, or check out our comparison of the best business phone services for small business.