Version 1.0.0 · Requires WordPress 6.3+ and PHP 7.4+ · GPLv2 or later · by 007AJ
Privacy-first visitor statistics stored in your own WordPress database. No cookies, and no outside requests while counting visits. Every feature works as soon as the plugin is installed. There is nothing to register and no account to create.
007aj-analytics-traffic-expert-1.0.0.zip and click Install Now.tlh_).Multisite networks are not supported.
| Mode | How | When to use |
|---|---|---|
| Script to REST API (default) | A small script (about 3 KB, no cookies) sends one request to /wp-json/traffic-expert/v1/hit after the page loads. | Most sites. Works with page caches and CDNs. |
| Script to admin-ajax.php | Same script, sent to wp-admin/admin-ajax.php. | When a security plugin or host blocks the REST API. |
| Server | Counted in PHP while the page is generated. No script is needed to count page views. | Sites without page caching. Pages served from a cache are not counted in this mode. |
Own endpoint address: enter a neutral word (for example pulse) to add a second endpoint such as /wp-json/pulse/v1/hit. Content blockers are less likely to block it.
Each page request is signed with a site-specific key, so the endpoint rejects forged page types.
Robots and crawlers, headless browsers and automation tools (Puppeteer, Playwright, Selenium, PhantomJS), uptime monitors, command-line clients, browser prefetch and prerender, Do Not Track and Global Privacy Control signals, logged-in users (unless enabled), excluded roles, addresses and ranges (CIDR or wildcard), pages (wildcards allowed), countries (exclude list or include-only list), “not found” pages and feeds. A daily view limit (default 200) stops counting visitors that behave like robots. Excluded hits are counted by reason under Tools.
Every report has a period picker (today, yesterday, 7/28/30/90 days, this or last month, last 12 months, this year, all time, or your own dates) and a Compare with previous period option. Click any value in a location, device, source or campaign table to filter the reports by it. Filters appear as chips you can remove.
| Screen | Contents |
|---|---|
| Overview | Visitors, views, views per visit, bounce rate, average visit length with change against the previous period. Traffic chart, top pages, channels, referring sites, search engines, countries, devices, browsers, busiest hours, all-time totals, online count. |
| Realtime | See Realtime. |
| Visitors | Every visitor with time, location, source, device, entry page and views. Open one to see its path through the site and its events. |
| Pages | Most viewed pages by content type, home page, site searches and “not found” pages; entry and exit pages with bounce rate; a chart for any single page. |
| Sources | Source categories: Direct, Organic search, Paid search, Organic social, Paid social, AI assistants, Email, Other campaigns, Referral. Referring sites, search engines, social networks, AI assistants (ChatGPT, Perplexity, Gemini, Claude, Copilot, DeepSeek, Grok, Mistral, Meta AI, You.com, Phind), paid search, search words, and searches made on your own site. |
| Locations | Countries, continents, cities, regions, European Union countries, US states, browser languages. |
| Devices | Device types (desktop, mobile, tablet, TV, console), browsers, browser versions, operating systems, device models. |
| Content | Authors, content types, categories, tags and every public custom taxonomy, with items viewed, views, visitors and views per item. |
| Campaigns | UTM campaigns with source, medium, visitors, views and bounce rate; tables for source, medium, content and term; the link builder. |
| Goals & Events | Goal conversions, outbound links, downloads and custom events. |
Search words: most search engines (including Google) hide what people searched for. Words appear only when the engine passes them on.
Shows visitors online now, visitors and views today, views per minute for the last 30 minutes, and who is online (current page, location, source, device, views, last activity). It refreshes every 15 seconds while the page is open and pauses when the browser tab is hidden.
Clicks on links to other sites and on files with the listed extensions (Settings > Tracking) are recorded automatically.
trafficExpert.track( 'signup', 'footer form' );
Under Goals & Events > Set up goals, add a name, choose when it counts (a page is viewed, an outbound link is clicked, a file is downloaded, a custom event is sent), enter the address or event name (* is a wildcard, for example /thank-you* or *.pdf) and an optional value. A goal counts once per visitor per day. Reports show conversions, conversion rate and total value. Clear a goal's name to remove it.
Visits with utm_source, utm_medium, utm_campaign, utm_term or utm_content in the address are grouped under Campaigns. The Campaign link builder creates a tagged link from a page address and your values, and lets you copy it. Paid traffic is recognised from utm_medium values such as cpc, ppc, paid or display, and from ad click IDs (gclid, msclkid).
Under Email Reports & Export:
Emails are sent with WordPress's own mail function on WP-Cron at about 08:00 site time. If your host blocks PHP mail, use an SMTP plugin. On low-traffic sites WP-Cron runs only when someone visits, so you may want a real server cron job that calls wp-cron.php.
Choose a dataset (daily totals, pages, visits, source categories, referring sites, search engines, countries, cities, browsers, operating systems, device types, authors, campaigns, goals, outbound links, downloads), a period and a format: CSV, TSV, XML or JSON. Values that spreadsheets could read as formulas are made safe.
Turn on “Allow public statistics” under Settings > Display (on by default). Then use any of the following:
[traffic_expert stat="visitors" range="today" label="Visitors today:"]stat | Shows |
|---|---|
| visitors | Visitors in the period |
| views | Views in the period |
| online | Visitors online now |
| post_views / post_visitors | Views or visitors of the current page (or post_id="123") |
| top_pages | Most viewed pages list (limit="5") |
| summary | Table: today, 7 days, 30 days, all time |
range accepts: today, yesterday, 7d, 28d, 30d, 90d, this_month, last_month, 12m, this_year, all.
| Tab | Options |
|---|---|
| Tracking | Tracking mode; own endpoint address; count logged-in users; outbound links; downloads and file types; address parameters to keep (others are removed from stored addresses); online minutes; location matching. |
| Privacy | Visitor addresses (do not store / store with last part removed); Do Not Track; Global Privacy Control; consent (count without asking, or wait for consent through the WP Consent API) and consent category. |
| Exclusions | Roles; addresses and ranges; pages; excluded countries; count-only countries; not-found pages; feeds; prefetch; daily view limit; extra robot names. |
| Display | Toolbar; dashboard widgets; mini charts (measure, style, days, colour); public statistics. |
| Access | Roles that can view statistics. Administrators always can, and only administrators change settings. |
| Data | Keep visit details for N days; keep daily totals for N days; delete all data when the plugin is deleted. |
REMOTE_ADDR) is used; forwarded headers are ignored unless a developer supplies the address through the traffic_expert_visitor_ip filter.The plugin makes no outside request while counting visits and never contacts 007aj.com.
DB-IP Lite (db-ip.com). Only when an administrator presses Download database under Tools, the plugin downloads one file from https://download.db-ip.com/free/ (the current month's dbip-city-lite or dbip-country-lite .mmdb.gz, falling back to the previous month). Only a normal file download request is sent: your server's address and WordPress's user agent. No visitor data is sent. The file is stored at wp-content/uploads/007aj-analytics-traffic-expert/geo.mmdb. Terms: db-ip.com/db/lite.php. Privacy: db-ip.com/about/privacy.php. Data licence: Creative Commons Attribution 4.0, “IP Geolocation by DB-IP”.
Our privacy policy: 007aj.com/privacy.
Read-only reports for users who can view statistics (log in, or use application passwords):
GET /wp-json/traffic-expert/v1/report/{summary|series|pages|group|content|campaigns|goals|events|online}
?range=30d | &range=custom&from=2026-01-01&to=2026-01-31
&by=country (group: any column; content: author|post_type|taxonomy; events: click|download|custom)
&limit=10
Public tracking endpoints: POST /hit, POST /event.
trafficExpert.track( name, value ); // custom event trafficExpert.page(); // count a new page view in single-page apps
| Hook | Purpose |
|---|---|
traffic_expert_visitor_ip | Change the address used (for example behind a trusted proxy). |
traffic_expert_is_bot | Override robot detection (bool, user agent). |
traffic_expert_exclusion_reason | Return a reason string to exclude a hit. |
traffic_expert_search_engines, traffic_expert_social_networks, traffic_expert_ai_assistants | Extend source detection. |
traffic_expert_geo_lookup | Supply or adjust location data. |
traffic_expert_visitor_row | Adjust a visitor row before it is saved. |
traffic_expert_online_window | Minutes a visitor counts as online. |
traffic_expert_digest_body | Change the email report body. |
traffic_expert_hit_recorded, traffic_expert_excluded, traffic_expert_goal_converted, traffic_expert_purged, traffic_expert_loaded | Actions. |
Each view writes to a raw table plus a compact daily-totals table, and most reports read the daily totals. All tables are indexed for the queries they serve. A nightly job removes stale online rows and applies retention. For very busy sites, set a retention period (for example 180 days). Daily totals keep long-term charts working.
Disabling keeps all data. Deleting keeps all data unless you first tick Settings > Data > Delete all statistics and settings when the plugin is deleted. If you tick it, deleting the plugin removes the tables, the options, the scheduled jobs, the location file and the capabilities it added.
Download the location database under Tools. It applies to new visits.
The script loads deferred and sends one small request per page. Reports run only in the admin.
Yes.
Charts: Chart.js 4.4.6 (MIT licence), bundled locally. Location data: IP Geolocation by DB-IP (db-ip.com), CC BY 4.0, downloaded on request.