From 1909b75663ba1c3bd69e41b0994baf590e283f4a Mon Sep 17 00:00:00 2001 From: Simon Cambier Date: Sat, 26 Feb 2022 20:50:07 +0100 Subject: [PATCH] Analytics --- package.json | 1 + pnpm-lock.yaml | 7 +++++++ src/App.vue | 6 ++++++ src/analytics.ts | 7 +++++++ 4 files changed, 21 insertions(+) create mode 100644 src/analytics.ts diff --git a/package.json b/package.json index b961bd7..5116381 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "date-fns": "^2.28.0", "date-fns-tz": "^1.2.2", "lodash-es": "^4.17.21", + "plausible-tracker": "^0.3.5", "vue": "^3.2.31", "vue-i18n": "^9.1.9", "vue-router": "^4.0.12" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9277004..3cff31b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -25,6 +25,7 @@ specifiers: eslint-plugin-vue: ^8.5.0 jsdom: ^19.0.0 lodash-es: ^4.17.21 + plausible-tracker: ^0.3.5 postcss: ^8.4.6 prettier: ^2.5.1 prettier-eslint: ^13.0.0 @@ -44,6 +45,7 @@ dependencies: date-fns: 2.28.0 date-fns-tz: 1.2.2_date-fns@2.28.0 lodash-es: 4.17.21 + plausible-tracker: 0.3.5 vue: 3.2.31 vue-i18n: 9.1.9_vue@3.2.31 vue-router: 4.0.12_vue@3.2.31 @@ -4418,6 +4420,11 @@ packages: engines: {node: '>=0.10.0'} dev: true + /plausible-tracker/0.3.5: + resolution: {integrity: sha512-6c6VPdPtI9KmIsfr8zLBViIDMt369eeaNA1J8JrAmAtrpSkeJWvjwcJ+cLn7gVJn5AtQWC8NgSEee2d/5RNytA==} + engines: {node: '>=10'} + dev: false + /postcss-js/4.0.0_postcss@8.4.6: resolution: {integrity: sha512-77QESFBwgX4irogGVPgQ5s07vLvFqWr228qZY+w6lW599cRlK/HmnlivnnVUxkjHnCu4J16PDMHcH+e+2HbvTQ==} engines: {node: ^12 || ^14 || >= 16} diff --git a/src/App.vue b/src/App.vue index f88a61e..d5b5777 100644 --- a/src/App.vue +++ b/src/App.vue @@ -20,8 +20,14 @@ diff --git a/src/analytics.ts b/src/analytics.ts new file mode 100644 index 0000000..9eb79ac --- /dev/null +++ b/src/analytics.ts @@ -0,0 +1,7 @@ +import Plausible from 'plausible-tracker' + +// Setup tracking +export const plausible = Plausible({ + domain: 'n0mbers.scambier.xyz', + apiHost: 'https://stats.scambier.xyz', +})