diff --git a/spa/components/Common/Likeable.vue b/spa/components/Common/Likeable.vue index dc064f6..9edd3ac 100644 --- a/spa/components/Common/Likeable.vue +++ b/spa/components/Common/Likeable.vue @@ -2,6 +2,8 @@ import type { WsEvent } from "~/config/types"; import JSConfetti from "js-confetti"; +const { gtag } = useGtag() + type Props = { name: string; }; @@ -33,6 +35,11 @@ const likes = ref([]); const app = useNuxtApp(); const like = () => { app.$api.data.like(props.name); + + gtag('event', 'like', { + label: 'like', + name: props.name, + }); }; const firework = (total: number = 40): void => { diff --git a/spa/components/v1/Contribution.vue b/spa/components/v1/Contribution.vue index 036376d..d57f3f0 100644 --- a/spa/components/v1/Contribution.vue +++ b/spa/components/v1/Contribution.vue @@ -2,6 +2,8 @@ import { useIssuesStore } from "~/stores/issues"; import GridRow from "~/components/v1/GridRow.vue"; +const { gtag } = useGtag() + const store = useIssuesStore(); store.fetch(); @@ -10,6 +12,10 @@ const issues = computed(() => { }); const redirectTo = (url: string) => { + gtag('event', 'open_issue', { + label: 'open_issue', + url, + }); window.open(url, "_blank"); }; diff --git a/spa/components/v1/Frameworks.vue b/spa/components/v1/Frameworks.vue index 9c872ed..a478f33 100644 --- a/spa/components/v1/Frameworks.vue +++ b/spa/components/v1/Frameworks.vue @@ -1,7 +1,5 @@ diff --git a/spa/components/v1/GithubStars.vue b/spa/components/v1/GithubStars.vue index 9631740..91672c7 100644 --- a/spa/components/v1/GithubStars.vue +++ b/spa/components/v1/GithubStars.vue @@ -1,8 +1,10 @@