From 6b31414bf4fd01383912add58724faa7db79c783 Mon Sep 17 00:00:00 2001 From: zk-phi Date: Fri, 6 Oct 2023 00:41:15 +0900 Subject: [PATCH] Remove deprecated ga --- src/utils/analytics.ts | 7 ------- static/index.html | 6 ------ 2 files changed, 13 deletions(-) diff --git a/src/utils/analytics.ts b/src/utils/analytics.ts index 3e05e0a0..bda3c725 100644 --- a/src/utils/analytics.ts +++ b/src/utils/analytics.ts @@ -5,7 +5,6 @@ let mode = ""; const switchMode = (value: string, interactive?: boolean) => { mode = value; if (GA4_TOKEN && interactive) { - ga("send", "pageview", `/${value}`); gtag("event", "switch_mode", { mode: value }); } else { // eslint-disable-next-line no-console @@ -14,15 +13,12 @@ const switchMode = (value: string, interactive?: boolean) => { }; const changeFont = (value: string) => { - ga("set", "dimension1", value); }; const changeAnimation = (animationName: string, effectNames: string[]) => { - ga("set", "dimension2", `${animationName}/${effectNames.join(",")}`); }; const render = () => { - ga("send", "event", mode, "render"); if (GA4_TOKEN) { gtag("event", "render_emoji", { mode }); } else { @@ -32,7 +28,6 @@ const render = () => { }; const download = () => { - ga("send", "event", mode, "download"); if (GA4_TOKEN) { gtag("event", "download", { mode }); } else { @@ -43,8 +38,6 @@ const download = () => { export default (() => { if (GA4_TOKEN) { - ga("create", "UA-121793995-1", "auto"); - ga("send", "pageview", "/"); gtag("js", new Date()); gtag("config", GA4_TOKEN); // eslint-disable-next-line no-console diff --git a/static/index.html b/static/index.html index 28c3c516..9b714ab9 100644 --- a/static/index.html +++ b/static/index.html @@ -11,12 +11,6 @@ -