DailyJS
Published in

DailyJS

Google Analytics, GDPR and Vuejs

A quick guide on how to be compliant with new EU regulations

Using vue-analytics

Let’s say you have this scenario in mind: you are releasing a new update to be GDPR proof (because you want to sleep at night again) and you need to show a few buttons and checks to your users, and then maybe start tracking them again.

How do I implement this check?

The disabled property needs to be true or false, so you can pass a simple boolean but also a function, a promise or a function that returns a promise: just remember to return a truthy or falsy value.

Example of an HTTP request to an API to check user agreements

Opt-in and opt-out on the fly

There are two methods that you can use to opt-out and opt-in your user on the fly: disable and enable.

--

--

JavaScript news and opinion.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store