mirror of
https://github.com/langgenius/dify.git
synced 2026-04-05 10:25:48 +08:00
feat: integrate Google Analytics event tracking and update CSP for script sources (#30365)
Co-authored-by: CodingOnStar <hanxujiang@dify.ai>
This commit is contained in:
20
web/global.d.ts
vendored
20
web/global.d.ts
vendored
@@ -9,4 +9,22 @@ declare module 'lamejs/src/js/Lame';
|
||||
declare module 'lamejs/src/js/BitStream';
|
||||
declare module 'react-18-input-autosize';
|
||||
|
||||
export { }
|
||||
declare global {
|
||||
// Google Analytics gtag types
|
||||
type GtagEventParams = {
|
||||
[key: string]: unknown
|
||||
}
|
||||
|
||||
type Gtag = {
|
||||
(command: 'config', targetId: string, config?: GtagEventParams): void
|
||||
(command: 'event', eventName: string, eventParams?: GtagEventParams): void
|
||||
(command: 'js', date: Date): void
|
||||
(command: 'set', config: GtagEventParams): void
|
||||
}
|
||||
|
||||
// eslint-disable-next-line ts/consistent-type-definitions -- interface required for declaration merging
|
||||
interface Window {
|
||||
gtag?: Gtag
|
||||
dataLayer?: unknown[]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user