mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-04-24 08:46:15 -04:00
refactor(config): added config management with figue
This commit is contained in:
parent
5ce1262fb4
commit
6becdbb423
7 changed files with 82 additions and 12 deletions
|
@ -1,15 +1,10 @@
|
|||
import Plausible, { type PlausibleOptions } from 'plausible-tracker';
|
||||
import { config } from '@/config';
|
||||
import Plausible 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);
|
||||
const plausible = Plausible(config.plausible);
|
||||
plausible.enableAutoPageviews();
|
||||
|
||||
app.config.globalProperties.$plausible = plausible;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue