Skip to content

Commit

Permalink
check gtag instead of dataLayer
Browse files Browse the repository at this point in the history
  • Loading branch information
TalBenAvi committed Mar 5, 2024
1 parent aa622b4 commit e150b59
Showing 1 changed file with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,9 @@ const ProvisionsPopup = () => {
!isSsr
);

const gtmEvent = (event: string) =>
window?.dataLayer.push({
event: "click",
popup: "provisions",
interaction: event,
});
const gtmEventClickReadMore = () => gtmEvent("Read_More");
const gtmEventClickClose = () => gtmEvent("Dismiss");
const gtmEvent = (event: string) => window.gtag?.(event);
const gtmEventClickReadMore = () => gtmEvent("Provisions_popup_click");
const gtmEventClickClose = () => gtmEvent("Provisions_popup_close");

const onClose = (event: React.MouseEvent) => {
event.stopPropagation();
Expand Down

0 comments on commit e150b59

Please sign in to comment.