From 580800457e77497476b4a56029dcbcfe71d0153e Mon Sep 17 00:00:00 2001 From: Kevin Szuchet Date: Mon, 21 Aug 2023 12:43:24 +0200 Subject: [PATCH] fix: Send user address in the track events --- src/components/Pages/Conference/Conference.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/Pages/Conference/Conference.tsx b/src/components/Pages/Conference/Conference.tsx index 5a12d7f..458aeaf 100644 --- a/src/components/Pages/Conference/Conference.tsx +++ b/src/components/Pages/Conference/Conference.tsx @@ -8,20 +8,21 @@ import { Props } from './Conference.types' import './Conference.css' export default function Conference(props: Props) { - const { token, server, worldName, worldContentServerUrl } = props + const { token, server, worldName, worldContentServerUrl, loggedInAddress: userAddress } = props const [alreadyDisconnected, setAlreadyDisconnected] = useState(false) const analytics = getAnalytics() const track = useCallback( (event: Events) => { - if (!worldName || !worldContentServerUrl) return + if (!worldName || !worldContentServerUrl || !userAddress) return analytics.track(event, { worldName, - worldContentServerUrl + worldContentServerUrl, + userAddress }) }, - [worldName, worldContentServerUrl] + [worldName, worldContentServerUrl, userAddress] ) const handleConnect = useCallback(() => track(Events.CONNECT), [track])