=== AI Channel Console for WooCommerce ===
Contributors: avakode
Tags: woocommerce, ai, chatgpt, analytics, llms.txt
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.2
Stable tag: 0.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

See what AI assistants earn your store, make your catalogue readable to them, and keep the numbers in your own database.

== Description ==

ChatGPT, Perplexity and Claude already send people to your store. Analytics platforms are catching up: Google Analytics 4 now has an AI Assistant channel covering ChatGPT, Gemini, DeepSeek, Copilot and Grok. That closes part of the gap, and it is worth saying so plainly.

It does not close the part that matters most. Roughly seven in ten AI referrals arrive with **no referrer at all**, and a channel report has nothing to classify them by. Perplexity and Claude are not in Google's list. And a session in an analytics product is not an order in your database.

This plugin measures the channel from your own server, and joins it to WooCommerce orders.

**It counts.** Every AI visit and every order it leads to, attributed with first-party data. No third-party script and no pixel on your storefront.

**It shows its work.** Next to every number you see *how* it was identified: a referrer, a campaign tag, or an assistant that fetched the same page moments earlier. Estimates are labelled as estimates and reported separately from proven revenue. A dashboard that cannot tell you why it believes something is a dashboard you cannot defend.

**It makes your store readable to machines.** An `llms.txt` and `llms-full.txt` map of your catalogue and policies, generated from your live products and kept in sync as they change.

**It logs the bots.** Which crawlers read your store, what they read, and whether they are who they say they are. A request claiming to be GPTBot from an address outside OpenAI's published ranges is shown as what it is: someone pretending.

= Your data stays on your server =

The plugin stores no IP addresses and no email addresses. Visitor sessions are keyed by a first-party cookie, set only after consent and only for visits that actually came from an AI assistant. WordPress privacy exporter and eraser hooks are supported from the first release.

= Already running an MCP connector? =

Good. This plugin works alongside it, not instead of it. A connector opens your store to agents; this one records what they did. The two answer different questions.

= What it does not do =

It does not survey language models about your brand, it does not generate content, and it does not run its own MCP server. It measures the channel; it does not pretend to be it.

== External services ==

This plugin makes exactly one kind of outbound request, and it is disclosed here in full.

**Crawler address lists published by OpenAI and Perplexity.**

*What it is for.* A user agent string costs nothing to forge. To tell a real GPTBot visit from a scraper wearing its name, the plugin compares the requesting address against the ranges each vendor publishes. Without this, every claimed crawler would have to be taken at its word, and the crawler log would be worth very little.

*What is sent.* Nothing. These are plain unauthenticated GET requests for public JSON files. No personal data, no store data, no site identifier and no licence key are transmitted. The plugin does not send your visitors' addresses anywhere; it downloads the vendors' lists and does the comparison locally.

*What is received.* A list of IP ranges.

*When.* Once a day, from a background task. Never during a customer's page view.

*Which endpoints.*

* `https://openai.com/gptbot.json`
* `https://openai.com/searchbot.json`
* `https://openai.com/chatgpt-user.json`
* `https://www.perplexity.ai/perplexitybot.json`

*Terms of the providers.* OpenAI: [terms](https://openai.com/policies/terms-of-use/), [privacy](https://openai.com/policies/privacy-policy/). Perplexity: [terms](https://www.perplexity.ai/hub/legal/terms-of-service), [privacy](https://www.perplexity.ai/hub/legal/privacy-policy).

*Turning it off.* The refresh can be disabled on the settings screen. Crawler visits are then reported as "declared": the user agent matched, but the address could not be checked. The plugin never treats an unverified visit as a forged one.

The plugin contains no analytics, no telemetry and no licensing calls of its own.

== Free and paid =

Everything described above is free and stays free. A separate paid add-on, installed alongside this plugin, adds:

* Reporting windows of any length and period comparison
* First touch, linear and time decay attribution models
* CSV export of sources, orders and crawlers
* A weekly digest email
* Schema enrichment aimed at agents, and a machine readable catalog feed that puts the catalogue into assistant product discovery
* Agent guard rails: per agent keys with scopes, an approval queue, an append only journal with a hash chain, snapshots and undo, and a kill switch
* Multiple stores in one console

The free plugin contains none of that code. Nothing here is a disabled button waiting for a payment.

== Installation ==

1. Install and activate WooCommerce 8.0 or newer.
2. Upload the plugin and activate it.
3. Open **AI Channel** in the admin menu. The first numbers appear as soon as an AI referral reaches your store.

The plugin creates its own database tables and does not write to `postmeta`.

== Frequently Asked Questions ==

= Does this send my data anywhere? =

No. Analysis happens inside WordPress, and no data about your store or your visitors leaves the server. The plugin's only outbound requests download the public crawler address lists described in the External services section above, and those requests carry nothing.

= Google Analytics added an AI channel. Why do I still need this? =

Because that channel classifies by referrer, and most assistant traffic arrives without one. It also does not include Perplexity or Claude, and it counts sessions rather than order revenue in your own database. The two are complementary: use the channel report for the traffic Google can see, and this plugin for the part it cannot and for the money attached to it.

= Why do some numbers say "estimated"? =

Because they are. When an assistant opens a link, the browser often sends no referrer, and the visit is indistinguishable from someone typing the address by hand. Where the plugin can prove the source, it says so; where it infers it, it says that instead, and keeps the two apart in every total.

= Does it work with High-Performance Order Storage? =

Yes. HPOS is the assumed configuration, and the plugin declares compatibility with it and with the block-based cart and checkout.

= Will it slow my store down? =

Collection adds a user agent check and a URL parse on public page views, and writes to the database after the response has been sent. Nothing the plugin does is on the critical path of a purchase.

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

Nothing, unless you ask for it. History survives deactivation and reinstallation. Deleting the data is a separate, explicit choice on the settings screen.

== Screenshots ==

1. The dashboard: what the AI channel earned, by assistant, with the proven share called out.
2. Who is reading your store: crawler log with verified, declared and spoofed identities.
3. Health: what is configured, what is missing, and what that means for your numbers.

== Changelog ==

= 0.1.0 =
* First release: attribution to WooCommerce orders, crawler log with address verification, `llms.txt` and `llms-full.txt`, health screen, privacy exporter and eraser.
