I Implemented a Consent-Management Platform on WordPress—Here’s How

I Implemented a Consent-Management System on WordPress—Here’s How

Cookie banners. They are everywhere. They come in all shapes and sizes. And I seriously dislike them. Like I hate it when I go to a website only to be greeted with 50 million banners.

This is how I look trying to close all of them.

Trying to fight 50 million banners on a website

And then there are those weird banners where I can’t just reject the cookies and move on. I have to click on another button only to choose which cookies I like, and then I can save the choice I made.

But apparently you need a cookie banner on your website in order to be compliant. So here I am, sharing my journey of realizing that I need a consent management platform and then implementing it on my WordPress website, taking a lot of help from ChatGPT.

A consent‑management platform (CMP) pops up the cookie banner, logs each visitor’s choice, and tells your tags whether to drop full cookies, nothing at all, or a cookieless “ping”.

If you get EU traffic—or simply want GA4 to show an Excellent Consent Signal Rating instead of Good—you need a CMP even when you’re not running ads.

I realized I need to have a consent mode on my website when I came across a news article from Search Engine Land about Consent Signal Ratings.

I was browsing the web and I found myself looking at the recent articles that Search Engine Land had posted that day. In that list, there was an article titled “New in Google Analytics: Consent Signal Ratings”. I got curious and took a look.

Anu Adegbola, the article’s author, shared that GA4 gives a consent signal rating as Excellent, Good, Needs Attention, and Urgent. The news Anu shared was mainly geared towards the PPC crowd. But as an SEO, I got curious.

I went to the Consent Settings in GA4 (Admin > Property Settings > Data Collection & modification > Consent Settings) to see what the score is for my website (this one).

As it turns out, my score was Good.

Consent Signal Rating as Good in GA4

So I clicked on “Set up consent mode”, and it gave me a couple of options. I can either check if my website is using a third-party consent management platform or I can test my consent signals.

Set up consent mode in GA4

I clicked on “Check website,” and it then asked me what type of consent banner do you have. There were three choices.

  1. I use a consent banner from a third-party platform
  2. I use a custom consent banner, and
  3. I don’t have a consent banner

I clicked on the third option and it then prompted me to set up a third-party banner.

GA4 set up a third party banner

When I clicked on the “Select your platform”, it gave me a big list of names. But I didn’t know which one to go with. So now I am sitting here confused about what to do.

I asked a bunch of people and my friends about which platform to go with, and I ended up going with Clickio. I found out that they have a generous free tier, which is what I was looking for.

In my quest for finding a good consent platform, I asked my industry friends and the awesome folks at Women in Tech SEO. One of my friend suggested a famous CMP platform, but their free plan wasn’t very generous.

I also asked my friends if I really need a consent management platform. I don’t serve ads, nor do I collect any data. I just have some simple analytics (at the time of writing, I have GA4 and PostHog installed). And they said that it’s necessary, especially for the EU region. So now one thing was clear: I need to have a consent management system in place regardless of any data I collect.

I found a bunch of Google certified Consent mode partners when I clicked on the “View Comparison” link in the GA4 settings.

View Comparison in Set up consent mode settings in GA4

