diff --git a/workspaces/website/src/components/ProvisionsPopup/ProvisionsPopup.tsx b/workspaces/website/src/components/ProvisionsPopup/ProvisionsPopup.tsx index 87c9fe6bae..d27cc88672 100644 --- a/workspaces/website/src/components/ProvisionsPopup/ProvisionsPopup.tsx +++ b/workspaces/website/src/components/ProvisionsPopup/ProvisionsPopup.tsx @@ -14,19 +14,18 @@ const ProvisionsPopup = () => { !isSsr ); - const gtmEvent = (event: string) => window?.dataLayer.push({ event }); - const gtmEventClickReadMore = () => gtmEvent("Provisions popup click"); - const gtmEventClickClose = () => gtmEvent("Provisions popup close"); + const gtmEvent = (target: string) => + window.gtag?.("event", target, { event_category: "engagement" }); const onClose = (event: React.MouseEvent) => { event.stopPropagation(); - gtmEventClickClose(); + gtmEvent("Provisions_popup_close"); setIsOpenStorage(false); }; const onReadMore = (event: React.MouseEvent) => { event.stopPropagation(); - gtmEventClickReadMore(); + gtmEvent("Provisions_popup_click"); setIsOpenStorage(false); };