mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-04-24 08:46:15 -04:00
refactor(tracker): better tracker injection
This commit is contained in:
parent
bf88836dbe
commit
def60e7248
6 changed files with 67 additions and 37 deletions
|
@ -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);
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue