=== Visitor Tracker ===
Contributors: repflow
Tags: analytics, visitor tracking, statistics, admin, location
Requires at least: 5.8
Tested up to: 6.7
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Lightweight visitor analytics for WordPress. Track visits, locations, devices and user session paths — directly in your admin panel.

== Description ==

**Visitor Tracker** gives you real-time visitor analytics without leaving WordPress admin. No Google Analytics account needed, no external dashboards, no data leaving your server.

= Features =

* 📊 **Dashboard** — daily pageview chart, unique IPs, sessions, logged-in users
* 🌍 **Geolocation** — country flag, city, ISP for every visit (via ip-api.com, cached 24h)
* 📱 **Device detection** — desktop / mobile / tablet + browser + OS
* 🔍 **Session paths** — click any IP to see the full journey: which pages they visited and how long they spent on each
* 🔗 **Traffic sources** — where visitors come from
* 🔝 **Top pages** — which content gets the most views
* 🗑 **Data management** — delete by IP, date range, path, or age. GDPR-friendly retention settings
* ⚙️ **Configurable** — exclude roles, paths, set data retention period
* 🚀 **Lightweight** — no external JS, no tracking pixels, server-side only

= No cookies, no frontend scripts =

Visitor Tracker records visits server-side on the `wp` hook. It adds no JavaScript to your frontend and sets no cookies.

= Privacy =

Geolocation is performed by a request to **ip-api.com** (free tier, HTTP). IP addresses are stored in your own database. Configure data retention in Settings (default: 90 days).

== Installation ==

1. Upload the plugin to `/wp-content/plugins/visitor-tracker`
2. Activate it in **Plugins → Installed Plugins**
3. Go to **👁 Visitors** in your admin menu

No configuration needed — tracking starts immediately after activation.

== Frequently Asked Questions ==

= Does it slow down my website? =

No. Geolocation results are cached for 24 hours per IP. The database insert is a single lightweight query.

= Does it work with caching plugins? =

Yes, because tracking happens on the server (`wp` hook), not in frontend JavaScript.

= Is it GDPR compliant? =

You control all data — it stays in your own database. Set a retention period (e.g. 90 days) to auto-delete old records. You should mention visitor tracking in your privacy policy.

= Can I see which pages a specific visitor browsed? =

Yes — click the 🔍 icon next to any IP to see the full session path with time spent on each page.

== Screenshots ==

1. Main dashboard — cards, daily chart, top pages, countries, devices
2. Detailed visit table with geolocation and session path viewer
3. Session path modal — full visitor journey
4. Data management — granular delete options

== Changelog ==

= 1.0.0 =
* Initial release

== Upgrade Notice ==

= 1.0.0 =
Initial release.
