Hello! I’m a fairly new developer trying to implement Matomo Analytics into my react application. I understand how to create userIDs for my visitors, however, I’m not sure where to implement it within my application. I currently call a ‘setpageview’ using a useEffect hook in my BrowserRouter. But I imagine I am supposed to set my userID when the user logins. These are in 2 seperate parts of my code, so I’m confused.
Any help would be greatly appreciated. Thanks!