=== Toolszu Analytics ===
Contributors: toolszu
Tags: analytics, statistics, stats, visitors, privacy
Requires at least: 6.3
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPL-2.0+
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Private website analytics in WordPress: visitors, pages, traffic sources, AI referrals, countries, devices, trends and email reports. No cookies.

== Description ==

Toolszu Analytics shows the numbers that matter in a clean dashboard inside WordPress. Your statistics stay in your own database: there is no account to create and no cookies are set. Visitor data is never sent to another service. The only outside connection is the optional download of a location database, described under External services.

It is completely free. Every feature is included, with no paid version.

= Dashboard =
* **Visitors, pageviews, visits, pages per visit, bounce rate and average visit time**, each with the change from the period before.
* **Trend chart** for any of these numbers, by hour, day or month.
* **Compare** with the previous period or the same dates a year earlier.
* **Date ranges**: today, yesterday, last 7, 30 or 90 days, this month, last month, last 12 months or any custom dates.
* **Filters**: click any page, source, country, city, device, browser or campaign to see all statistics for it. Combine as many filters as you like.
* **Sort** every list by any column, and open the full list with search.
* **Live visitors**: see who is on your site right now and which pages they are reading.

= Reports =
* **Pages**: top pages and entry pages, with time on page.
* **Traffic sources**: channels (search, social, AI, referral, email, paid, campaign, direct), sources and referring websites.
* **AI traffic**: visitors sent by ChatGPT, Perplexity, Gemini, Claude, Copilot, DeepSeek, Grok and other AI assistants.
* **Campaigns**: UTM source, medium and campaign.
* **Locations**: countries and cities.
* **Devices**: device type, browser and operating system.
* **Clicks and searches**: outbound links, file downloads, email and phone links, site searches and 404 pages.

= Export and email =
* Download any list or a full report summary as CSV.
* Download every pageview in a date range as CSV.
* Print the dashboard or save it as a PDF.
* Weekly or monthly email reports, sent by your own site.

= Inside WordPress =
* Dashboard widget with the last 7 days.
* Views column in your posts and pages lists.
* Choose which user roles can see statistics.

= Private and fast =
* No cookies, and IP addresses are never stored. Unique visitors are counted with a random key that changes every day.
* The tracking script is about 3 KB, loads after your page and works with cache plugins.
* Logged-in administrators are not counted by default. You can also exclude other roles and IP addresses.
* Bots and crawlers are filtered out.
* Optional: respect Global Privacy Control and Do Not Track.
* Old statistics are deleted automatically after the time you choose.

== External services ==

Countries and cities are optional and turned off until you choose them in **Analytics > Settings**.

When you turn them on, the plugin downloads the free IP to Country Lite or IP to City Lite database from DB-IP (https://db-ip.com) to your site's uploads folder, and downloads the new version once a month. Only the database file is downloaded. No visitor data, IP address or site information is sent to DB-IP: every lookup happens on your own server.

The database is provided by DB-IP under the Creative Commons Attribution 4.0 International License. Database page: https://db-ip.com/db/lite.php. Terms of service: https://db-ip.com/tos.php. Privacy policy: https://db-ip.com/privacy.php.

The plugin connects to no other service.

== Installation ==

1. In WordPress go to **Plugins > Add New**, search for "Toolszu Analytics", then click **Install Now** and **Activate**.
2. Visits are counted from now on. Open **Analytics** in the admin menu to see them.
3. Optional: in **Analytics > Settings**, turn on countries and cities and weekly email reports.

== Frequently Asked Questions ==

= Do I need a cookie banner for this plugin? =
The plugin sets no cookies and stores no IP addresses or other personal data, so many sites do not need consent for it. Rules differ by country, so check what applies to your site. Suggested text for your privacy policy is added to **Settings > Privacy**.

= Why don't I see my own visits? =
Logged-in administrators are not counted. Open your site in a private window to test, or change this in **Analytics > Settings**.

= Does it work with cache plugins and CDNs? =
Yes. Visits are counted by a small script in the browser, so cached pages are counted too.

= How are unique visitors counted without cookies? =
The visitor's IP address and browser details are combined with a random key that changes every day, and turned into a short code. The IP address is never saved. Because the key changes daily, a person who visits on two days counts as two visitors.

= What is a bounce? =
A visit with only one page, where the visitor left within 10 seconds.

= How do I see visits from ChatGPT and other AI assistants? =
Open **Traffic sources** on the dashboard and choose the **AI** tab. AI assistants are also grouped as one channel in the **Channels** tab.

= Can I track campaigns? =
Yes. Add utm_source, utm_medium and utm_campaign to your links. They appear in the **Campaigns** report and decide the channel of the visit.

= Will a large site slow down? =
Each pageview is one small database row. Reports use indexed queries and are cached. On very busy sites, choose a shorter time in **Keep statistics for**.

= What happens when I delete the plugin? =
Deactivating keeps your statistics. Deleting the plugin removes its tables, settings and the location database.

== Screenshots ==

1. Dashboard with summary, trend chart and comparison.
2. Filter by any value, and see AI traffic and cities.
3. Full list with search, sorting and CSV download.
4. Settings: tracking, email reports, access, countries and cities.
5. Weekly email report.
6. Dashboard widget and Views column.

== Changelog ==

= 1.0.0 =
* First release.
