Skip to content

Commit

Permalink
Call gtag only if it is defined
Browse files Browse the repository at this point in the history
  • Loading branch information
igalst committed Mar 6, 2024
1 parent e3ae7cf commit 32492d0
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ const ProvisionsPopup = () => {
);

const gtmEvent = (target: string) =>
window.gtag("event", target, {
event_category: "engagement",
});
window.gtag?.("event", target, { event_category: "engagement" });

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

0 comments on commit 32492d0

Please sign in to comment.