refactor(tracker): better tracker injection

This commit is contained in:
Corentin Thomasset 2022-12-21 21:02:57 +01:00
parent bf88836dbe
commit def60e7248
No known key found for this signature in database
GPG key ID: DBD997E935996158
6 changed files with 67 additions and 37 deletions

View file

@ -1,7 +1,9 @@
<script setup lang="ts">
import { useTracker } from '@/modules/tracker/tracker.services';
import { useHead } from '@vueuse/head';
useHead({ title: 'About - IT Tools' });
const { tracker } = useTracker();
</script>
<template>
@ -25,7 +27,7 @@ useHead({ title: 'About - IT Tools' });
href="https://github.com/sponsors/CorentinTh"
rel="noopener"
target="_blank"
@click="() => $tracker.trackEvent({ eventName: 'Support button clicked' })"
@click="() => tracker.trackEvent({ eventName: 'Support button clicked' })"
>
sponsoring me </n-button
>.