diff --git a/README.md b/README.md index 926283c..385db50 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,6 @@ [![Downloads][npm-downloads-src]][npm-downloads-href] [![Wide Angle][wideangle-src]][wideangle-href] -![full_logo_color_light_transparent](https://user-images.githubusercontent.com/4896588/224442362-45dd92e7-e118-46ac-a423-83d479a9654b.png) - Enable **privacy-friendly** web analytics in your Vue.js 3.x application with our official plugin. [Wide Angle Analytics](https://wideangle.co) is powerful, strictly-GDPR compliant Google Analytics alternative. @@ -59,7 +57,7 @@ app.use(WideAngle, { siteId: "8D27G3B9ACA01F4241", domain: "stats.example.com", fingerprint: true, - supressDnt: true + suppressDnt: true }); ``` @@ -123,6 +121,59 @@ const sendEvent = async () => { ``` +# Consent Handling + +By default, Wide Angle Analytics does nore require consent thanks to its privacy-first, anonymous tracking and principaled approached to compliance. + +However, you have additional toggles should you wish to control consent, either in **Opt-In** or **Opt-Out** mode. + +## Opt-Out by default + +If the visitors browsers has `DoNotTrack` setting enabled in the browser, it will be understood as opt-out and not tracking events will be issued. + +You website can't overwrite this behaviour by specifying `suppressDnt` setting. + +``` +app.use(WideAngle, { + siteId: "8D27G3B9ACA01F4241", + suppressDnt: true +}); +``` + +## Opt-In or Opt-Out based on Cookie + +Wide Angle can be configure to handle presence of a cookie, or a cookie with specific value, as an implicit consent. Lack of the cookie will be handled as implicit opt-out. + +Example configuration with cookie marker, expecting cookie name `WAA_CONSENT` with value `true`: + +``` +app.use(WideAngle, { + siteId: "8D27G3B9ACA01F4241", + consentMarker: "WAA_CONSENT=true" +}); +``` + + +## Programmatic consent + +The Wide Angle serving offers two additional methods, which allow for recording tracking consent: + +- `recordConsent(subjectId: String): void`, and +- `revokeConsent()` + + +Calling above methods on `waa` service will overwrite other consent mechanism (ie. DoNotTrack, and cookie marker). + +Example usage: + +``` + +``` + diff --git a/assets/full_logo_color_light_transparent.png b/assets/full_logo_color_light_transparent.png new file mode 100755 index 0000000..6f98b15 Binary files /dev/null and b/assets/full_logo_color_light_transparent.png differ diff --git a/package.json b/package.json index 7569540..57297e9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wideangle-vuejs", - "version": "1.0.1", + "version": "2.0.0", "description": "Wide Angle Analytics web analytics Plugin for Vue.js 3.x", "homepage": "https://wideangle.co", "repository": "github:wideangleanalytics/wideangle-vuejs",