=== JG Website Analytics – Privacy-First Visitor Stats & Real-Time Traffic ===
Contributors: StuartCole
Tags: website analytics, analytics, statistics, visitor tracking, privacy
Requires at least: 5.7
Tested up to: 7.1
Requires PHP: 7.2
Stable tag: 2.9.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Privacy-first website analytics for WordPress. Real-time visitors, page, referrer and country stats in your dashboard. No cookies, no third parties.

== Description ==

**JG Website Analytics is a complete website analytics platform that runs entirely inside your own WordPress dashboard.** No external account, no data sharing, no monthly fee — every visit is recorded in your own database and stays there.

Most website analytics tools are third-party scripts, so ad blockers and privacy browsers silently drop a slice of your traffic before it is ever counted. JG Website Analytics records pageviews from your own domain, so your website analytics reflect the visitors you actually had.

Activate the plugin and it starts recording immediately. There is nothing to configure, no tracking ID to paste in, and no account to create.

= Website analytics features =

* **Real-time visitors** — see who is on your site *right now*, which page they are reading and where they arrived from.
* **Traffic graph** — visitors and pageviews over today, this week, this month, 3 months, 6 months or any custom date range.
* **Top pages and landing pages** — find out which content actually earns your traffic.
* **Referrer reports** — see which sites, search engines and campaigns send you visitors.
* **Country, region and city reports** — built-in GeoIP, resolved locally on your own server.
* **Device, browser and screen-resolution breakdowns** — know what you are designing for.
* **Visitor journey (Sankey) chart** — follow the path visitors take through your site, page by page.
* **Bot and crawler filtering** — automated traffic is scored and separated so your website analytics show real people.
* **WooCommerce analytics** — the same visitor reporting across every product and shop page.
* **Sortable, filterable data tables** — drill into any dimension and every other report follows the filter.
* **Fully responsive dashboard** — the reports work on a phone as well as they do on a desktop.

= Everything stays on your server =

Your website analytics data is written to your own WordPress database and is never transmitted anywhere. The plugin does not call out to an analytics service, does not load scripts from a CDN, and has no account layer between you and your statistics. If you delete the plugin, you delete the data — nobody else has a copy.

= Privacy by design =

* **No IP addresses are stored.** The visitor IP is used in memory to resolve an approximate country, region and city, then discarded.
* **No cookies.** A random session ID is kept in the browser (localStorage) for 30 minutes so multiple pageviews can be joined into one visit. It is not linked to a person and expires on its own.
* **No cross-site tracking, no fingerprinting, no advertising profiles.**
* **No third-party requests** while tracking. Nothing about your visitors leaves your server.

This makes JG Website Analytics a straightforward option for sites that need to keep visitor data inside their own infrastructure.

= Real-time visitors =

Find out exactly how many people are on your website with the live visitor panel. It updates continuously and shows the page each visitor is currently on, the referrer that brought them, and their location. Most analytics services can only tell you who was active over the last few minutes — this shows you now.

= A self-hosted alternative to Google Analytics =

If you are looking for a Google Analytics alternative that does not send your visitor data to a third party, JG Website Analytics gives you the reports most site owners actually open — visitors, pageviews, top pages, referrers, countries and devices — without the property setup, the reporting interface or the data-retention rules. Reports load in the WordPress admin, so there is no second service to log in to.

= WooCommerce analytics =

JG Website Analytics reports on every page of your WooCommerce store as well as your blog and marketing pages, so you can see which products attract traffic, which referrers send buyers, and where shoppers land first.

= Bot and crawler detection =

Automated traffic — scrapers, uptime monitors, AI crawlers and headless browsers on cloud hosting — is scored per pageview and excluded from your reports by default, so your website analytics are not inflated. A "Show Bots" toggle on the main graph plots the excluded traffic as its own line, so you can still see how much automated load your server is carrying.

= Roadmap and support =

The development roadmap is published at https://jumpinggiraffe.com/website-analytics-wordpress-plugin-roadmap/

Found a bug, or want to suggest a feature? Please get in touch at https://jumpinggiraffe.com/contact/ — every report helps make the plugin better.

== Installation ==

= From your WordPress dashboard =

1. Go to **Plugins → Add New** and search for "JG Website Analytics".
2. Click **Install Now**, then **Activate**.
3. Open **Website Analytics** in the admin menu — tracking starts immediately.

