zauberware/acceptcookies

Possible to block Facbook and Twitter cookies

Closed this issue · 6 comments

I use the Facebook and Twitter widgets on some sites and have been wondering how I can keep using them but give users the option to block the cookies they set. Is this something your plugin could be extended to cover as well as Google analytics?
https://developers.facebook.com/docs/plugins/page-plugin/
https://dev.twitter.com/web/embedded-timelines/user

You mean: If the user denies the Cookies, then Twitter, Facebook and Google Analytics will not be loaded ? That really makes sense.

What should it look like ? My approach: If the user pressed "Accept" an JS Event will be triggered. You can listen to the event and do whatever you want if's getting fired. Maybe others want to do more than Facebook and Twitter. If the user presses "Deny Cookies", I will not fire the event.

Ideally it would still allowed the widgets to load but just blocked the widgets from setting any cookies.
But if that's not easy, then blocking the whole widget script from loading would be better than nothing.
My JavaScript skills are almost non-existent (apart from editing existing code) so the more plug'n'play the plugin is the better for me.

@paul-frost Facebook, Twitter ... Widgets only appear if they can set their cookies. Try it yourself: Install a Ad/Script-Blocker in your Browser and you are more or less free of those widgets in the web.

We will first implement a simple deny-functionality.

I'm thinking of the situation where the user isn't tech savvy (or privacy conscious) and doesn't have ad blockers or third party cookies blocked. With GDPR they will need to consent to cookies being used, but the widgets will have loaded and set their cookies before they are offered the choice to block them.

I added a custom script text field to plugin settings. You can put scripts in there you want to load, only if the user accepted cookies.

@paul-frost I will provide more examples how to load custom stuff with that plugin. iFrames, Facebook, other social media platforms are on my list