Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat]: Browser cookie popup blocker addon - how to bypass? #631

Closed
bennetsadyba opened this issue Feb 1, 2024 · 2 comments
Closed

[Feat]: Browser cookie popup blocker addon - how to bypass? #631

bennetsadyba opened this issue Feb 1, 2024 · 2 comments
Labels
wontfix This will not be worked on

Comments

@bennetsadyba
Copy link

Description

I'm using a cookie blocking browser addon that's supposed to block annoying cookie popups. It does the job fine. The way it works is that the cookie popup never gets displayed to the user. In that case the user has no opportunity to click ACCEPT button and the website and the analytic / marketing tags never fire.

This is a problem. Do you know how to prevent such addon behavior? How does such addon work / detect cookie popups?

Proposed solution

Detect addon

Additional details

No response

@bennetsadyba bennetsadyba added enhancement New feature or request triage yet to be reviewed labels Feb 1, 2024
@orestbida
Copy link
Owner

These extensions typically hide cookie banners by injecting high priority, inline css, something like this:

#cc-main {
    display: none!Important;
} 

or by blocking the stylesheet/script itself.

You could fix this temporarily, by rebuilding the plugin with a different id, but someone would eventually add that too to the blocking list. You could also try adding an even higher level inline css rule:

html > body > #cc-main,
html > body > #cc-main .cm,
html > body > #cc-main .pm {
    display: block!important;
}

The rules above are just an example. You would need to check out the extension's rules and somehow counter them.

There is no proper/permanent fix for this since extensions have full control of the page. Even if you were to design the plugin with dynamic classes/ids that change on each page load, it could still be blocked; the extension could analyze the structure of the html markup itself, determine what part of the markup represents the cookie banner, and then hide it. It doesn't matter what solution you will adopt, the extension can beat that.

If I were you, I wouldn't even bother trying this; if someone is using a banner blocker, your analytics/ads scripts are probably being blocked too, via an ad blocker.

@orestbida orestbida added wontfix This will not be worked on and removed enhancement New feature or request triage yet to be reviewed labels Feb 1, 2024
@bennetsadyba
Copy link
Author

You are right, thank you for explanation :)

@orestbida orestbida closed this as not planned Won't fix, can't repro, duplicate, stale Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants