mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-07-27 00:59:37 +02:00
18 lines
468 B
TypeScript
18 lines
468 B
TypeScript
|
import Plausible, { type PlausibleOptions } from 'plausible-tracker';
|
||
|
import type { App } from 'vue';
|
||
|
|
||
|
const options: PlausibleOptions = {
|
||
|
domain: import.meta.env.VITE_PLAUSIBLE_DOMAIN ,
|
||
|
apiHost: import.meta.env.VITE_PLAUSIBLE_API_HOST,
|
||
|
trackLocalhost: false,
|
||
|
};
|
||
|
|
||
|
export const plausible = {
|
||
|
install: (app: App) => {
|
||
|
const plausible = Plausible(options);
|
||
|
plausible.enableAutoPageviews();
|
||
|
|
||
|
app.config.globalProperties.$plausible = plausible;
|
||
|
},
|
||
|
};
|