=== Live Traffic Analytics — Real-Time Visitor & Bot Tracking ===
Contributors: bhumi239
Tags: real-time analytics, live visitor tracking, traffic analytics, bot detection, visitor tracking
Requires at least: 5.5
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 2.2.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Real-time visitor tracking, live traffic analytics, user journeys, top pages, and bot detection — all in one lightweight WordPress dashboard.

== Description ==

**Live Traffic Analytics** is a real-time WordPress analytics plugin that shows you who is on your site right now — without a heavy external dashboard. It gives site owners live visitor tracking, traffic analytics, user journey mapping, and automated bot detection directly inside wp-admin.

It is built for websites that want a clean admin experience, custom database tables, and fast live traffic visibility for visitor activity, sessions, page performance, and bot detection.

If you are searching for a WordPress live visitor tracker, real-time traffic analytics plugin, bot detection plugin, or a dashboard to monitor top pages and user journeys, this plugin is built for that exact workflow.

= Why Use Live Traffic Analytics? =

Many website owners want to know:

* who is on the site right now                      
* which pages are getting live traffic
* how visitors move from one page to another
* which traffic may be bot activity
* which pages are performing best

Live Traffic Analytics helps answer those questions directly inside the WordPress admin area with a simple and focused interface.

= Core Features =

* Realtime visitor tracking with IP, country, current page, referrer, browser, and device details.
* Live Activity dashboard for monitoring active visitors and bot classification.
* User Journey tracking to connect multiple page visits into a session path.
* Top Pages analytics to identify the most viewed URLs and recent visits, with a configurable 10/20/30 rows-per-page selector and pagination.
* Bot Analytics summary with detected bot names and traffic ratio insights.
* Realtime world map view for live traffic visualization.
* Visitor Comparison to see today's vs. yesterday's visitor totals with an hour-by-hour comparison chart.
* In-dashboard License page to activate, view, and manage your license without leaving wp-admin.
* Custom database tables for scalable analytics storage.
* Modular architecture designed for future expansion.

= What You Can Monitor =

* Active users currently browsing your website.
* Realtime page activity across important URLs.
* Page-level engagement trends and recent visits.
* Session-based movement from entry page to later steps.
* Referrer traffic sources.
* Device and browser distribution.
* Bot traffic patterns and suspicious automation.
* Geographic traffic distribution through the live map dashboard.

= Built For Performance =

* Uses dedicated custom tables instead of storing analytics in posts or options.
* Optimized queries and indexes for live dashboard views.
* Lightweight polling for near realtime admin refreshes.
* Tracking avoids admin, AJAX, feed, and robot noise where possible.
* Modular code structure for easier maintenance and future feature expansion.

= Privacy and Control =

* Data is stored in your own WordPress database.
* No forced external analytics dashboard.
* Includes nonce validation, capability checks, and sanitized tracking payloads.
* Designed to keep analytics ownership on your website.

= Dashboard Sections =

* Overview
* Live Activity
* User Journey
* Top Pages
* Bot Analytics
* Live Map
* Visitor Comparison

== Installation ==

1. Upload the `live-traffic-analytics` folder to `/wp-content/plugins/`.
2. Activate the plugin through the 'Plugins' screen in WordPress.
3. Open **Traffic Analytics** from the WordPress admin menu.
4. Visit your site in a browser to start generating analytics data.

== Screenshots ==

1. Overview dashboard with live summary cards and charts.
2. Live Activity table with user and bot classification.
3. User Journey view with session path tracking.
4. Top Pages analytics with paginated page insights.
5. Realtime world map with live visitor markers.
6. Bot Analytics panel with detection summary.

== Frequently Asked Questions ==

= What does this plugin track? =
The plugin can track page views, active sessions, visitor countries, referrers, device type, browser family, user journeys, top pages, and bot activity.

= What is the Visitor Comparison feature? =
Visitor Comparison shows today's visitor total against yesterday's, side by side, with a percentage change indicator and an hour-by-hour comparison chart, so you can see whether traffic is trending up or down.

= Is this a live visitor tracker for WordPress? =
Yes. The plugin works as a live visitor tracker and shows active traffic in the WordPress dashboard using recent activity data from your own site.

= Is this a realtime analytics plugin for WordPress? =
Yes. The admin dashboard refreshes automatically, so you can monitor active sessions, live activity, top pages, and bot traffic in near realtime.

= Does it work on localhost? =
Yes, but localhost traffic commonly uses private IP addresses such as `127.0.0.1` or `::1`, so country and map data may appear as unknown during local testing.

= Does the plugin use custom database tables? =
Yes. The plugin stores analytics data in dedicated custom tables for activity, sessions, and page statistics.

