From 2fbe751db2c2cb3db8dc607b99106f4e1cb9dea5 Mon Sep 17 00:00:00 2001
From: schneefux
- This site shares visitor data with Google Analytics and Google AdSense which store cookies. If you do not want that, you can opt out of Google Analytics and opt out of targeted advertisements. + This site shares visitor data with Google Analytics and Google AdSense which store cookies. If you do not want that, you can opt out of Google Analytics (Google Analytics is disabled for you) and opt out of targeted advertisements.
@@ -28,12 +28,27 @@ export default Vue.component('intro-box', { data: function() { return { hideIntro: !!localStorage.getItem('hideIntro'), + gaOptedOut: !!localStorage.getItem('gaOptOut'), }; }, + methods: { + optOutAnalytics: function() { + this.$ga.disable(); + this.gaOptedOut = true; + }, + }, + created: function() { + if (this.gaOptedOut) { + this.$ga.disable(); + } + }, watch: { hideIntro: function(value) { localStorage.setItem('hideIntro', value); }, + gaOptedOut: function(value) { + localStorage.setItem('gaOptOut', value); + }, selectedMode: function(value) { this.hideIntro = !!localStorage.getItem('hideIntro'); }, -- cgit v1.3.1