Closed thorewi closed 2 years ago
Hello,
The option is not currently in the Template. But the option works only with Cookie tables
so it's not only about the one option but also "cookie tables" must be configurable for each storage.
https://github.com/orestbida/cookieconsent/blob/master/demo/app.js#L121
This also generates in the widget something like this:
But it can be hide with an option remove_cookie_tables
viz. original plugin configuration
I don't think html tables inside the settings modal are useful and another thing is that columns of tables are dynamically defined.
So my proposed solution is as follows:
remove_cookie_tables
always true
(removes html tables), not configurable with the templatecookie name
and is regex
(checkbox). We don't need more columns if the html tables are not displayed.autoclear_cookies
will be set automatically to true
if some storage has any cookies defined. Your idea is probably the proper solution, but I don't want to specify all 3rd party cookies just because of this "almost nobody will use" function... I would be fine to remove all cookies except of "cc-settings"... e-commerce cart will get empty, maybe some popup will display again, what worse can happen? so maybe if someone specify the cookies, only this cookies will be removed, otherwise all except "cc-settings" ?
Well it doesn't sound bad but this is not implemented by the original plugin. The option autoclear_cookies
works only with cookie tables and cookies are removed when the user click on agree/reject button. At this moment are cookies for denied storages removed.
So the feature must be implemented in this wrapper. For clarification, the cookies should always be deleted with the page load until the user makes some action (click on accept all || accept necessary || save settings, etc.). Right?
I think it should be deleted only when you withdraw any consent, use case:
1) I click "Accept all" - nothing is deleted... 2) Then I uncheck consent for ad_storage and analytics_storage and click "Save settings" - all cookies are deleted except "cc-setings"... 3) Then I click "Accept necessary" - nothing is deleted cause there is no change... 4) Then I click "Accept all" - nothing is deleted because these is no withdrawing, just granting...
But I realized, that with my solution, if there is already saved cookies (lets say '_ga') from "opt-out" period and you click "Accept necessary", the '_ga' cookie won't be deleted. So maybe would be better to delete cookies every time when someone clicks on "Accept necessary" or "Save settings". I guess it would be also easier solution to implement, right? What do you think?
I agree, cookies would be deleted when the user clicks on "Accept necessary" or "Save settings" and if there is some change (so don't delete cookies when the user clicks on "Accept necessary" multiple times, etc.).
But I have no time today/tomorrow so I can implement the feature on 2.1.2022.
"and if there is some change or the button is clicked for the first time"...
Hello,
I implemented it and the feature will be in today's release 0.3.2
.
All you need for your UC is checked option Enable cookies auto-clear
. Strategy Clear all except defined
is selected by default when the option is checked (the strategy option is here primary for the future implementation of previously discussed cookie tables).
If you want to keep any other cookies than cc-settings
(that is always kept automatically) then you can define them in the field Cookie names
.
Hi,
is there an option for "autoclear_cookies" as it is in the original widget? Maybe I just didn't notice, but otherwise it should be added and I think it should be set to "true", although at original widget it is set to "false".
Thank you.