=== Agent Radar — AI Traffic & Revenue for WooCommerce ===
Contributors: limalabs
Tags: ai, woocommerce, chatgpt, geo, analytics
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.9.14
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

See which AI agents visit your store, which products they look at, and how much revenue AI traffic really generates.

== Description ==

**ChatGPT visited your store this week. Do you know what it looked at?**

AI agents (GPTBot, ClaudeBot, PerplexityBot, Gemini and 30+ more) are crawling your site right now — and AI platforms are sending you human buyers. Google Analytics shows you none of this clearly. Agent Radar does.

**Works on ANY WordPress site** — blogs, business sites, portfolios. WooCommerce is optional: when active, Agent Radar also attributes orders and revenue to AI traffic.

= Free — everything you need to SEE =

* **AI bot detection**: every visit from 35+ known AI crawlers, search indexers and live assistants, classified by company and intent.
* **Humans sent by AI**: visitors arriving from ChatGPT, Perplexity, Gemini, Copilot, Claude and more.
* **Per-order AI attribution**: which exact orders came from which AI platform, with landing page — all stored in your own database.
* **Revenue from AI traffic**: total orders and revenue attributed to AI referrals (WooCommerce).
* **Products AI looks at most** — know what the machines are recommending.
* **GEO Score**: an AI-visibility audit (robots.txt, schema, sitemap, freshness…) with concrete fixes — SEO-plugin style, but for ChatGPT, Perplexity and Gemini.
* **Retroactive import**: scans your existing server logs so you see your history seconds after installing, not in two weeks.
* **Analytics data stays in YOUR database.** Unlimited history, no data caps, no account required.
* Dashboard widget with your weekly AI summary. Interface available in English and Spanish.

= Pro — everything you need to ACT =

* GEO score history over time.
* CSV export and weekly email reports.
* Alerts when a new AI agent discovers your store.

= Why store owners install it =

AI-referred traffic to retail grew +393% in a year and converts better than average — but most stores have zero visibility on it. Agent Radar answers, inside wp-admin: *is AI bringing me money?*

== External Services ==

This plugin uses the **Freemius SDK** for licensing, upgrades and (optional) usage diagnostics. **No data is sent to Freemius unless you explicitly opt in** on the activation screen; if you skip the opt-in, the plugin works fully with no external connections. Payments for Pro are processed by Freemius as merchant of record. See the [Freemius privacy policy](https://freemius.com/privacy/).

The GEO audit performs one HTTP request to **your own website** (yourdomain.com/robots.txt) — no third-party service is involved.

All traffic analytics are stored exclusively in your own WordPress database.

== Installation ==

1. Install and activate.
2. Open **Agent Radar** in the admin menu.
3. Click **Scan server logs now** to import your history instantly (where the host exposes logs).

== Frequently Asked Questions ==

= Does it slow down my site? =
No. Detection is a fast user-agent check on frontend GET requests, with an early-exit prefilter and rate limiting. Data is written to one indexed table in your own database, and dashboard queries are cached.

= Where is my analytics data stored? =
In your own WordPress database. Analytics never leave your server. (Freemius licensing data is only sent if you opt in — see External Services.)

= What cookies does it set? =
Two first-party cookies, only for visitors arriving from an AI platform: `agent_radar_src` (which AI sent the visitor, 30 days, used for order attribution) and `agent_radar_seen` (session, prevents double-counting). Neither contains personal data.

= Does it work without WooCommerce? =
Yes — you get all traffic analytics and the GEO Score. Revenue attribution activates when WooCommerce is present.

= How long is data kept? =
90 days by default, with old rows pruned automatically. Change it with the `agent_radar_retention_days` filter (0 = keep forever).

= GDPR? =
Agent Radar does not store visitor IPs or personal data. AI bot visits are not personal data; human AI-referral visits are logged as an aggregate counter plus the first-party cookies described above.

= Which fonts does it use? =
Space Grotesk and IBM Plex Mono, bundled locally (SIL Open Font License). Nothing is loaded from external CDNs.

== Screenshots ==

1. The Agent Radar dashboard: live radar, KPIs and AI activity over time.
2. GEO Score — the AI-visibility audit with actionable fixes.
3. Who is visiting: AI agents ranked by activity, with live-assistant badges.
4. AI revenue attribution for WooCommerce orders.

== Changelog ==

= 0.9.14 =
* WooCommerce is now optional instead of required. Agent Radar installs and runs on any WordPress site (AI traffic analytics + GEO Score); revenue attribution activates automatically when WooCommerce is present.

= 0.9.13 =
* Display name now leads with the product brand: Agent Radar — AI Traffic & Revenue for WooCommerce (by Lima Labs).
* Expanded readme tags so store owners searching for GEO, Perplexity, Gemini or bot detection can find the plugin.

= 0.9.12 =
* Fixed: the "Try Pro free" and other gradient buttons now always render white text (a link color rule could override it).
* Refreshed listing banner artwork (sharper radar, consistent with the animated icon).

= 0.9.11 =
* Pro features are now fully implemented and functional: CSV export of all AI hits, weekly email report, instant email alert when a new AI agent discovers your site, and GEO score history.
* Honest feature listing: the page-by-page GEO recommendations mention was removed (planned for a future release).

= 0.9.10 =
* Removed leftover development files (.example.env) and unused Composer metadata from the vendored Freemius SDK directory (the SDK is loaded directly via start.php; the stale metadata was reporting the previous SDK version).

= 0.9.10 =
* Per-order AI attribution is now fully available in the free version (the data always lived in your own database).
* Updated bundled Freemius SDK to 2.13.4.
* Removed unresolvable Plugin URI.

= 0.9.7 =
* Packaging: the Freemius SDK is now included via Composer (vendor/) so it is correctly recognized as a third-party library.

= 0.9.6 =
* Uninstall cleanup now runs via the Freemius after_uninstall hook (removed uninstall.php) for WordPress.org compliance.

= 0.9.5 =
* Hardened the top-URLs query and annotated custom-table queries for coding standards (WordPress Plugin Check clean).
* Removed redundant load_plugin_textdomain() call (translations load automatically on WordPress.org).
* Prefixed an internal variable in the uninstaller.

= 0.9.4 =
* Fixed: revenue attribution now persists on the block (Store API) checkout.
* Fixed: GEO content-freshness check now counts pages and products, not only blog posts.
* Fixed: live detection of Meta-ExternalAgent, GoogleOther and BingPreview.
* Improved: HPOS-safe order queries and order-edit links.
* Tested up to WordPress 7.0.

= 0.9.3 =
* Hardened detection: early exits, user-agent prefilter, per-IP rate limiting (anti-spoofing).
* Automatic data retention (90 days, filterable) with daily background pruning.
* Dashboard query caching; GEO audit now runs in the background (never blocks the page).
* Log importer: duplicate-safe re-runs and log-rotation awareness.
* Composite DB index for faster charts on busy sites; UTC timestamps.
* Expanded uninstall cleanup and External Services documentation.

= 0.9.2 =
* NEW: GEO Score — AI-visibility audit with actionable fixes.
* NEW: onboarding explainer and light dashboard theme with animations.
* NEW: Spanish (es_ES) translation.
* Improved: data-driven Pro suggestions once the radar collects real data.

= 0.9.1 =
* Dark "command center" dashboard design with animations. Author branding update.

= 0.9.0 =
* First public release: AI bot detection (35+ signatures), AI referral tracking, WooCommerce revenue attribution, retroactive log import, dashboard and widget.

== Upgrade Notice ==

= 0.9.3 =
Performance and robustness release: rate limiting, data retention, cached dashboards and background GEO audits. Recommended for all users.
