mirror of
https://github.com/Art051/it-tools.git
synced 2025-08-11 19:29:03 +00:00
refactor(tracker): better tracker injection
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { config } from '@/config';
|
||||
import { createTrackerService } from '@/modules/tracker/tracker.services';
|
||||
|
||||
import Plausible from 'plausible-tracker';
|
||||
import type { App } from 'vue';
|
||||
|
||||
@@ -8,6 +8,6 @@ export const plausible = {
|
||||
const plausible = Plausible(config.plausible);
|
||||
plausible.enableAutoPageviews();
|
||||
|
||||
app.config.globalProperties.$tracker = createTrackerService({ plausible });
|
||||
app.provide('plausible', plausible);
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user