Skip to content

Getting rid of the Google cookie consent popup

Internet

If you clear your browser cookies regularly (as you should do), Google will annoy you with a full screen cookie consent overlay these days. And - of course - there is no "no tracking consent, technically required cookies only" button. You may log in to Google to set your preference. Yeah, I'm sure this is totally following the intent of the EU Directive 2009/136/EC (the "cookie law").

Google cookie consent pop-up

Unfortunately none of the big "anti-annoyances" filter lists seem to have picked that one up yet but the friendly folks from the Computerbase Forum [German] to the rescue. User "Sepp Depp" has created the base of the following filter set that WFM (updated by "mru62" since):

Add this to your uBlock Origin "My filters" tab:

! Google - remove cookie-consent-popup and restore scroll functionality
! Updated 26.12.2022
google.*###lb
google.*##html:style(overflow: visible !important;)

! And for Youtube
! Updated 26.12.2022
www.youtube.com##.opened
www.youtube.com###dialog
www.youtube.com##.no-transition.yt-upsell-dialog-renderer.style-scope

Trackbacks

newshimalaya.com on : PingBack

Unfortunately, the contents of this trackback can not be displayed.

jellyent.com on : PingBack

Unfortunately, the contents of this trackback can not be displayed.

Comments

Display comments as Linear | Threaded

Paul D Shaffer on :

"If you clear your browser cookies regularly (as you should do)," How regularly, and why? Maybe it's to practice remembering passwords?

Daniel Lange on :

The easiest way is to tell Mozilla Firefox or Google Chromium to delete all cookies on browser exit. There are settings for that a bit hidden in the "Advanced settings" section.

On common mobile browsers you need to clear the cookies manually every now and then.

The rationale is that

  • you are automatically logged out of any web application you are using. That way your cookie jar cannot be used to impersonate you, e.g. when your laptop is finding a new - eh - owner.
  • you make tracking yourself online harder for advertisers
  • you limit tracking by Google, Facebook, Amazon etc. to when you are actively using their services (i.e. limit tracking on third-party websites that you happen to have used before or after using a Facebook service)

There are - of course - other ways to track you ("browser fingerprinting" is the technical term) but those are much harder to do than just collecting cookies and related website pings. You can check your browser at https://panopticlick.eff.org/ made by the Electronic Frontier Foundation (EFF).

Peter Smith on :

Thanks!

Maybe it should be clarified that this goes to "My filters", not "My rules", since "Add this to your uBlock Origin filter rules" is ambiguous.

Daniel Lange on :

Thanks! I changed 'filter rules' to '"My filters" tab' as per your suggestion.

Fazal Majid on :

I have Vivaldi configured to block cookies by default and I only whitelist domains for cookies on an absolutely needed basis (most annoying popups can be dealt with by disabling JavaScript for the website in uBlock). Needless to say, Google anything is banned. Despite this, I don't get the annoying popup. I suspect it may be because my browser also sends DNT: 1

Daniel Lange on :

Even with the do-not-track header, I get the Google popup. I think blocking Javascript may be what helps you not get that annoying popup.

Daniel Lange on :

I think if we would get legislation that setting the DNT header means "technical cookies only, no consent form to ask for more outside your website account settings section" this thing would have a second life. And a first useful one. Aah, well, dreaming...

Jonathan on :

I leave those cookie warnings to remind me to update my browser’s default search engine away from google.

AnnoyedByConsentPrompts on :

Thanks for sharing! Couldn't get it properly working myself.

Safari User on :

Anyone have a solution for a Safari (12.1.2) user? Would really appreciate it!! Can't seem to download uBlock Origin :-(

Any other alternative userscript manager that Safari users could use to block this annoying "Before you continue" cookies popup?

Safari User on :

Anyone?? Any recommendations for a Safari user?

Daniel Lange on :

  1. Don't be annoying, this is not a support forum.
  2. Use Firefox or Chromium until Safari learns to block this mess.

Paul on :

I don't think the op was being annoying, they were just looking for a response.

Also there's a specific extension everyone can use for chrome and Firefox to successfully block this pop-up, and it works better than adding a filter, which may not even work/be coded correctly, in uBlock Origin.

Peace

xChris on :

Cheers mate!!!!! epic

Frank on :

Unfortunately this doesn't seem to work on youtube. With the filters the search field is inaccessible.

Daniel Lange on :

Can't confirm that. Typing in "test" leads me to a YT login nag screen (which I can deny) and then redirects to https://www.youtube.com/results?search_query=test which works.

Ford Prefect on :

Linux, Vivaldi, uMatrix, uBlock Origin

Unfortunately this DOES NOT work for neither google.* sites nor youtube.*.

DNT is enabled in browser; tracker and ads also set to be blocked within browser (not using services making use of google). I don't log into Alphabet services and whenever possible don't even allow ANY of their cookies + I sanitize my cache et al by wiping it clean if I had had to allow one of their cookies.

YT is the only Alphabet product that I'd like to be able to continue to use, they can keep all the rest, but this pop up expletive might actually have the potential to also say "no, thanks" to YT.

Phillip Morris on :

I'm using these filters on youtube:

www.youtube.com###dialog
www.youtube.com##ytd-popup-container.ytd-app.style-scope

And these other filters on google (less restrictive as the OP but doing the same):

www.google.com###lb
www.google.com##:root:style(overflow-y: visible !important;)

YT Block is good too on :

Plus one to this. Could you add it you your article Daniel.

Thank you and Just (for YT)

Jims Beam on :

Hi and thanks for the snippet!

however, when I copy paste that snippet to "my rules" in uBO, and click "save", the entry disappears from "temporary rules" and I cant click "commit" to permanently have them added to my rules. What is going wrong here? Thanks for any advice!

Daniel Lange on :

It needs to go into the "Filters" not the "Rules" tab.

Jonathan on :

This post keeps getting bumped up the Planet Debian feed aggregator list, perhaps as you keep editing it? If you could fix your feed to preserve the original publication date that’d be great. Thanks!

Daniel Lange on :

Serendipity keeps the publication date but it records when the post was last updated and planet.debian.org seems to bump on the "updated" date.

   published: 2020-09-18T09:15:00Z
   updated: 2020-09-24T11:01:42Z

are the dates that the Atom feed currently publishes. Apparently Planet Debian sorts by the update dates.

With Guillem's help (thanks!) Serendipity seems to update the "updated" field when people add a new comment.

So I'll ask upstream to change that, doesn't seem sensible.
Reported upstream at https://board.s9y.org/viewtopic.php?f=3&t=24917 .

Otherwise I can try to feed Debian Planet the RSS feed that only contains the "pubDate" item.

Rafael on :

Working perfect on FF, thank you.

Nameless on :

Does this custom rule deny consent also or does it only make the consent controls disappear?

Daniel Lange on :

There is no option to deny the consent, you can "agree" or use technical means to "ignore" the request.
Or in other words, it is not a question that is asked to give you an equally valid choice of answers.

https://arxiv.org/pdf/2001.02479.pdf is a nice scientific study that shows (in their sample) only 25% of sites make "reject all" as easy as "accept all" and only 11.8% are compliant with all top three regulation requirements (No Optional Boxes Preticked, Reject All as Easy as Accept All, Consent is Explicit). Google is just one of many companies abusing the EU GDPR regulation to their advantage.

Nameless on :

Thank you for the reply & link. Either way I thank you for this filter, we shouldn't have to accept 3rd party cookies to remember our selection of denying 3rd party cookies. Their opt-out browser plugin is also a joke.

Vatman on :

I agree, I think they should look at the DNT request : if DNT is requested, do not ask the user to consent, he doesn't want to be tracked at all.

Oh and thank you Mister Lange ! Works perfectly, maybe someone could request to add this in EasyList cookie or "I don't care about cookies" list ?

Dr Whom on :

Thanks for the script!

Re: accept/deny, I simply empty cookies/data as soon as I hit google: ⇧⎇⌫ on mac.

'Not' that I trust Firefox so much since they removed the granular cookie view.

I'm not techy, so apologies if this is a junk post. ,-)

Hex on :

Thank you very much, Daniel.

manul on :

Thank you very much.

Benton on :

For the few times i must use Google I want to say:

THANK YOU!

Helping your fellow man getting rid of that utterly annoying popup is good karma for you. Think I love you in a platonic way.

And it work on youtube too.

Daniel Lange on :

Hahaha, that is an awesome comment, thanks!

I'm sure this workaround will break some day. I'm quite surprised it still works after more than half a year. Google is probably focusing their devs attention elsewhere. Let's hope they continue to ignore us a bit longer.

Daniel on :

And they broke your fix.

Daniel on :