I filtered through the list and found the ones that have a generous free trial. After a bunch of poking around, I found Clickio. Their free plan supports up to 3 sites and up to 50k monthly pageviews. (Note that this is not sponsored and I didn’t receive any kind of compensation for this. I just genuinely found them helpful.

So I signed up on Clickio.

Related Read:

The installation

I did all the customization in the Clickio platform, such as setting up the cookie banner, the design settings, and also implemented the code on the website.

The signing up and customizing the cookie banner was the easy part. I just had to choose the kind of GDPR consent, which for me, was the non-TCF mode because I don’t serve ads on my site. I also added the privacy policy URL.

Choose GDPR Consent Dialog Type in Clickio

Then I configured the design settings, which were mainly choosing colors for different parts, like text, background, and more.

Then there was the code implementation part. They provided two different ways of implementing the consent mode, either by adding the code yourself or using Google Tag Manager (GTM).

I thought of doing the first way, which was implementing the on-page code. Since I have a WordPress website, I already have a plugin that I use for adding any code to the head section. (If you’re wondering, the plugin is called Header Footer Code Manager or HFCM- again, not sponsored)

So I copied the code and pasted it into the new snippet I created in the WordPress dashboard. I waited for a few minutes and saw that Clickio is showing the implementation status as active.

At this point, I was debugging this through the Realtime reports in GA4 to see how it is going. So whenever I was going to my website in incognito mode using a VPN (for a European location), I was seeing the live activity, and there were no signs of consent mode firing. So I felt like there was something wrong with the implementation. I asked ChatGPT about this and it confirmed my theory (ironically, it agrees with everything).

So I thought of deleting this snippet and instead implementing it through GTM. I went on to implement it, but long story short, I couldn’t do it because I don’t have the GTM installed on my website. I removed it a long time ago. So this option was gone.

The main problem here was that the GA4 script was firing before the consent management script, and hence GA4 couldn’t see who didn’t give consent. I fixed it by changing a few settings and downloading a couple of plugins on the site.

I asked ChatGPT what is wrong with the implementation. And it said that the consent management is not firing before GA4, which is causing the problems. After going a bit back and forth, it told me to turn on the consent mode in the Site Kit plugin. (For context, I have installed GA4 on my site through the site kit plugin.)

I went to the Site Kit Admin settings and turned the toggle for consent mode.

Enabling the consent mode in Site Kit settings

When I turned it on, it asked me to download the WP Consent API plugin, and I installed it. And yet there was no sign of this whole thing working.

After talking a bit more, I found that the best way to configure the consent management is to have a plugin by Clickio themselves. So I removed all the code I had added through the header and footer plugin, and I installed the Clickio Consent plugin.

It asked me for the Site ID, which I got through the Clickio dashboard, and it had all the default stuff already selected. So I went ahead and saved the changes.

I think this is it. Now it should be working. Time to test.

Testing the implementation

According to what I learned, the GCS should return the value of G100 when we don’t accept or deny the cookie banner. Similarly, it should return the value G111 after we accept the banner, which means GA4 is tracking data with consent.

I asked ChatGPT about the ways by which I can verify the implementation. It gave me a few ideas like verifying it through GTM, but it’s too complex for me.

In the end, it told me to verify it through the Network tab in Chrome DevTools.

So I opened the website in incognito and opened the Chrome DevTools and without giving any consent, I searched for “collect” in the Network tab. From the small window that opened, I went to the Payload tab and saw that the GCS value is G100.

g100 value in the network tab

I confirmed with ChatGPT, and it seems like I am on the right track. It then told me to accept the banner and check the value again. I did that, and the value was G111. This means that the consent management platform is working and the consent is being managed properly.

G111 value for the consent mode in the network tab

And here’s the cool thing. I can log into Clickio and see the event report. It shows me how many people consent and how many reject the popup.

Event Report GDPR in Clickio

So this was it. I have successfully installed a consent management platform on this website (even though I don’t like it lol).

And now that it’s done, I checked again in GA4 Consent settings after a few days, and now the value is shown as Excellent instead of Good.

The after image of GA4 showing that the consent mode is active on the site

Final Words

I realized that I needed to have consent mode on my website after I came across an article that talked about consent signal rating in GA4. I then found a platform that supported the most pageviews in a month and installed it. I then realized that there is something wrong in the implementation, and I ended up fixing it. And I now have a cookie banner thing on my website.

I hope that you have learnt something new from this article, and I hope that it might have nudged you to check your consent signal ratings in GA4. If you have any questions or anything, feel free to contact me.

A tiny disclaimer: This walkthrough is based on my own implementation; your legal or technical requirements may differ. Also, I am not endorsing any of the tools I have mentioned here. I just like and use them often.