From 1221126a0e05bc28660bc951854053d12831278a Mon Sep 17 00:00:00 2001 From: loverustfs Date: Fri, 27 Jun 2025 09:36:42 +0800 Subject: [PATCH] add google analytics --- docs/config.ts | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/docs/config.ts b/docs/config.ts index 9730a41..cc628ac 100644 --- a/docs/config.ts +++ b/docs/config.ts @@ -24,9 +24,43 @@ export default defineAdditionalConfig({ text: 'Edit this page on GitHub' }, + head: [ + [ + 'script', + { async: '', src: 'https://www.googletagmanager.com/gtag/js?id=G-TWW7WMTWL9' } + ], + + [ + 'script', + {}, + `window.dataLayer = window.dataLayer || []; + function gtag(){dataLayer.push(arguments);} + gtag('js', new Date()); + gtag('config', 'G-TWW7WMTWL9');` + ], + + ['script', {}, ` + var _hmt = _hmt || []; + (function() { + var hm = document.createElement("script"); + hm.src = "https://hm.baidu.com/hm.js?968e7103a8e28fb30f7d69e42b7c82bc"; + var s = document.getElementsByTagName("script")[0]; + s.parentNode.insertBefore(hm, s); + })(); + `] + ], + + + + + footer: { message: 'Released under the Apache License 2.0.', copyright: 'Copyright © 2025 RustFS' } } }) + + + +