=== smartEngin Analytics ===
Contributors: businesskiai
Tags: analytics, statistics, visitors, privacy, ai
Requires at least: 6.8
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Cookie-free visitor statistics that show where visitors come from: Google, ChatGPT and other AI assistants, social media, links or direct.

== Description ==

**Do your visitors still come from Google – or already from ChatGPT?** smartEngin Analytics counts the visitors of your website and shows, above all, *where they come from*: classic search engines, AI assistants such as ChatGPT, Claude, Perplexity, Gemini or Copilot, social media, other websites – or direct.

Everything runs on your own website. No cookies, no IP addresses in the statistics, no data sent to the plugin author or anyone else. Install, activate – counting starts right away.

More than counting: broken links, loading time of real visitors, purchases by source and a security log – in one plugin.

= What you see =

**Visitors and sources**

* Visitors, page views, time on page, bounces and live visitors, with a trend chart whose tiles switch the lines on and off.
* Search engines, AI assistants, social media and other websites, each with its own list, plus entry pages per source.
* **Read by AI:** which AI service fetched which page – for an answer, for its search index or for training – recognised by the program names the services publish.
* Countries as a list and on a world map, devices, browsers (including in-app browsers such as Facebook or Instagram) and operating systems.
* New and returning visitors – only with consent in your cookie banner.
* Campaign links (UTM) with a link builder: visitors and orders per newsletter, post or ad.

**Content and clicks**

* Pages with reading depth (how far down a page is read on average), entry and exit pages.
* Internal search terms, including searches that found nothing.
* Clicks on buy buttons, outbound, e-mail and phone links and downloads – counted automatically – and a list of every link.

**Technical health**

* Broken links in posts, pages, menus, block theme templates, Elementor (also Theme Builder and popups) and WooCommerce products – with an edit link and a jump to the spot. Links to other websites only after you switch that on.
* Loading time of real visitors (Core Web Vitals: LCP, INP, CLS and server response), measured by the visitors' browsers, phones and desktops apart.
* Pages not found (404) and the websites that link to them.

**Shop**

* Purchases by source from WooCommerce and smartEngin Licence & buy: which source, entry page and campaign led to a paid order. Refunds and cancellations are taken into account; your own test purchases are not counted.

**Security**

* A security log: failed and successful logins at any login form, probes for vulnerable files, comment spam – with country, map and a verdict (bot, attack, unclear). It only records, it never blocks.

**Reports**

* A weekly report by e-mail (off by default), CSV export and a help tab that explains every setting in plain words.

= Privacy =

* No cookies for counting.
* No IP addresses in the visitor statistics: the address is used only at the moment of the visit (country, bots, combining page views) and then dropped. Single visits are deleted after two days.
* Only with consent in the cookie banner, the visitor's browser keeps the date of the first visit (no identifier) to tell new from returning visitors. Consent is recognised from the WP Consent API, Google Consent Mode and the cookies of GDPR Cookie Compliance, Complianz, Cookiebot, CookieYes and Borlabs Cookie – or from a cookie you name.
* The security log keeps IP addresses for 30 days (adjustable), then blanks them.
* A suggested text for your privacy policy is added to WordPress' privacy policy guide.
* Speed: one small script (about 3 KB compressed, deferred, no inline code), sent after the page has loaded.

= smartEngin Analytics Pro =

