User Guide – Traffic Analytics

Table of Contents

The Traffic Analytics Module provides comprehensive website traffic monitoring directly within your WordPress admin. It tracks visitors, pageviews, referrers, and device information without relying on external services — all data stays on your server.

Disabled by Default:
The Traffic Analytics module is disabled by default to minimise server load on sites that don’t need it. You must explicitly enable it in the plugin settings before data collection begins.
Who is this for?
You need the Administrator role (the manage_options capability) to access the Traffic Analytics module. Other user roles will not see the menu item.

Key Features

📊 Visual Dashboard

Interactive SVG chart showing daily visitors and pageviews with comparison to previous periods.

📄 Top Pages

See which pages on your site receive the most traffic, with expandable details for query parameters.

🔗 Referrer Tracking

Identify where your traffic comes from — search engines, social media, other websites, or direct visits.

📱 Device & Browser Stats

Breakdown of visitors by device type (desktop, mobile, tablet), browser, and operating system.

⚡ Real-Time Count

Live count of visitors active on your site in the last 30 minutes.

🔒 Privacy-Focused

No external tracking scripts. No third-party data sharing. All data remains on your server.

Enable / Disable the Module

The Traffic Analytics module is a standalone module inside Advanced Analytics. It is disabled by default and must be enabled manually before any data collection begins.

  1. Navigate to Error Logs → Settings in the WordPress admin sidebar.
  2. Click the “Traffic Analytics” tab (or scroll to the section headed Traffic Analytics Settings).
  3. Check the “Enable Traffic Analytics” checkbox.
  4. Configure any additional settings (tracking method, exclusions, retention).
  5. Click Save Changes.
wp-admin/admin.php?page=advan_logs_settings#aadvana-options-tab-traffic-analytics
After Enabling: Once enabled, a new “Traffic Analytics” submenu item appears under the Error Logs menu. Data collection begins immediately based on your chosen tracking method.
Important: Disabling the module stops data collection and hides the Traffic Analytics submenu. Previously collected data is preserved and will be available again if you re-enable the module.

Module Settings

wp-admin/admin.php?page=advan_logs_settings#aadvana-options-tab-traffic-analytics

The Traffic Analytics settings page contains the following configuration options:

Setting Type Description
Enable Traffic Analytics Checkbox Master switch to enable or disable the entire module. When disabled, no data is collected and the dashboard menu is hidden.
Tracking Method Radio buttons Choose between Server-side (PHP) or Client-side (JavaScript) tracking. See Tracking Methods for details.
Exclude Administrators Checkbox When enabled, logged-in administrators are not counted in traffic statistics. Useful for excluding your own visits.
Keep Data For (days) Number Traffic data older than this number of days will be automatically deleted. Minimum: 30 days. Maximum: 3650 days (10 years).

Dashboard Overview

wp-admin/admin.php?page=advan_traffic_analytics

The Traffic Analytics dashboard is the main interface for viewing your site’s traffic data. It consists of several sections:

  • Date Range Toolbar — Quick presets and custom date selection
  • Real-Time Indicator — Live visitor count for the last 30 minutes
  • Summary Cards — Key metrics with period comparison
  • Line/Bar Chart — Visual representation of daily traffic
  • Top Pages Panel — Most visited pages on your site
  • Top Referrers Panel — Traffic sources with favicon display
  • Tech Breakdown Panels — Devices, browsers, and operating systems
  • Tracking Info Footer — Current tracking method and buffer status

Date Range Selection

The toolbar at the top of the dashboard provides multiple ways to select the date range for your traffic data:

Quick Presets

Preset Date Range
Today Current day only
Yesterday Previous day only
Last 7 Days Today and the previous 6 days
Last 28 Days Today and the previous 27 days (default)
Last 90 Days Today and the previous 89 days
Last 12 Months Today and the previous 12 months

Custom Date Range

For specific date ranges, use the date picker fields:

  1. Enter a Start Date using the date picker or type in YYYY-MM-DD format.
  2. Enter an End Date (cannot be in the future).
  3. Click Apply to load data for the selected range.
