[codex] Add competition analytics tracking#76
Merged
Conversation
✅ Deploy Preview for competition-groups ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
coder13
commented
May 30, 2026
| import { useAuth } from '@/providers/AuthProvider'; | ||
| import { usePageActivityTracking } from '../usePageActivityTracking'; | ||
|
|
||
| const competitionPageName = (pathname: string, competitionId: string) => { |
Owner
Author
There was a problem hiding this comment.
This is not the full extent of all of the pages....Unless it is?
I want to report every single page
coder13
commented
May 30, 2026
| return relativePath.replace(/^\//, '').replace(/\//g, '_') || 'competition'; | ||
| }; | ||
|
|
||
| const pageViewEventName = (page: string) => { |
Owner
Author
There was a problem hiding this comment.
Again, I want to report every single page
Load configured Umami analytics, attach competition page events, and track active page time. Include environment declarations and focused coverage for analytics helpers and activity timers.
f6df5e0 to
475f174
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What changed
Adds Umami analytics support alongside the existing GA setup, including script loading from Vite env vars and shared event metadata for app, environment, version, auth status, and user ID.
Competition pages now emit competition/page view events, track visible active time every 60 seconds, and record live activity creation from the remote controls page.
Umami events include an environment label that distinguishes Netlify production traffic from beta traffic: main builds report production, beta builds report beta, and VITE_APP_ENV can override this when needed.
Validation