Documentation
Statistics
Statistics
The Statistics screen is rendered by wpmc_statistics_page() in includes/statistic.php.
It uses wpmc_views and wpmc_sessions, plus Chart.js loaders from the Charts directory.
Date filters
- Default date range is the last 30 days.
- Quick ranges include 7 days, 30 days, 3 months, 6 months, 1 year, and 2 years.
- Manual From and To date fields are available.
- If dates are inverted, the page normalizes the range.
Summary metrics
- Users Online Last 30 minutes: AJAX counter that excludes administrators.
- Unique Users: distinct user IDs from views.
- Total Sessions: distinct sessions in the period.
- Total Views: count of view rows in the period.
- Avg. Time on Page: average duration from
wpmc_views.duration_seconds. - Avg. Session Time: average difference between session created time and end time.
- Referrals from Search/Social: total referral counts from known search and social sources.
- Device Type Distribution: view distribution by device type.
- Top 10 Pages by Views: most visited URLs in the selected period.
Charts Details tab
Summary cards link to the Charts Details tab. The tab contains full charts for page views, unique users, average session duration, time spent on pages, referrals, devices, and top pages. The page resizes visible charts when switching tabs or opening hash links.