Comparison Period: The dashboard automatically calculates a “previous period” of equal length for comparison. For example, if you select the last 7 days, the comparison will be against the 7 days before that.

Summary Cards

The summary cards display key metrics at a glance, each showing the current value and percentage change from the previous period:

Metric Description
Total Visitors Unique visitors counted using a cookie-based identifier. A visitor is counted once per day regardless of how many pages they view.
Total Pageviews Total number of page loads across all visitors. Each page load counts as one pageview.
Pages / Visitor Average number of pages viewed per visitor. Calculated as Total Pageviews ÷ Total Visitors.

Change Indicators

  • +15.2% — Green indicates positive growth compared to the previous period
  • -8.5% — Red indicates decline compared to the previous period
  • 0.0% — Grey indicates no change

Visitors & Pageviews Chart

The main chart displays daily traffic as a combined bar chart:

  • Light bars (background) — Total pageviews for each day
  • Dark bars (foreground) — Unique visitors for each day

Interactive Features

  • Hover — Move your mouse over any bar to see a tooltip with the exact date, visitor count, and pageview count.
  • Legend — The legend above the chart indicates which colour represents visitors vs. pageviews.
  • Responsive — The chart automatically scales to fit different screen sizes.
No Data? If the chart shows “No data available,” the module hasn’t collected any traffic for the selected date range. Check that the module is enabled and wait for visitors to arrive.

Top Pages

The Top Pages panel shows the most visited pages on your site for the selected date range. Data is displayed in a table with visual progress bars:

Column Description
Page The URL path of the page (e.g., /about/, /contact/). The background bar indicates relative traffic volume.
Visitors Number of unique visitors who viewed this page.
Pageviews Total number of times this page was loaded.

Expandable Details

Pages with multiple URL variations (e.g., with different query parameters) show an expand arrow. Click the row to reveal:

  • Individual URL variations with their specific visitor/pageview counts
  • Query parameter tags (useful for tracking UTM campaigns, search queries, etc.)

Top Referrers

The Top Referrers panel shows where your traffic is coming from. Referrers are grouped by domain with their favicon displayed for easy identification:

Column Description
Referrer The domain that referred traffic to your site (e.g., google.com, facebook.com). Includes a favicon from Google’s favicon service.
Visitors Number of unique visitors from this referrer.
Pageviews Total pageviews from visitors arriving via this referrer.

Expandable Details

Click on a referrer row to expand and see the full referring URLs, including:

  • Complete referrer paths (e.g., specific social media posts or forum threads)
  • Query parameters that might indicate search terms or campaign tracking
Direct Traffic: Visitors who arrive directly (by typing your URL or from bookmarks) may appear as having no referrer, or the referrer might be empty.

Tech Breakdown

Three panels provide breakdowns of your visitors’ technology:

Devices

Shows the distribution of visitors by device type:

  • 🖥 Desktop — Traditional computers and laptops
  • 📱 Mobile — Smartphones
  • ⬛ Tablet — Tablets and similar devices

Each device type shows the percentage of total traffic and the absolute visitor count.

Browsers

Lists the top browsers used by your visitors (e.g., Chrome, Firefox, Safari, Edge). Shows visitor count and pageviews for each browser.

Operating Systems

Lists the top operating systems (e.g., Windows, macOS, iOS, Android, Linux). Shows visitor count and pageviews for each OS.

Real-Time Visitors

The real-time indicator in the top-right of the toolbar shows how many unique visitors are currently active on your site:

  • Pulsing dot — Indicates the real-time counter is active
  • Visitor count — Number of unique visitors in the last 30 minutes
How It Works: The real-time count is based on visitor activity tracked during aggregation cycles. The count may have a delay of 1–2 minutes depending on your cron schedule.

Tracking Methods

You can choose between two tracking methods, each with different trade-offs:

Server-side (PHP)

Recommended for most sites.

  • Hooks into WordPress’s template loading process
  • Tracks all page requests, including those from users with JavaScript disabled
  • Cannot be blocked by ad-blockers or privacy extensions
  • Faster execution (no additional HTTP request)
  • May count some bots that mimic browser user-agents

Client-side (JavaScript)

  • Uses the browser’s sendBeacon() API to record pageviews
  • Only tracks real browsers that execute JavaScript
  • Automatically excludes most bots (which don’t run JavaScript)
  • Can be blocked by ad-blockers, privacy extensions, or disabled JavaScript
  • Adds a small JavaScript snippet to your frontend
Current Method: The footer of the Traffic Analytics dashboard displays which tracking method is currently active, along with the buffer status (file-based or direct database).

Data Retention

To manage database size, the Traffic Analytics module automatically deletes old data based on your retention setting:

  • Default: 90 days
  • Minimum: 30 days
  • Maximum: 3650 days (10 years)

Data older than the retention period is permanently deleted during a weekly cleanup task. Consider your storage capacity and reporting needs when setting this value.

Deleted Data Cannot Be Recovered: Once traffic data exceeds the retention period and is deleted, it cannot be restored. Set a longer retention period if you need historical data for long-term analysis.

Recommendations

Use a Real System Cron

For accurate traffic aggregation, disable the built-in WordPress cron (DISABLE_WP_CRON) and configure a real system cron job instead. This ensures traffic data is processed reliably regardless of site traffic.

Add to wp-config.php:

define( 'DISABLE_WP_CRON', true );

Then set up a system cron to call wp-cron.php every minute:

* * * * * wget -q -O - https://yoursite.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1

Exclude Admin Traffic

Enable the “Exclude administrators” setting to prevent your own browsing from inflating traffic numbers. This is especially important during development or content editing sessions.

Choose the Right Tracking Method

  • Use Server-side for maximum coverage and reliability
  • Use Client-side if bot traffic is a significant concern and you’re comfortable with potential undercounting from ad-blockers

Troubleshooting

No data appearing on the dashboard

If the dashboard shows “No data available”:

  • Verify the module is enabled in Settings → Traffic Analytics
  • Check that data has had time to be collected (wait for at least a few pageviews)
  • Ensure WordPress cron is running (visit your site or check cron status)
  • If using JavaScript tracking, check that the script loads in your frontend (no ad-blocker interference)

Real-time count is always zero

The real-time count is updated during each aggregation cycle. If it stays at zero:

  • Check that cron jobs are executing (the aggregation runs every minute)
  • Verify you have recent visitors (excluded admins won’t show up if that setting is enabled)
  • Wait 1–2 minutes for the next aggregation cycle to process

Traffic numbers seem too high (bot traffic)

If you suspect bots are inflating your numbers:

  • Switch to Client-side (JavaScript) tracking, which excludes bots that don’t execute JavaScript
  • The server-side tracking includes basic bot detection, but some sophisticated bots may still be counted

Traffic numbers seem too low

If numbers seem lower than expected:

  • Check if you have the “Exclude administrators” option enabled (disable temporarily to test)
  • If using JavaScript tracking, some visitors may have ad-blockers that prevent tracking
  • Verify the date range includes the period you’re interested in

Warning about WordPress cron

The dashboard may display a warning recommending a real system cron. This appears when DISABLE_WP_CRON is not set. While the module works with WordPress’s built-in cron, a real system cron provides more reliable aggregation timing. See the Recommendations section.

Database growing too large

If database size is a concern:

  • Reduce the data retention period in Settings
  • The weekly cleanup task will remove data older than the retention period
  • Consider the trade-off between historical data access and storage requirements
Need developer documentation?
See Traffic Analytics Module Developer Documentation for architectural details, class references, and code examples for extending the Traffic Analytics module programmatically.

Comments (0)

← Why Out-of-the-Box WordPress Is Completely Insecure 0 Day Analytics – Traffic Analytics Module Developer Documentation →
Share this page
Back to top