Google Adsense Consent Management Platform (CMP) changes for Discourse

I got a message from Google:

Beginning January 16, 2024, Google will require all publishers serving ads to EEA and UK users to use a Google-certified Consent Management Platform (CMP). You can use any Google-certified CMP for this purpose, including Google’s own consent management solution. If you are interested in using Google’s consent management solution, start by setting up your GDPR message.`

I’ve searched the site but I can’t find any reference what needs to done in the context of discourse for complying with the Google’s certified CMP requirements to continue using discourse adplugins in the EEA/UK region.

Anyone have any thoughts on this?


Good Evening,

Can you please share your help with the new rule from Google Adsense as it pertains to Discourse? Google sent an email saying that the site must fulfill their new rule seen below. You can see their online help page to know more too.

Starting January 16, 2024, in addition to our EU user consent policy, AdSense publishers must use a Consent Management Platform (CMP) that has been certified by Google and has integrated with the IAB’s Transparency and Consent Framework (TCF) when serving ads to users in the European Economic Area (EEA) or the UK.

It appears you have not yet adopted a Google-certified CMP to collect consent from your users, which means your site(s) will stop showing AdSense ads and receiving revenue on EEA and UK traffic after January 16, 2024.

Can anyone at Discourse share an update on whether they will fulfill that requirement? As far as I know, I cannot correct this myself or configure Discourse to fulfill the needs of Google. Please let me know if anyone can share any help. I see that another user has posted a similar concern yesterday, thank you.


I’ve merged these two topics together to keep the discussion in one place. :+1:

I think we have a guide on enabling a consent management here if that’s any help?


This is very helpful to understand what cookies discourse uses. But coming back to the original topic can anyone provide guidance on what implications Google message about CMP has on discourse and/or it’s adplugin?

I took a look at the linked page Cooke Consent, GDPR, and Discourse, and I hate to say it but it seem far past my knowledge of Discourse and the features. I do not know whether I can do it.

Google sent out an email to my Adsense account and basically confronted me telling me to prove that I have complied and to attest to it. Has anyone did this? Can I hire anyone to help me to do this? Thank you.

If you do want some help, and have a budget, you can start a marketplace topic to ask for some assistance. :+1:

I have posted on the Marketplace, as you said, thank you.

You can see the email that Adsense sent below. Please refer to the paragraph where they say:

Additionally, to help you meet the new requirement and continue showing ads on your site in the EEA and UK, you will be presented with CMP adoption options the next time you sign in to your AdSense account. The options include:

  1. “I want to create a GDPR message, using Google’s CMP in AdSense. If I don’t publish one by January 16, 2024, please publish my GDPR message for me using Google’s CMP. I understand I can change my message and switch to another CMP at any time.”

Does this mean I can simply click Option 2 and Adsense will automatically make the Discourse compliant with the consent rule?

Has anyone done this? Can anyone please give any clarification?

1 Like

To update, I logged into Adsense. They immediately forced a pop-up on the screen. I clicked Option 2 and completed their form. I believe that might have fulfilled the needs of the CMP requirement. Apparently, Adsense will oversee the CMP part of it by itself. Can anyone confirm? Thank you.

1 Like

I think it sounds like that’s a viable option from reading the information in the screenshot. Could you sign up a test user and check out whether it’s working?

1 Like

I checked your site just now and don’t see an ad loading on the home page just “Advertisement” and empty space:

Sorry, I do not know why that would occur. Have you installed an ad-blocker?

I have tried loading the forum on Chrome, Firefox, and Safari while not logged in, and the ads loaded normally.

Can you please clarify your situation? Thank you.




1 Like

Looks to be firefox settings probably triggered that, ads load with chrome.

1 Like

Alright, thank you for the additional knowledge. To clarify, your ‘strict’ setting on Firefox caused that, you believe?

That was my first theory but that seems to be false, when I wrote in your site as an exception ads would still not load, as well as lowering security level to standard has also not made any change.

I don’t think there is an ad blocker running but I will investigate further.

Was a different setting blocks the ads so seems like your site is fine.

It’s beautiful.
So it’s still possible to insert ads? That’s great! I’d like to do the same in the future.

There are many topics regarding the Google Adsense and GDPR compliance/consent, but none of them is really conclusive.

The situation today is:

  • One can use the Advertising plugin with Adsense to display ads on a Discourse instance.
  • Google Adsense’s own consent manager kind of works and ads are correctly displayed.
  • The problem with Adsense CMP is that it recognizes that Discourse uses infinite scrolling and launches a floating element on the site, that enables the user to revoke or adjust the consents.
    • This is terrible in terms of UI/UX. The floating notifier is highly distracting and in some scenarios it can even overlap the UI buttons of Discourse.
    • I have reported this to Google more than once, with no response.
    • There are a lot of frustrated comments around the internet about his, noting Google’s reluctance to improve the UI/UX.
  • An elegant hack to the solution would be to hide the floating element, and in order to remain compliant with the GDPR, provide a consent revokation link somewhere else in the UI. Google provides these instructions: Link
  • Since the consent management is a mandatory requirement, this hack should/could be a feature of the Advertising plugin?
    • Hide the floating element that Adsense generates
    • Provide the consent revocation callback in a user friendly location - maybe the burger menu, or user profile menu. This does not seem like a complex coding effort, but annyoingly just beyond my skillset.
    • Has anyone doodled with the CMP floating element, with the aim to hide it? I’d love to see some code examples of what and how you have done.

If you don’t know what I am talking about, then just go to, give consent, for a minute or two scroll some topics up and down → the floating element will popup.

Ping @JammyDodger


I’ve spent a quite a bit of time studying this, and based on what I read, one could implement a custom consent revocation link and then hide the Google’s obstructive auto-generated link.

The logical place for the revocation would be a custom link in the burger menu, but here Discourse gets a bit too clever, as it is impossible to hack the JS function as a menu link.

<a href=”javascript:<mark>googlefc.callbackQueue.push(googlefc.showRevocationMessage)</mark>”>Click here to revoke your choice</a>

If that could be implemented to the menu, then the next step would be hiding the floating consent banner. So the big question to @staff is that, how to implement the revocation function, without hard coding it to the theme template, or similar.

Will need some help from a qualified script kiddie to get this done.

Edit: I believe this also impacts Google Analytics, which is supported by the Discourse core.


Does anyone know where I should add this code?