From 360498c2501b61fccf282a66a700d07eded4a578 Mon Sep 17 00:00:00 2001 From: Winston Hsiao <96440583+Winston-Hsiao@users.noreply.github.com> Date: Wed, 2 Oct 2024 13:43:38 -0400 Subject: [PATCH] Sprig set user email (#438) --- frontend/src/components/SprigInitializer.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/SprigInitializer.tsx b/frontend/src/components/SprigInitializer.tsx index 229966bb..26e18117 100644 --- a/frontend/src/components/SprigInitializer.tsx +++ b/frontend/src/components/SprigInitializer.tsx @@ -12,9 +12,10 @@ const SprigInitializer = () => { if (window.Sprig && typeof window.Sprig === "function") { console.log("Sprig initialized"); - // Set user ID if authenticated + // Set user ID and email in Sprig if user is authenticated if (isAuthenticated && currentUser) { window.Sprig("setUserId", currentUser.id); + window.Sprig("setUserEmail", currentUser.email); } // Track page view