Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

chore: move register ga to signin page (#2233)

Joel9730297381f7
diff --git a/web/app/components/base/ga/index.tsx b/web/app/components/base/ga/index.tsx
index 67cd1e893dc..ec0089ff70e 100644
--- a/web/app/components/base/ga/index.tsx
+++ b/web/app/components/base/ga/index.tsx
@@ -38,23 +38,6 @@ gtag('config', '${gaIdMaps[gaType]}');
}}
>
</Script>
- {gaType === GaType.admin && (
- <>
- <Script strategy="beforeInteractive" async src={'https://www.googletagmanager.com/gtag/js?id=AW-11217955271"}'}></Script>
- <Script
- id="ga-monitor-register"
- dangerouslySetInnerHTML={{
- __html: `
-window.dataLayer2 = window.dataLayer2 || [];
-function gtag(){dataLayer2.push(arguments);}
-gtag('js', new Date());
-gtag('config', 'AW-11217955271"');
- `,
- }}
- >
- </Script>
- </>
- )}
</>
)
diff --git a/web/app/signin/page.tsx b/web/app/signin/page.tsx
index e0d14b48900..9d70b658772 100644
--- a/web/app/signin/page.tsx
+++ b/web/app/signin/page.tsx
@@ -1,12 +1,31 @@
import React from 'react'
import cn from 'classnames'
+import Script from 'next/script'
import Forms from './forms'
import Header from './_header'
import style from './page.module.css'
+import { IS_CE_EDITION } from '@/config'
const SignIn = () => {
return (
<>
+ {!IS_CE_EDITION && (
+ <>
+ <Script strategy="beforeInteractive" async src={'https://www.googletagmanager.com/gtag/js?id=AW-11217955271"}'}></Script>
+ <Script
+ id="ga-monitor-register"
+ dangerouslySetInnerHTML={{
+ __html: `
+window.dataLayer2 = window.dataLayer2 || [];
+function gtag(){dataLayer2.push(arguments);}
+gtag('js', new Date());
+gtag('config', 'AW-11217955271"');
+ `,
+ }}
+ >
+ </Script>
+ </>
+ )}
<div className={cn(
style.background,
'flex w-full min-h-screen',