From a6ff55a5a7cd7fb76176bc9ed906c2b27b350f26 Mon Sep 17 00:00:00 2001 From: Anton Mushnin Date: Tue, 14 May 2024 17:02:42 +0300 Subject: [PATCH] report sign up to google analytics --- web/src/hooks/useSignUp.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/web/src/hooks/useSignUp.tsx b/web/src/hooks/useSignUp.tsx index db72b22a..ac4d1656 100644 --- a/web/src/hooks/useSignUp.tsx +++ b/web/src/hooks/useSignUp.tsx @@ -21,6 +21,13 @@ const useSignUp = () => { sendReport("signed up", { username: variables.username, email: variables.email }, [ `user_token: ${response.data.id}`, ]); + if (typeof gtag === "function") { + gtag("set", "user_properties", { + user_status: "signed_up", + }); + } else { + console.warn("gtag function is not defined"); + } getUser(); },