From 29891e0f0dece15a21463871b13395cdb53d94d9 Mon Sep 17 00:00:00 2001 From: Corentin Thomasset Date: Fri, 23 Jul 2021 23:01:40 +0200 Subject: [PATCH] feat(track): added plausible tracker --- CHANGELOG.md | 1 + nuxt.config.js | 7 +++++++ package-lock.json | 30 ++++++++++++++++++++++++++++++ package.json | 1 + 4 files changed, 39 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c070e18e..7ba38c2a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `/cypher` -> [`/cypher-uncyfer-text`](https://it-tools.tech/cypher-uncyfer-text) - `/url-encoder` -> [`/url-encoder-decoder`](https://it-tools.tech/url-encoder-decoder) - [Crontab generator](https://it-tools.tech/crontab-generator) now handle 6 digits format (second support) +- Switched from google analytics to a selfhosted privacy-friendly plausible tracker ### Added - Added [/how-to-report-bug-or-request](/how-to-report-bug-or-request) route to explain how to report bug and request features diff --git a/nuxt.config.js b/nuxt.config.js index f95c9bdd..ad738ee4 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -56,9 +56,16 @@ export default { '@nuxtjs/svg', 'nuxt-i18n', '@nuxtjs/markdownit', + 'vue-plausible', '@nuxtjs/sitemap' // Must stay last ], + plausible: { + domain: process.env.NUXT_ENV_PLAUSIBLE_DOMAIN, + apiHost: process.env.NUXT_ENV_PLAUSIBLE_API_HOST, + trackLocalhost: false + }, + // Axios module configuration (https://go.nuxtjs.dev/config-axios) axios: {}, diff --git a/package-lock.json b/package-lock.json index 4f88d8f7..92ab27ff 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,6 +24,7 @@ "nuxt": "^2.15.7", "nuxt-i18n": "^6.27.3", "qrcode.vue": "^1.7.0", + "vue-plausible": "^1.2.1", "vuetify": "^2.5.7", "vuetify-toast-snackbar": "^0.6.1" }, @@ -21313,6 +21314,14 @@ "node": ">=4" } }, + "node_modules/plausible-tracker": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/plausible-tracker/-/plausible-tracker-0.3.1.tgz", + "integrity": "sha512-oXnVyfTF2gzkfK3iOZCRZEnf8sH4gBASaJhY+clwWW1orIybfQpfbgg4U5Bwj5dW/4iNstM4tx4jMCVUfMCUbg==", + "engines": { + "node": ">=10" + } + }, "node_modules/pluralize": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", @@ -26573,6 +26582,14 @@ "resolved": "https://registry.npmjs.org/vue-no-ssr/-/vue-no-ssr-1.1.1.tgz", "integrity": "sha512-ZMjqRpWabMPqPc7gIrG0Nw6vRf1+itwf0Itft7LbMXs2g3Zs/NFmevjZGN1x7K3Q95GmIjWbQZTVerxiBxI+0g==" }, + "node_modules/vue-plausible": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/vue-plausible/-/vue-plausible-1.2.1.tgz", + "integrity": "sha512-+HIO35sHLPMtpSzyQSjGUFQUmqHXHas5kQ/XSdowS6z8FryfP/uyPURUT1hoXK217DD2w7EbZqjs59TDcHhcEw==", + "dependencies": { + "plausible-tracker": "^0.3.1" + } + }, "node_modules/vue-property-decorator": { "version": "9.1.2", "resolved": "https://registry.npmjs.org/vue-property-decorator/-/vue-property-decorator-9.1.2.tgz", @@ -44406,6 +44423,11 @@ } } }, + "plausible-tracker": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/plausible-tracker/-/plausible-tracker-0.3.1.tgz", + "integrity": "sha512-oXnVyfTF2gzkfK3iOZCRZEnf8sH4gBASaJhY+clwWW1orIybfQpfbgg4U5Bwj5dW/4iNstM4tx4jMCVUfMCUbg==" + }, "pluralize": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", @@ -48523,6 +48545,14 @@ "resolved": "https://registry.npmjs.org/vue-no-ssr/-/vue-no-ssr-1.1.1.tgz", "integrity": "sha512-ZMjqRpWabMPqPc7gIrG0Nw6vRf1+itwf0Itft7LbMXs2g3Zs/NFmevjZGN1x7K3Q95GmIjWbQZTVerxiBxI+0g==" }, + "vue-plausible": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/vue-plausible/-/vue-plausible-1.2.1.tgz", + "integrity": "sha512-+HIO35sHLPMtpSzyQSjGUFQUmqHXHas5kQ/XSdowS6z8FryfP/uyPURUT1hoXK217DD2w7EbZqjs59TDcHhcEw==", + "requires": { + "plausible-tracker": "^0.3.1" + } + }, "vue-property-decorator": { "version": "9.1.2", "resolved": "https://registry.npmjs.org/vue-property-decorator/-/vue-property-decorator-9.1.2.tgz", diff --git a/package.json b/package.json index ac02018e..3ec41124 100644 --- a/package.json +++ b/package.json @@ -52,6 +52,7 @@ "nuxt": "^2.15.7", "nuxt-i18n": "^6.27.3", "qrcode.vue": "^1.7.0", + "vue-plausible": "^1.2.1", "vuetify": "^2.5.7", "vuetify-toast-snackbar": "^0.6.1" },