From ed61991da6efb37a0735afbf1f73a98ef0b6d361 Mon Sep 17 00:00:00 2001 From: Matteo Gabriele Date: Sat, 19 May 2018 21:18:24 +0200 Subject: [PATCH] docs: update documentation --- docs/opt-out.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/docs/opt-out.md b/docs/opt-out.md index 536462c..0ebe3e8 100644 --- a/docs/opt-out.md +++ b/docs/opt-out.md @@ -40,4 +40,23 @@ Vue.use(VueAnalytics, { return Promise.resolve(true) } }) +``` + +It is also possible to disable tracking from everywhere at any time using the `disable` method. + +```js +export default { + methods: { + disableTracking () { + this.$ga.disable(true) + // from now on analytics is disabled! + } + } +} +``` + +or + +```js +Vue.$ga.disable(true) ``` \ No newline at end of file