From 607ebedeff0d7d9317f68874b235eace3859ced7 Mon Sep 17 00:00:00 2001 From: dengfuping Date: Thu, 11 Jul 2024 15:28:34 +0800 Subject: [PATCH] config(site): Add clarity script for user behavior analytics --- .dumirc.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.dumirc.ts b/.dumirc.ts index 8317d22b6..6380776ee 100644 --- a/.dumirc.ts +++ b/.dumirc.ts @@ -36,6 +36,14 @@ export default defineConfig({ analytics: { ga_v2: 'G-81Y5XPZY2E', }, + headScripts: [ + // Microsoft clarity script + `(function(c,l,a,r,i,t,y){ + c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)}; + t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i; + y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y); + })(window, document, "clarity", "script", "n5kn7gme0s");`, + ], metas: [ { property: 'og:site_name',