1
0
Fork 0
mirror of https://github.com/CorentinTh/it-tools.git synced 2025-07-27 09:09:37 +02:00
it-tools/src/plugins/plausible.plugin.ts

13 lines
318 B
TypeScript
Raw Normal View History

import { config } from '@/config';
import Plausible from 'plausible-tracker';
2022-04-16 11:51:20 +02:00
import type { App } from 'vue';
export const plausible = {
install: (app: App) => {
const plausible = Plausible(config.plausible);
2022-04-16 11:51:20 +02:00
plausible.enableAutoPageviews();
app.config.globalProperties.$plausible = plausible;
},
};