Skip to content

Commit

Permalink
Changed plausible config
Browse files Browse the repository at this point in the history
  • Loading branch information
henripar committed Feb 26, 2023
1 parent 48602cf commit 344cbf2
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 6 deletions.
19 changes: 17 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"dependencies": {
"@chenfengyuan/vue-number-input": "^2.0.1",
"@ckpack/vue-color": "^1.2.0",
"plausible-tracker": "^0.3.8",
"vue": "^3.2.47"
},
"devDependencies": {
Expand Down
16 changes: 12 additions & 4 deletions src/main.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
import { createApp } from 'vue'
import App from './App.vue'
import { createApp } from 'vue';
import App from './App.vue';

import './assets/main.css'
import './assets/main.css';

createApp(App).mount('#app')
import plausible from './plugins/plausible';

createApp(App)
.use(plausible, {
domain: 'scrollbar.app',
hashMode: true,
trackLocalhost: false,
})
.mount('#app');
11 changes: 11 additions & 0 deletions src/plugins/plausible.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import Plausible from 'plausible-tracker';

export default {
install: (app, options) => {
const { enableAutoPageviews } = Plausible(options);

enableAutoPageviews();

app.provide('plausible');
},
};

0 comments on commit 344cbf2

Please sign in to comment.