= Manual installation =

1. Upload the `jg-website-analytics` folder to `/wp-content/plugins/`.
2. Activate the plugin through the **Plugins** menu in WordPress.
3. Open **Website Analytics** in the admin menu.

There is no configuration step. The plugin begins recording visitors as soon as it is activated.

== Frequently Asked Questions ==

= Do I need a Google Analytics account, or any other account? =

No. JG Website Analytics is entirely self-hosted. There is no account, no tracking ID and no external service — your statistics are generated from your own database.

= Is it really free? =

Yes, and it always will be. There is no premium tier holding features back.

= Where is my website analytics data stored? =

In your own WordPress database, in tables created by the plugin. Nothing is sent to Jumping Giraffe or to any other company.

= Does the plugin use cookies? =

No cookies are set. A random session ID is stored in the visitor browser using localStorage for 30 minutes so that several pageviews can be grouped into a single visit. Storing an identifier on a visitor device may still require consent in some jurisdictions, so please check your own legal obligations.

= Do you store visitor IP addresses? =

No. The IP address is used in memory to look up an approximate country, region and city, and is then discarded. It is never written to the database.

= Will it slow my site down? =

The front-end tracker is a small JavaScript file that runs after your page has loaded, and it writes to your database with a single lightweight request. There is no third-party script, no external DNS lookup and no render-blocking asset.

= Does it work with caching plugins? =

Yes. Tracking happens in the browser after the page is served, so cached pages are still recorded correctly.

= Does it work with WooCommerce? =

Yes. WooCommerce product, category, cart and checkout pages are reported alongside the rest of your site.

= Does it count bots and crawlers? =

Bot traffic is detected, scored and excluded from your reports by default. You can plot it as a separate line on the main graph if you want to see it.

= Can I see who is on my site right now? =

Yes. The live visitor panel shows current visitors, the page each one is viewing, and where they came from.

= What happens to my data if I uninstall the plugin? =

Deleting the plugin removes its data from your database. Because nothing was ever shared, there is no copy anywhere else.

== Screenshots ==

1. Live visitors currently on the site with the page they are viewing and where they came from, above the main traffic graph showing the last 30 days.
2. Country, device and browser breakdowns, plus sortable tables of every referrer and every page landed on or viewed internally.

== Changelog ==

= 2.9.1 =
* Fix an upload bug.

= 2.9.0 =
* You now have the option to display visitor data from other sites you own on the same graph. (You need plugin JG Sync for this).

= 2.8.0 =
* New "Show Bots" toggle on the main graph — plots suspected bot pageviews as a separate line so you can see excluded traffic without it distorting your stats.
* Compare other sites you own on the same graph, using JG WP Sync to fetch their visitor counts. Optional, off until you tick a site, and only a count of visitors per day or hour ever leaves a site.
* Graph axis labels are now generated in one place and shared by every series, so lines can no longer drift out of alignment.
* Fixed the Today view plotting its hours in reverse, so the busiest hour is no longer shown at the opposite end of the day.

= 2.7.0 =
* Reworked bot detection: pageviews are now scored on the page that was requested rather than on the tracker request, which fixes JavaScript-executing bots being counted as real visitors.
* New datacentre and cloud-hosting detection — traffic from server address space is scored separately from consumer VPN traffic. IP addresses are still never stored.
* Fixed a PHP 8 deprecation notice in the cached database result helper.
* Replaced a window function in one report query so the plugin works on MySQL 5.6 and later.
* Restored visitor tracking on browsers where the previous beacon method was being dropped.

= 2.6.0 =
* GeoIP database downloads are now streamed to disk instead of being buffered in memory, so the download works on low-memory hosts.

= 2.3.0 =
* New live-visitor heartbeat: the visitor list now reflects a one-minute activity window instead of showing people who left several minutes ago.
* Session rows are tidied up automatically after 24 hours.

= 2.1.1 =
* Added a GeoIP database download button to the Settings tab.

Earlier releases are listed at https://jumpinggiraffe.com/product/website-analytics/

== Upgrade Notice ==

= 2.8.0 =
Fixes the Today graph being drawn in reverse. Adds an optional bot-traffic line and, if you run JG WP Sync, optional comparison lines from your other sites. No database changes.

= 2.7.0 =
Important bot-detection fix — inflated visitor counts caused by JavaScript-capable bots are corrected. Upgrade recommended.