www.google.com##.jw8mI
www.google.com##.vUd4jb

Add this two to fix it again as google repaired it.

Delta on :

Thanks for the update to this

For the main section changing google.com to google.* seems to make it universal e.g. works for google.co.uk. Before I copied google.com lines and changed copies to google.co.uk

However for Youtube it does not bypass the pop-up overlay Before you continue Likewise for maps

Once past the pop-up this does stop the Sign-in to Youtube

Jim on :

I've got NoScript and AdblockPlus any way I can implement this filtering out of the stupid popups using those? I'm not sure if I could install ublock in my browser (firefox) without out it fighting with NoScript and I really like Noscript.

Vincent Vega on :

Thanks. There is only one downside: I'm unable to read any comments on youtube videos anymore. Maybe someone has a solution?

Dr. Zhivago on :

Thanks! Works like a charm. Also YT comments do work.

KnOwlEdge on :

Hi, unfortunately it does not seem to work anymore? Is it because now it's not anymore a popup but a redirect to another page? Or are my many addons nullifying each other? Does it still work for you?

Anyway I have found two addons which work: 1) Consent Blocker: it's not clear to me if while bypassing the redirect it's allowing or rejecting the search customization, youtube history and AD personalisation options. 2) Laboratory (by Firefox). This one was created for a different purpose but I have found it by searching for "consent" and so I gave it a go and it works. The first time you are redirected to the google consent page you start recording with Laboratory, and from that moment you have no more redirect. There too, no idea if it's allowing or rejecting the options, and what else it's doing, but at least it's by Firefox. Should be safe?

Btw Daniel, I find it really ironic that to comment on your blog I had to disable ALL security addons and as your site blocked me I had to use a freaking VPN to get back in. Just saying...

KnOwlEdge on :

Ok, comments will only be published after moderation, so I can do this test to see which of my addons made your website think I am the devil. Do not publish this, it's just a test, I will write you an email to let you know which addon was the culprit. Attempt 1, Ublock Origin

KnOwlEdge on :

Ok, Ublock was not the problem. I disable that now and use Adguard. Once again, do not post this comment.

KnOwlEdge on :

Adguard was also not the culprit. Trying with Ghostery now.

KnOwlEdge on :

Gosthery is ok, I try ClearURLs now.

KnOwlEdge on :

ClearURLs is also ok, Jesus Christ, wtf? Trying LocalCDN now.

KnOwlEdge on :

LocalCDN also ok, the only one left is Trace. Let's see.

KnOwlEdge on :

can't reproduce it. I do a last try with all addons active at once.

KnOwlEdge on :

Ok, well, it's working now. My only guess now is that I had written the security code wrong twice in a row and your website freaked out and blocked me. Indeed my IP had been blocked for a while. Now it's free again. Whatever. Cheers.

meeee on :

Anything like that for Adguard? This is truly annoying and would love to get rid of it!

Michael Damian on :

Hi Daniel,

Mozilla does not deliver until you update to its recent version i.e bloated, homephoning spyware. It blocked, disabled and removed older version on purpose.

If an "ignorant" disobidient, who dooes not want to move beyond FF59, tries to install the xpi v1.13.10, Mozilla takes the mickey of him with the "appears to be corrupt"-bshyte.

If this addon is not independent enough to deviate Mozilla's cattle prod, it is not worth it.

You may know that the Adblock's [Block element] works similar, you loose the scroll funktion though and end up to scroll down through the arrow up/down buttons.

Tried to include your above list into adblock filters instead, but it does not work at all.

So, suggestion how to alter for use in adblock filters will be utmost appriciated.

Regards Michael

Janne Granström on :

Hi,

For at least now, Youtube dosnt play videos with those youtube lines added to ublock.

perhaps there is a fix for it?

Delta on :

Hello Daniel,

I am aware Google are tinkering with Chrome to stop ad blocking extensions working.

I use Firefox not Chrome as my primary browser. Now find that with Google Search after typing into the box the text to search when pressing the Enter/Return key instead of the text being submitted a new line is created with no (obvious) way of submitting the text.

For Youtube all videos now refuse to play.

Can you revise your scripts again or have Google finally blocked all bypassing of cookie consent?

Add Comment

Markdown format allowed
Standard emoticons like :-) and ;-) are converted to images.
E-Mail addresses will not be displayed and will only be used for E-Mail notifications.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA

Form options

Submitted comments will be subject to moderation before being displayed.