=== AIVIS Connector ===
Contributors: aivis
Tags: ai seo, llms.txt, chatgpt shopping, product feed, json-ld
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.0
Stable tag: 0.5.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Make your site visible to AI answer engines: llms.txt, structured data, robots.txt rules and AI bot logs, synced from AIVIS.

== Description ==

**AIVIS Connector** automatically applies to your WordPress site the fixes generated by your [AIVIS](https://aivis.lumnika.com) AI visibility report:

* **llms.txt** - automatically publishes `/llms.txt`, the site summary designed for AI assistants, synced from AIVIS.
* **Structured data (JSON-LD)** - injects the Organization/WebSite blocks generated by AIVIS into every page.
* **robots.txt for AI bots** - automatically adds `Allow` directives for GPTBot, ClaudeBot, PerplexityBot, Google-Extended and the other known AI bots, while still respecting the "Discourage search engines" choice if it is enabled in Settings > Reading.
* **AI Crawler Log** - records which AI bots visit your site and when, and sends them to your AIVIS account: you see them in the dashboard without having to read raw server logs.

**Free, no account needed:**

* **AI visibility widget** in the wp-admin dashboard - the top fixes for your site (search engines discouraged, robots.txt blocking AI bots, missing structured data, default tagline), checked locally. With one click, and only then, it also shows your public AIVIS AI-readiness score.
* **ChatGPT Shopping readiness (WooCommerce)** - on WooCommerce stores, Settings > AIVIS Connector shows, after you click the check button, a score of how complete your public product data is for ChatGPT Shopping (price, availability, images, SKU, GTIN, descriptions, refund and shipping pages), with fix hints and edit links to the products to fix first.
* **llms.txt from your own content** - until you connect an AIVIS account, `/llms.txt` is generated locally from your site title, tagline, main pages and latest posts.

Syncing the fixes (llms.txt, JSON-LD, AI bot rules) and the AI Crawler Log require an [AIVIS](https://aivis.lumnika.com) account and the site's "site key", which you find in the dashboard after adding the site.

= Why =

Traditional search volume is declining in favor of conversational AI interfaces. AIVIS measures how ChatGPT, Perplexity, Gemini and Claude see your site and automatically generates the fixes: this plugin applies them with one click instead of you pasting them in by hand.

== External services ==

This plugin connects to the AIVIS API, a third-party service provided at [https://aivis.lumnika.com](https://aivis.lumnika.com). Without a site key only the optional public score request below is made; with one, the connection is how the plugin receives the llms.txt content, structured data and AI bot list for your site, and how it reports AI bot visits to your AIVIS dashboard. No request is made until you click "Show my score" in the dashboard widget or the ChatGPT Shopping check button, or enter a site key in Settings > AIVIS Connector.

* **Public score** (`GET https://aivis.lumnika.com/api/trust/<your-domain>`) - only after an administrator clicks "Show my score" in the dashboard widget, then at most once every 12 hours while the widget is viewed. Data sent: your site's domain name. Data received: its public AI-readiness score and letter grade, if AIVIS has scanned it.
* **AI bot access probe** (`POST https://aivis.lumnika.com/api/tools/ai-crawler-access-checker`) - after the same consent, at most once every 12 hours via WP-Cron. Data sent: your site's domain name. AIVIS then requests your home page once with each known AI bot user agent (GPTBot, ClaudeBot, PerplexityBot...) and returns which of them your CDN or firewall refuses although robots.txt allows them.
* **ChatGPT Shopping readiness check** (`POST https://aivis.lumnika.com/api/tools/woocommerce-chatgpt-shopping-check`) - only on WooCommerce sites, only when an administrator clicks the check button in Settings > AIVIS Connector; the result is cached for 12 hours. Data sent: your site's home URL. AIVIS then reads your public WooCommerce Store API (`/wp-json/wc/store/v1/products`, up to 20 products) and requests a few common refund/shipping policy URLs, and returns the score, per-check results and the product names and URLs that fail.

With a site key, the plugin also makes two kinds of requests to the AIVIS API (by default `https://aivis.lumnika.com/api/wp`; the URL can be changed in the advanced settings for self-hosted instances):

* **Configuration sync** (`GET /api/wp/config`) - sent once a day via WP-Cron and whenever you click "Sync with AIVIS". Data sent: your site key. Data received: the llms.txt content, the JSON-LD blocks and the list of AI bots to allow.
* **AI Crawler Log** (`POST /api/wp/crawler-hits`) - sent in batches every 15 minutes via WP-Cron, only when AI bot visits have been recorded. Data sent: your site key and, for each visit by a known AI bot, the matched bot name (e.g. "GPTBot"), the requested path on your site and the date/time of the visit. No data about human visitors is collected or sent.
* **AI referral analytics** (script `https://aivis.lumnika.com/api/v1/ai-referral`, loaded in the page head once a site key is synced) - runs in the visitor's browser. When, and only when, the visitor arrived from an AI engine (referrer or utm_source of ChatGPT, Perplexity, Gemini, Claude, Copilot...), it sends once per page and browser session: your site id, the referrer URL, the utm_source value and the landing path. No cookies, no personal data; AIVIS stores only daily counts per engine and page. Visitors coming from anywhere else trigger no request beyond loading the script.

The service is provided by AIVIS: [Terms of Service](https://aivis.lumnika.com/en/terms), [Privacy Policy](https://aivis.lumnika.com/en/privacy).

== Installation ==

1. Install and activate the plugin from Plugins > Add New, or upload the `aivis-connector` folder to `/wp-content/plugins/` and activate it from Plugins.
2. Go to [aivis.lumnika.com](https://aivis.lumnika.com), scan your domain and sign up to add it as a tracked site.
3. In the AIVIS dashboard, open the site and copy the **site key**.
4. In WordPress, go to Settings > AIVIS Connector, paste the site key and save.
5. Click "Sync with AIVIS" to run the first sync.

From then on, `/llms.txt`, the structured data and robots.txt are updated automatically (daily sync, plus manual sync from the Sync button).

== Frequently Asked Questions ==

= Do I need an AIVIS account? =

No for the dashboard widget and the locally generated llms.txt. Yes for syncing the fixes generated by AIVIS (llms.txt, JSON-LD, AI bot list) and for the AI Crawler Log.

= Is AIVIS free? =

Scanning a domain and reading its AI visibility report on AIVIS is free. The paid plans (Pro, Business, Agency) add tracked sites, monitoring and the fixes this plugin syncs; see the pricing page on the AIVIS site. The plugin itself is free and GPL.

= What data does the plugin send, and when? =

Nothing until you click "Show my score" or the ChatGPT Shopping check button (then only your domain name or home URL) or enter a site key. With a site key, only your site key (to fetch the configuration once a day) and, for visits by known AI bots only, the bot name, the requested path and the time of the visit. For human visitors, only visits arriving from an AI engine are counted (engine, landing path, day): no cookies, no IP addresses stored, no personal data. See "External services" below for the full list.

= What is llms.txt? =

A plain-text file at the root of your site (`/llms.txt`) that summarizes, for AI assistants, what the site is about and which pages matter most. It is to AI assistants roughly what `sitemap.xml` is to search engines.

= Does the plugin overwrite my existing robots.txt? =

No. It uses the WordPress `robots_txt` filter to add `Allow` lines for AI bots to the robots.txt generated dynamically by WordPress, without touching any custom rules written elsewhere.

= What happens if "Discourage search engines from indexing this site" is enabled in Settings > Reading? =

The plugin respects that choice and does not add the `Allow` lines for AI bots: if you have decided to discourage indexing, that choice applies to AI bots too.

= Does the plugin slow down the site for AI bot visits? =

No. Visits are queued in a local buffer (a WordPress option) and sent to AIVIS in batches every 15 minutes via WP-Cron, not on every request.

== Screenshots ==

1. Dashboard widget: AI-readiness score and top fixes.
2. Settings page: site key and status of the last sync.

== Changelog ==

= 0.5.0 =
* WooCommerce stores: hosted ChatGPT product feed. One click publishes your catalog as a CSV in the OpenAI commerce feed format at a stable URL, rebuilt when products change, ready to submit as a ChatGPT merchant.

= 0.4.0 =
* WooCommerce stores: new "ChatGPT Shopping readiness" panel in Settings > AIVIS Connector, with a score, per-check fix hints and edit links to the products to fix first (on demand, cached 12 hours).

= 0.3.0 =
* AI referral analytics: once synced, the plugin loads a tiny script that counts human visits arriving from AI engines (ChatGPT, Perplexity, Gemini, Claude...) and shows them in your AIVIS dashboard. No cookies; nothing is sent unless the visitor came from an AI engine.

= 0.2.0 =
* The dashboard widget now flags AI bots that robots.txt allows but a CDN or firewall refuses (live probe, after consent), and reads the virtual robots.txt WordPress serves when no file exists.

= 0.1.0 =
* First release: free AI visibility dashboard widget and local llms.txt; with an AIVIS account, llms.txt/JSON-LD/AI robots.txt sync and AI Crawler Log.

== Upgrade Notice ==

= 0.1.0 =
First public release.
