johndatserakis / vue-cookie-accept-decline

👋 Show a banner with text, a decline button, and an accept button on your page. Remembers selection using cookies. Emits an event with current selection and on creation. Good for GDPR requirements.
https://johndatserakis.github.io/vue-cookie-accept-decline/
MIT License
147 stars 19 forks source link

saving in a cookie that i dont want a cookie #11

Closed nattyluke closed 5 years ago

nattyluke commented 5 years ago

I dont know if its a problem to save in a cookie that someone doesn't want a cookie. Maybe you should give a third button "doNothingContent" and a "clicked-nothing" event that just minifies the message and doesnt do anything? I'm not sure if that is necessary? I would like to contribute and add a Button if you like.

johndatserakis commented 5 years ago

Hey,

I was actually already in the project fixing the camelCase vs snake-case issue - so I went ahead and added this feature in the latest merge. You can see it in use in the demo now.

It introduces the concept of postpone - so that users can postpone making a decision on the accept/decline until a later time. To use it just set the :showPostponeButton="true" on the component and you'll see an x that will allow the user to hide the panel.

Thanks for the suggestion.

nattyluke commented 5 years ago

wonderful thank you too

joernroeder commented 5 years ago

maybe a stupid question but why are you not storing data in local storage? this would remove the cookie dependency as well.

johndatserakis commented 5 years ago

Not a stupid question at all! This component does actually use localStorage - but to support older browsers, it does fallback to actual cookies using tiny-cookie when localStorage is not supported.

I know it's a bit confusing considering the naming of the component, but the user privacy opt-in concept is the same - the user may want you to store information about them using a "method" (cookie or localStorage) or they may not want you to store this information. Hopefully this is a proper answer, thank you!