=== SellOnLLM ===
Contributors: vipulag
Donate link: https://sellonllm.com/
Tags: aeo, chatgpt, seo, ai, visibility
Requires at least: 6.0
Tested up to: 7.0
Stable tag: 1.1.12
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

AEO audit, AI visibility tracking, ChatGPT content, and AI referral analytics for WordPress — bring your own OpenAI and Perplexity keys.

== Description ==

**SellOnLLM** is a WordPress plugin for **Answer Engine Optimization (AEO)**, **AI visibility**, and **ChatGPT / AI search** readiness. As more shoppers and researchers ask ChatGPT, Perplexity, Claude, Gemini, and Google AI Overviews for recommendations, brands need to know whether they appear in AI answers — and how to improve.

SellOnLLM helps you **audit**, **optimize**, **monitor**, and **measure** AI search performance from inside WordPress, using **your own API keys** (bring your own keys / BYOK). There is no SellOnLLM subscription inside the plugin.

### Why AEO and AI visibility matter

Traditional SEO still matters, but **AEO (Answer Engine Optimization)** focuses on how AI assistants cite and recommend brands. If ChatGPT or Perplexity never mentions your domain, you miss high-intent traffic. SellOnLLM brings AEO checks, AI citation monitoring, and AI referral analytics into one admin workflow.

### Features

#### AEO / SEO Audit
Run a **site-wide or single-page AEO and SEO audit** with Overview, Technical, and Content scores. Checks cover HTTPS, robots.txt for AI crawlers (GPTBot, ClaudeBot, PerplexityBot, and more), XML sitemaps, **llms.txt**, Open Graph, Twitter Cards, JSON-LD structured data, meta titles and descriptions, content quality, FAQ signals, internal linking, and more.

Apply **one-click quick fixes** where SellOnLLM can help without AI: publish **llms.txt**, allow major AI crawlers in robots.txt, confirm your sitemap, and output basic Open Graph / Twitter / JSON-LD when missing. Edit and regenerate llms.txt from your pages and posts.

#### AI Readability
Compare what an AI crawler (GPTBot-style, no-JS HTML) can see versus your published content — useful for spotting content hidden behind JavaScript that ChatGPT or other AI systems may miss.

#### Create Content (ChatGPT / OpenAI)
Generate **AEO-friendly and SEO-friendly** meta titles, meta descriptions, and body drafts with your **OpenAI** key. Apply results to posts and pages (Yoast SEO and Rank Math meta description fields supported; excerpt is always updated as a fallback). Available as a standalone admin page and a post/page metabox.

#### AI Visibility Monitoring
Track whether **Perplexity** cites your domain for buyer-intent prompts — a practical **AI visibility** and **AI brand monitoring** workflow. Auto-suggest prompts and competitors from your WordPress site content (powered by Perplexity, with optional OpenAI fallback). Review visibility score, share of voice vs competitors, prompt breakdowns, history, and CSV export.

#### AI Traffic Analytics
Optionally measure **first-party AI referral traffic** from ChatGPT, Perplexity, Claude, Gemini, and other AI platforms. Tracking is **off by default**. When enabled, only AI-referred sessions may set a first-party cookie and store data in your WordPress database — nothing is sent to SellOnLLM.com. Enable only if your site’s privacy policy / cookie consent covers this.

### Who it is for

* SEO and AEO specialists optimizing for ChatGPT and AI Overviews
* Content and growth teams tracking AI visibility and brand mentions
* Ecommerce, SaaS, and publishers measuring AI-referred visits
* Agencies running AEO audits and AI search readiness checks for clients

### Bring your own keys

* **OpenAI** — Create Content and optional auto-suggest fallback
* **Perplexity** — AI Visibility checks and auto-suggest

Keys are stored **encrypted** in your WordPress database. Requests go from your site to those providers directly.

