Closed (fixed)
Project:
EU Cookie Compliance (GDPR Compliance)
Version:
7.x-1.25
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
4 Aug 2018 at 11:09 UTC
Updated:
5 Dec 2021 at 13:56 UTC
Jump to comment: Most recent
Comments
Comment #2
svenryen commentedHi!
Thanks for your request. I understand you've done market research and found that visitors are not annoyed by the fact they can't use your site without accepting cookies, and that such a decision won't hurt brand or market reputation. :)
Assuming that your "bye message" is presented at the page "bye-bye.html", you can try this. It would immediately redirect visitors when they click "No" and would also redirect any subsequent attempts at browsing your web site.
Let me know if the above doesn't resolve your problem.
Comment #3
oppure commentedHi Sven and thanks for your help, with this code what happens if the visitor wants to change his mind after clicking no? Will the visitor be able to go back and click "accept"?
Regarding "market research"... I run a personal website which provides informations for free, so far my tiny advertisement income didn't repay even a fraction of the money I've spent on the website, and that's without considering thhundreds of hours I've spent on it. I think it's quite understandable that I don't intend to spend (waste) any more time and work in trying to deal with this new (overly complicated and common sense lacking) cookies laws. The only option I have is to say "take it as it is or leave". To be honest I don't think I'm the only one in this situation and I would indeed suggest to implement this option in your excellent module.
regrds
Comment #4
svenryen commentedI understand your concern and headaches, and it's great that you're doing something to adhere to GDPR.
At the most basic, you can place this on your "bye-bye" page:
<div class="the-big-regret-button" onclick="jQuery.cookie('cookie-agreed', null, { path: '/' });">I regret and want advertisers to build profiles on my browsing habits</div>To be frank, I think blocking access to content is a really bad user experience - when there are other options - , so unless there's an outcry here, there are no plans of implementing this feature.
The issue queue isn't a programming class, so if you need further consultation on Javascript coding I recommend drupal Slack chat (the support channel), Drupal stackexchange or drupal.org/forum.
Comment #5
oppure commentedOk thanks.
Comment #6
oppure commentedCode in #4 didn't work for me, the following code worked:
<button onclick="Cookies.remove('cookie-agreed', { path: '/' });">I accept cookies</button>The only differences are the button html tag and the use of the newer js-cookie library instead of the jquery.cookie one. Of course jquery and js-cookie library must be loaded first.
Comment #7
oppure commentedI think similar code can be used to create a "withdraw cookie consent" page
<button onclick= "NoCookies()">Withdraw cookies consent</button>Comment #8
isinadinos commentedThere is same problem on d8 version. How can this be fixed for d8?
Comment #10
lo3001 commentedLook which twig template you are using for eu_cookie_compliance, in my case "eu_cookie_compliance_popup_info.html.twig".
Copy this file in your theme template and modify
<button type="button" class="{{ secondary_button_class }}">{{ secondary_button_label }}</button>to
<button type="button" class="{{ secondary_button_class }}" onclick="location.href='your link' ">{{ "your custom text"|t }}</button>