Closed danieltvaz closed 3 years ago
Hi @danieltvaz,
yes, you can achieve this, although not with the current API. It would look something like this:
// using as example 4 categories in total
onAccept: function(preferences){
// if not all 4 categories are accepted ...
if(preferences.level.length < 4){
// delete cookieconsent's own cookie, so that
// the next time they visit the page, the consent modal appears again
cc.eraseCookies(['cc_cookie']);
}
}
Note: .eraseCookies()
will be available in the upcoming v2.5 version, so as of now you should use something like this proposed function to erase cookies.
Thx for fast reply! This is exactly what i'm doing right now to solve this =))) Ty again!
@danieltvaz ,
just released v2.5.0, you can now use the proposed cc.eraseCookies(['cc_cookie']);
nice!! thx in advance
HI there! Amazing script for first, ty for that ;)
For now i need my users to accept all cookies, even optionally ones, and for that i'm thinking, is possible to show the consent modal every time my users load on my page, if they do not accept ALL cookies? I mean. I have 3 cookies on modal. One is mandatory (readonly) and the other two are optionally. So if they accept just the mandatory one, next time they load my page the consent screen doesnt show up, i need a differently behavior, i need this consent modal show everytime if they do not accept all other cookies, i see this a way to "force" then to accept all. Is there a builtin option for that ?