Learn more at [SellOnLLM.com](https://sellonllm.com/).

== Installation ==

1. Upload the `sellonllm` folder to the `/wp-content/plugins/` directory, or install the zip via **Plugins → Add New → Upload Plugin**.
2. Activate **SellOnLLM** through the **Plugins** screen.
3. Go to **SellOnLLM → Settings** and add your OpenAI and/or Perplexity API keys.
4. Open **SellOnLLM → AI Traffic**, **AEO/ SEO Audit**, **Create Content**, or **AI Visibility** to get started.

== Frequently Asked Questions ==

= What is AEO (Answer Engine Optimization)? =

AEO is the practice of optimizing content so AI answer engines — ChatGPT, Perplexity, Google AI Overviews, Claude, Gemini, and similar tools — can find, understand, and cite your brand. SellOnLLM includes an AEO/SEO audit, llms.txt tools, AI readability checks, and AI visibility monitoring.

= Do I need a SellOnLLM account or paid plan? =

No. The plugin is bring-your-own-keys (BYOK). You use your own OpenAI and Perplexity keys. There is no SellOnLLM billing inside the plugin.

= Does this plugin send data to SellOnLLM.com? =

No. AI requests go from your WordPress site to OpenAI and/or Perplexity. SellOnLLM.com is linked for product information and support only.

= Can I track ChatGPT traffic to my WordPress site? =

Yes. **AI Traffic** is off by default. When you enable it in Settings, it may record first-party sessions referred from ChatGPT and other AI platforms. Data stays in your WordPress database. Only enable it if your privacy policy and cookie consent (where required) cover this tracking.

= What is AI visibility tracking? =

AI visibility tracking checks whether AI assistants cite your domain for the prompts you care about. SellOnLLM uses Perplexity to run those checks and stores scores and history in WordPress.

= Does SellOnLLM support llms.txt? =

Yes. The AEO audit checks for llms.txt, and Quick Fixes can generate, edit, and publish llms.txt from your pages and posts (served at `/llms.txt`).

= Which SEO plugins work with Create Content? =

Yoast SEO and Rank Math meta description fields are detected automatically. The post excerpt is always updated as a fallback.

= How much do AI Visibility checks cost? =

Each prompt is one Perplexity API call (typically `sonar`). Cost depends on your Perplexity plan.

= What data does AI Traffic collect? =

When enabled, AI Traffic may set a first-party cookie (`sellonllm_sid`) only for AI-referred visitors (or continuing AI sessions) and store limited session data (referrer, landing path, engagement). No raw IP addresses are stored. You can disable tracking under **SellOnLLM → Settings**.

= What happens when I uninstall the plugin? =

Plugin options (including encrypted API keys), custom tables, and rewrite rules for `/llms.txt` are removed.

== External services ==

This plugin can connect to third-party AI APIs using API keys **you** provide. Requests are sent from your WordPress server directly to those providers. SellOnLLM.com does not proxy or receive that data.

### OpenAI
Used for **Create Content** (meta/body generation) and as an optional fallback for **AI Visibility auto-suggest**.

When you run those features, the plugin may send prompts and selected page or site content to `https://api.openai.com/v1/chat/completions`.

* Terms of use: https://openai.com/policies/row-terms-of-use/
* Privacy policy: https://openai.com/policies/row-privacy-policy/

### Perplexity
Used for **AI Visibility** citation checks and **auto-suggest** (prompts/competitors from your site content).

When you run those features, the plugin may send prompts and selected page or site content to `https://api.perplexity.ai/chat/completions`.

* API terms of service: https://www.perplexity.ai/hub/legal/perplexity-api-terms-of-service
* Privacy notice: https://www.perplexity.ai/hub/legal/privacy-policy

### AI Traffic (optional, first-party only)
AI Traffic does **not** call SellOnLLM or any analytics SaaS. When enabled by an administrator, a script on your site may set a first-party cookie and store limited referral/session data in your WordPress database for visitors arriving from known AI platforms. Enable only with appropriate consent and privacy disclosures for your jurisdiction.

== Screenshots ==

1. AI Traffic — ChatGPT and AI referral sessions, platforms, and landing pages.
2. AEO / SEO Audit — site-wide scores, technical and content checks, quick fixes.
3. AI Visibility — Perplexity citation checks, share of voice, and prompt breakdown.
4. Create Content — ChatGPT/OpenAI meta and body generation for posts and pages.
5. Settings — bring-your-own OpenAI and Perplexity API keys.

== Changelog ==

= 1.1.12 =
* Harden AI Traffic collect REST route: nonce + same-site checks, rate limits, stricter session validation

= 1.1.11 =
* Document OpenAI and Perplexity terms/privacy in readme; AI Traffic off by default; stricter REST post permissions

= 1.1.10 =
* Align i18n text domain with the WordPress.org plugin slug

= 1.1.9 =
* Fix admin footer links (use WP footer text filter); clear Plugin Check warnings (textdomain, SQL ignore, uninstall prefixes)

= 1.1.8 =
* Add LICENSE, uninstall cleanup, privacy policy helper text, and admin footer links (SellOnLLM.com + Leave a review)

= 1.1.7 =
* AI Visibility auto-suggest uses site content via Perplexity (OpenAI optional fallback); button enabled with Perplexity alone

= 1.1.6 =
* Plugin Check: remove ABSPATH filesystem write for llms.txt; sanitize UA; SQL ignore placement; shorter readme blurb

= 1.1.5 =
* Audit page UI refresh: clearer hierarchy, issue rows, score tones, collapsible llms.txt editor

= 1.1.4 =
* Fix: site audits now include SellOnLLM Open Graph / Twitter / JSON-LD / meta description tags

= 1.1.3 =
* llms.txt editor on AEO/ SEO Audit: view, edit, save, and regenerate from site content

= 1.1.2 =
* Quick fixes UI improvements; richer JSON-LD (WebSite, Organization, Article/WebPage)

= 1.1.1 =
* AI Traffic is the first menu page; Audit renamed to AEO/ SEO Audit; quick fixes for llms.txt, robots, sitemap, meta/schema

= 1.1.0 =
* AI Traffic analytics for AI referral sessions, platforms, landing pages, bounce, engagement

= 1.0.1 =
* Site-wide audit with overall stats and per-page breakdown

= 1.0.0 =
* Initial release: AEO audit, AI Readability, Create Content, AI Visibility (BYOK)

== Upgrade Notice ==

= 1.1.12 =
Hardens the public AI Traffic collect endpoint for WordPress.org review (nonce, same-site, rate limits).

= 1.1.11 =
WordPress.org review fixes: external service disclosures, contributor list, AI Traffic defaults, REST post capability checks.

= 1.1.10 =
Aligns the translation text domain with the WordPress.org plugin slug so Plugin Check TextDomainMismatch errors are cleared.

= 1.1.9 =
Improved WordPress.org readiness: cleaner admin footer, Plugin Check fixes, LICENSE and uninstall cleanup. Recommended update for all users.