An optional add-on, sold separately on [smartengin.de](https://smartengin.de/smartengin-analytics/), adds loading time per page, reading depth split into quarters, paths through the website, Google Search Console, AI visibility per page, a monthly report with recommended actions, alerts and the take-over of data from other statistics plugins. The free plugin does not need it and shows everything it records.

== External services ==

This plugin connects to other servers only in the following cases:

* **Country list from DB-IP.** To tell which country a visit comes from, the plugin uses the free "IP to Country Lite" list by DB-IP. It is downloaded only after you click "Load the country list now" (in the Dashboard where the world map appears, or under Settings → Countries), then once a month to stay current (can be switched off). The plugin requests the file https://download.db-ip.com/free/dbip-country-lite-YYYY-MM.csv.gz; no data about your website or your visitors is sent – only the request itself (your server's IP address, as with any download). The list is licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). DB-IP terms of use: https://db-ip.com/tos.php – privacy policy: https://db-ip.com/privacy.php
* **Broken link check – links to other websites (off by default).** By default the link check only asks your own website. Only if you switch on "Also check links to other websites" (Settings → Clicks and links) does the plugin request the addresses on other websites that your own posts, pages, menus and templates link to (a short HEAD request, or a GET request limited to 2 KB), at most 3 per website and run, in the background and when you click "Check now". The request identifies itself as "smartEngin Analytics link check"; it contains neither your website address nor any visitor data. Which websites are contacted depends only on the links on your website.
* **E-mail reports.** The weekly report (off by default) is sent through WordPress' own wp_mail() to the addresses you enter.

The plugin links to smartengin.de (the logo, the tab "Pro"); these are plain links, nothing is loaded from there. The world map is drawn from Natural Earth data (public domain, https://www.naturalearthdata.com/), shipped with the plugin.

== Installation ==

1. In your WordPress admin go to Plugins → Add New, search for "smartEngin Analytics", click "Install Now" and then "Activate".
2. Counting starts right away. Administrators and the IP address of the person who activated the plugin are not counted.
3. Open "Analytics" in the admin menu. To see countries, click "Load the country list now" where the world map appears.

First steps (optional): exclude your own devices (Settings → Counting → "Do not count this browser"), switch on the weekly report, and on sites with few visitors set up a real cron job at your host (Settings → Background processing shows the address).

== Frequently Asked Questions ==

= Does it set cookies? =

Not for counting. Visits are recognised by a hash of a daily random key, the IP address and the browser identification; the key changes every day, so visits cannot be linked across days. Only with consent does the browser keep the date of the first visit.

= Do I need a cookie banner for it? =

That depends on your country and your website, and we cannot give legal advice. The plugin is built to count without cookies and without storing IP addresses, and it adds a suggested text to WordPress' privacy policy guide (Settings → Privacy).

= Where does the data go? =

Nowhere. Everything stays in your WordPress database. See "External services" for the only connections to other servers.

= Which AI services are recognised? =

Visits: ChatGPT, Claude, Perplexity, Gemini, Copilot, Meta AI, DeepSeek, Grok and You.com (by the website they come from). Read by AI: the published fetchers of ChatGPT, Claude, Perplexity, Google (NotebookLM, Google-Agent, Vertex AI), Meta AI, Mistral, Amazon (Alexa) and DuckDuckGo. Gemini and Copilot have no fetcher of their own.

= Why do many visitors from AI apps show up as "Direct"? =

Many apps do not tell the website where a visitor came from. Campaign links (UTM) make such visits visible – the dashboard has a link builder.

= Why do my numbers differ from Google Analytics? =

Every tool counts differently (cookies, bot filters, ad blockers). Compare trends over time, not single numbers between tools.

= Does it work with page caching? =

Yes, cached pages are counted. Only "Read by AI" is counted on the server and misses cached pages; the dashboard says so when a cache plugin is active.

= Are bots counted? =

No. Programs that identify as crawlers, monitors or test tools are filtered out. AI fetchers are shown separately under "Read by AI".

= Does the security log block attackers? =

No, it only records. Blocking belongs in front of WordPress – at your host or in a security plugin.

= What happens to the data when I delete the plugin? =

They are kept by default. To remove everything, switch on Settings → Data → "Delete all statistics when the plugin is uninstalled" before deleting the plugin.

= Is the plugin available in my language? =

Written in English; translations come from the community on translate.wordpress.org.

== Screenshots ==

1. Dashboard: visitors and where they come from – search engines, AI assistants, social media, other websites, direct.
2. Read by AI: which AI service fetched which pages, and why.
3. Countries as a list and on a world map, new and returning visitors.
4. Tab Technical: broken links with where they are, and pages not found (404).
5. Tab Security: login attempts, probes and spam – recorded, never blocked.
6. Tab Security: attacks by country on the world map.

== Changelog ==

= 1.0.2 =
* Read by AI: also recognises Meta AI, Mistral, Amazon (Alexa) and DuckDuckGo.
* AI fetchers of a missing page no longer count as 404.

= 1.0.1 =
* First release on wordpress.org.
