mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-24 19:26:14 +01:00
🐛 fix(analytics): prevent multiple GTM initializations (#4174)
* feat(types): Add global window interface for Google Tag Manager * refactor(Chat/Footer): Move GTM initialization to useEffect for better lifecycle management * fix(hooks): add useEffect to initialize TagManager conditionally
This commit is contained in:
parent
c1c13a69dc
commit
561650d6f9
3 changed files with 24 additions and 14 deletions
|
|
@ -540,3 +540,9 @@ export type TVectorStore = {
|
|||
};
|
||||
|
||||
export type TThread = { id: string; createdAt: string };
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
google_tag_manager?: unknown;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue