🐛 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:
Riya Amemiya 2024-09-21 23:30:40 +09:00 committed by GitHub
parent c1c13a69dc
commit 561650d6f9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 24 additions and 14 deletions

View file

@ -540,3 +540,9 @@ export type TVectorStore = {
};
export type TThread = { id: string; createdAt: string };
declare global {
interface Window {
google_tag_manager?: unknown;
}
}