Add date filter and non-engaged breakdown to dashboard
Mahdi Naser Moghadasi
2daef62
- Add checkbox to toggle between 'all data (total only)' vs 'selected day only'
- Add date picker when 'selected day' mode is selected
- Filter all analytics data by date when date is selected
- Show/hide per-day breakdowns based on mode
- Display non-engaged visitors breakdown with activity types, button clicks, and tour interactions
- API supports date filtering for non-engaged breakdown queries
Revert "Add custom visitor ID setting for permanent exclusion"
Mahdi Naser Moghadasi
4e384a0
This reverts commit 68d622930fcab4e6338b29a957d79a54b21b0bc5.
Add custom visitor ID setting for permanent exclusion
Mahdi Naser Moghadasi
68d6229
- Visitor ID persists across page refreshes (stored in localStorage)
- Added option to set a custom visitor ID on admin page
- Custom ID can be used for permanent test visit exclusion
- Updated admin page UI with custom ID input field
Add test visit exclusion feature
Mahdi Naser Moghadasi
9ade0ed
- Added EXCLUDED_VISITOR_IDS environment variable support
- All analytics queries now filter out excluded visitor IDs
- writeAnalyticsToDB skips writing excluded visits
- Added visitor ID display on /admin page with copy button
- Created EXCLUDE_TEST_VISITS.md documentation
- Excluded visits are filtered from: visits, unique visitors, device stats, OS stats, browser stats, referrer stats, question views, LLM usage
Fix: Remove duplicate 'use client' directive
Mahdi Naser Moghadasi
0ac3f58
Fix admin page: add 'use client' directive for questions import
- Track which questions each user views
- Track OS and browser information
- Track device type (desktop/mobile/tablet)
- Track LLM usage when AI assistant is used
- Enhanced admin dashboard with:
- Device statistics (desktop/mobile/tablet)
- OS and browser breakdowns
- Most viewed questions
- LLM usage count
- Individual visitor details with questions viewed and LLM interactions
- Add analytics utility functions for tracking
- Parse user agent to extract device/OS/browser info
Add admin analytics dashboard page
Mahdi Naser Moghadasi
ca0d714
- Create /admin page to view detailed analytics
- Show total visits, unique visitors, visits today
- Display last 7 days chart with visual bars
- Auto-refresh every 30 seconds
- Beautiful UI with animations
- Accessible at /admin route