Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:rotating_light:

Vanessa710e703867c5
diff --git a/app/src/types/index.d.ts b/app/src/types/index.d.ts
index 55e954aa01..7c1aa57899 100644
--- a/app/src/types/index.d.ts
+++ b/app/src/types/index.d.ts
@@ -26,7 +26,7 @@ type TBazaarType = "templates" | "icons" | "widgets" | "themes"
declare module "blueimp-md5"
interface Window {
- dataLayer: string[]
+ dataLayer: any[]
siyuan: ISiyuan
webkit: any
diff --git a/app/src/util/onGetConfig.ts b/app/src/util/onGetConfig.ts
index 7537a2dd36..dd6491c0e9 100644
--- a/app/src/util/onGetConfig.ts
+++ b/app/src/util/onGetConfig.ts
@@ -164,8 +164,9 @@ export const onGetConfig = (isStart: boolean) => {
if (!window.siyuan.config.system.disableGoogleAnalytics) {
try {
window.dataLayer = window.dataLayer || [];
- // @ts-ignore
- window.gtag = () => {window.dataLayer.push(arguments)};
+ window.gtag = function (...args) {
+ window.dataLayer.push(args);
+ };
window.gtag("js", new Date());
window.gtag("config", "G-L7WEXVQCR9");
const para = {