From cb22c1af340f70e8c9a91c60e27eff38dfb93914 Mon Sep 17 00:00:00 2001 From: iamkun Date: Thu, 5 May 2022 10:31:23 +0800 Subject: [PATCH] chore: update to new google analytics (#7486) --- docs/.vitepress/config/head.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/.vitepress/config/head.ts b/docs/.vitepress/config/head.ts index e67b8cc9d3..b6b2c64dfd 100644 --- a/docs/.vitepress/config/head.ts +++ b/docs/.vitepress/config/head.ts @@ -88,7 +88,23 @@ gtag('config', 'UA-175337989-1');`, 'script', { async: 'true', + src: 'https://www.googletagmanager.com/gtag/js?id=G-M74ZHEQ1M1', }, + ], + [ + 'script', + {}, + ` + window.dataLayer = window.dataLayer || []; + function gtag(){dataLayer.push(arguments);} + gtag('js', new Date()); + + gtag('config', 'G-M74ZHEQ1M1'); + `, + ], + [ + 'script', + {}, `(function(h,o,t,j,a,r){ h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)}; h._hjSettings={hjid:2894908,hjsv:6};