From bf56f555fa051d67976859d8ea4f98974743a69a Mon Sep 17 00:00:00 2001 From: Rob Anderson Date: Fri, 27 Oct 2023 12:55:16 +0100 Subject: [PATCH] feat: migrate to GTM --- client/public/index.html | 34 +++++++++++++++++----------- client/src/plugins/metrics-plugin.ts | 25 -------------------- 2 files changed, 21 insertions(+), 38 deletions(-) diff --git a/client/public/index.html b/client/public/index.html index e8d9499..a71be03 100644 --- a/client/public/index.html +++ b/client/public/index.html @@ -32,20 +32,28 @@ >
- - - + + + + diff --git a/client/src/plugins/metrics-plugin.ts b/client/src/plugins/metrics-plugin.ts index 261666a..7bdb69c 100644 --- a/client/src/plugins/metrics-plugin.ts +++ b/client/src/plugins/metrics-plugin.ts @@ -2,10 +2,6 @@ import { MetricsEvent } from '@openlab/deconf-ui-toolkit' import _Vue from 'vue' import { SocketIoPlugin } from './socketio-plugin' -import VueGtagPlugin, { VueGtag, PluginOptions as GtagOptions } from 'vue-gtag' -import { env } from './env-plugin' -import router from '@/router/module' - export class MetricsPlugin { static shared: MetricsPlugin | null = null @@ -23,20 +19,6 @@ export class MetricsPlugin { info: info, }) } - - const options: GtagOptions = { - enabled: Boolean(env.GA_TOKEN), - config: { - id: env.GA_TOKEN as string, - params: { - anonymize_ip: true, - allow_ad_personalization_signals: false, - allow_google_signals: false, - }, - }, - } - - Vue.use(VueGtagPlugin, options, router) } track(metric: MetricsEvent): void { @@ -46,13 +28,6 @@ export class MetricsPlugin { metric.eventName, metric.payload ) - - const gtag: VueGtag = _Vue.prototype.$gtag - if (gtag && metric.eventName !== 'general/pageView') { - gtag.event('deconf', { - event_category: metric.eventName, - }) - } } error(error: unknown): void {