= Which database tables does the plugin create? =
The plugin uses dedicated tables for activity logs, session paths, and page statistics so analytics queries stay separate from standard WordPress content tables.

= Can I see the most visited pages? =
Yes. The Top Pages section shows page URLs, total views, and latest visit timestamps, with a 10/20/30 rows-per-page selector and pagination so you can browse large sites comfortably.

= Can I track user journey or visitor path flow? =
Yes. The User Journey section groups multiple page visits into a session path so you can understand how visitors move through your website.

= Does this plugin show referrer and source traffic? =
Yes. Live activity and session tracking can include referrer data when it is available from the visitor request.

= Is the data shown in real time? =
The admin dashboard uses lightweight refresh requests to show near realtime analytics updates.

= Can it detect bots? =
Yes. The plugin includes bot detection using user-agent checks and suspicious request pattern scoring.

= What kind of bots can it detect? =
The plugin can identify common bots through user-agent patterns and can also flag suspicious automated traffic based on repeated request behavior.

= Can I use this plugin instead of a large analytics platform? =
It depends on your needs. Live Traffic Analytics is useful for lightweight realtime visibility inside WordPress, but full enterprise analytics platforms may still offer broader reporting, attribution, and historical analysis.

= Will it slow down my site? =
The plugin is designed to be lightweight and uses optimized storage and scoped tracking, but every analytics system adds some overhead. It is best practice to test on your own hosting stack before production rollout on very high traffic sites.

= Does the plugin track wp-admin visitors? =
No. The tracking flow avoids admin requests and other noisy request types where possible to keep analytics cleaner.

= Why does the live map show limited location detail? =
The plugin is designed to remain lightweight and privacy-conscious. On some environments, exact latitude and longitude precision may depend on the hosting or proxy headers available to WordPress.

= Is this plugin suitable for blogs, business websites, and ecommerce stores? =
Yes. It can be useful for blogs, agency sites, company websites, landing pages, and ecommerce stores that want lightweight live analytics inside WordPress.

= Can developers extend this plugin later? =
Yes. The plugin uses a modular structure with separate admin, public, and include layers, which makes future feature expansion easier.

= Where can I view the analytics after activation? =
After activating the plugin, open the **Traffic Analytics** menu in WordPress admin. Visit a few frontend pages first if you want to immediately generate test data.

== Changelog ==

= 2.2.0 =
* Improved: Active Users, Page Views, and Sessions metrics on the Overview tab are more stable and now link straight through to their detail tab.
* Fixed: Bot Ratio tracking now shows accurate, real-time data for every user instead of only Pro accounts.
* Improved: Unique Visitors tracking, with a quick link from the Overview tab to the Visitor Comparison view.
* Redesigned: Settings moved from a popup into its own dedicated Settings tab.
* Added: Database usage indicator in Settings, showing real-time storage used by the plugin's own tables.
* Added: "Reset Data" option in Settings to permanently clear all tracked analytics data, with admin-only permissions and a confirmation step.
* Improved: License activation is now a direct field in the License tab instead of a popup, and reactivating a license after deactivating one is more reliable.
* Fixed: An admin-notices layout issue that could push unrelated WordPress notices into the plugin's dashboard.

= 2.1.4 =
* Fix: Minor CSS and JS improvements for smoother transitions.

= 2.1.3 =
* Improved : UI Design for dashboard.
* Fix: Minor CSS and JS improvements for smoother transitions.

= 2.1.0 =
* Added configurable dashboard refresh and visitor heartbeat intervals.
* Added Settings popup directly inside the analytics dashboard header.
* Improved dashboard spacing, card padding, table alignment, and responsive layout polish.
* Improved live activity visibility window so longer heartbeat intervals keep active visitor data consistent.

= 2.0.0 =
* Added advanced live traffic analytics dashboard experience.
* Added Live Activity tracking with browser, device, referrer, and time-on-page data.
* Added User Journey session path tracking.
* Added Top Pages analytics with improved table presentation.
* Added bot detection and bot analytics summary.
* Added realtime world map visualization.
* Added custom analytics tables for activity, sessions, and page stats.
* Improved admin design, pagination, and dashboard structure.
* Hardened request validation and tracking abuse protection.

= 1.1.0 =
* Added expanded analytics foundation and modular plugin structure.

= 1.0.4 =
* Initial lightweight live visitor tracking release.

== Upgrade Notice ==

= 2.2.0 =
Fixes Bot Ratio showing 0% for free-tier accounts, moves Settings into its own tab with a new database usage/reset data option, and improves License activation reliability.

= 2.0.0 =
Adds Live Activity, User Journeys, Top Pages, Bot Analytics, and the realtime map. Back up your site before upgrading from 1.x.
