feat: gtm push signup event (#14031)

* feat: gtm push signup event

* chore: fire only if gtm id is defined

---------

Co-authored-by: Peer Richelsen <[email protected]>
This commit is contained in:
sean-brydonandPeer Richelsen authored and GitHub committed 2024-03-08 15:13:29 +00:00
1 parent 3babfa7cf3
commit 30e4d769e3
4 files changed
+33 -1

No files matched your search

+8
View File
@@ -0,0 +1,8 @@
declare const window: Window & { dataLayer: Record<string, unknown>[] };
export const pushGTMEvent = (event: string, data?: Record<string, unknown>) => {
window.dataLayer?.push({
event,
...data,
});
};