=== llemmy - AI Visibility, GEO & AI Traffic Analytics ===
Contributors: llemmy
Tags: ai visibility, geo, generative engine optimization, ai seo, chatgpt
Requires at least: 5.8
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 0.5.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

See how ChatGPT, Claude, Perplexity and Google AI talk about your brand, measure your AI traffic, and turn visibility gaps into WordPress content.

== Description ==

AI search is where your next readers already are. llemmy is a GEO (Generative Engine Optimization) intelligence platform: it tracks how AI engines like ChatGPT, Claude, Perplexity, Gemini and Google AI Overviews answer questions about your brand, and this plugin brings that AI visibility data, plus AI traffic analytics for your own site, straight into wp-admin.

The plugin is free to use with a free llemmy account. Install it, paste an API key, and you get:

**Free: measure**

1. **The llemmy AI-traffic tag, installed automatically.** See which sessions on your site came from AI engines, broken out by engine. If a llemmy tag is already on your site, the plugin detects it and pauses auto-injection so you never load a duplicate. Your secret API key stays server-side; the tag carries only a public site token.
2. **Your GEO analytics inside wp-admin:** visibility, share of voice, sentiment and GEO score, plus your top cited pages and domains. Every proportion is reported with its sample size and a 95% confidence interval, so you always see how solid a number is.
3. **Content opportunities.** The questions AI is actually asked about your brand, and the gaps where you are not yet part of the answer.
4. **AI readiness, built in.** Three individually toggleable generators that run entirely on your site, no llemmy account needed: Organization and Article JSON-LD schema (with datePublished and dateModified), explicit Allow rules for the major AI crawlers in your robots.txt, and an llms.txt overview of your site name, key pages and recent posts. If Yoast SEO, Rank Math, All in One SEO or SEOPress already outputs schema, the plugin detects it and leaves schema to that plugin by default.
5. **Content freshness.** Content Studio ranks your published posts and pages by how long they have gone without a real update. Studies of AI citations skew toward recently updated content, so anything aging or stale comes with a practical, no-nonsense refresh checklist. This also works without a llemmy account.

**Paid: create and track**

6. **Content generation.** Turn any opportunity into a content brief, and the brief into a WordPress draft in one click, from Content Studio or the post editor. A batch control drafts your top opportunities in one pass. Content always lands as a draft; you decide when to publish.
7. **Campaigns effectiveness tracking.** Track how the content you ship changes your visibility. Each campaign compares a baseline to the latest data for visibility, share of voice, sentiment and citation rate, and lists the drafts and posts this site created against it. When you publish a tracked draft, the plugin marks the moment on the campaign timeline in llemmy.

All llemmy calls are made server-side from PHP, so your secret API key never reaches the browser. The plugin reads and writes your data through the llemmy public API using an API key you control. It creates content only as drafts and never publishes automatically.

An optional "AI visibility by llemmy" footer badge is on by default on every plan and can be turned off any time from the settings screen.

You need a llemmy account and an API key. Connecting, analytics and content opportunities are free; generating briefs and drafts and Campaigns effectiveness tracking need a paid plan. Sign up at [llemmy.com](https://llemmy.com/).

== External services ==

This plugin connects to llemmy (https://llemmy.com), a GEO intelligence service, or to your own self-hosted llemmy instance if you change the base URL in settings. A llemmy account and API key are required for the plugin to function.

What is sent, and when:

* **wp-admin screens:** server-side API calls to your configured llemmy instance, authenticated with your API key. Requests carry your selected llemmy project id and, for citation reports, this site's domain.
* **Site registration:** when you connect, the plugin registers this site's domain with llemmy to create the public site token used by the AI-traffic tag.
* **AI-traffic tag:** when enabled, visitors' browsers load the tag script from your llemmy instance and it reports page-view beacons (page URL, referrer, user agent) so AI-referral sessions can be counted. It sends no WordPress user accounts and nothing from your database.
* **Content briefs and drafts (paid):** when you generate a brief, the opportunity title, topic and keywords, and from the post editor the post title and URL, are sent to llemmy to produce the brief.
* **Campaigns (paid):** campaign names, descriptions and tracked prompt text are sent when you create them; publishing a tracked draft reports the publish event so the campaign timeline can mark it.

This service is provided by llemmy: [terms of service](https://llemmy.com/terms), [privacy policy](https://llemmy.com/privacy).

== Installation ==

1. Install the plugin from the Plugins screen in wp-admin (or upload the llemmy plugin folder to /wp-content/plugins/).
2. Activate the plugin through the Plugins menu.
3. Go to the new llemmy menu, open Settings, and paste your llemmy API key.
4. Click Test key and load projects, choose the llemmy project for this site, and save.
5. The plugin registers your site with llemmy, installs the AI-traffic tag if one is not already present, and starts surfacing your analytics on the llemmy Dashboard screen.

== Frequently Asked Questions ==

= Where do I get an API key? =

Create one in your llemmy account under Settings then API Keys, at llemmy.com. The key is a secret; the plugin stores it encrypted and never sends it to your browser.

= Is my API key safe? =

Yes. The key is stored in the WordPress options table, encrypted at rest with AES-256 when your server supports it. Every call to llemmy is made from PHP on your server, so the key never appears in page source or in JavaScript.

= I already use an SEO plugin. Will the schema conflict? =

No. When Yoast SEO, Rank Math, All in One SEO or SEOPress is active, llemmy detects it and turns its own schema output off by default, so your pages never carry duplicate markup. The settings screen shows which plugin is handling schema. You can still enable llemmy's schema manually, but two schema sources on one page is rarely what you want.

= Do the AI readiness features need a llemmy account? =

No. The JSON-LD schema, the robots.txt AI-crawler rules, the llms.txt overview and the content freshness list all run locally on your site and are free. Only the analytics, opportunities, generation and campaigns features talk to llemmy.

= What if a llemmy tag is already on my site? =

The plugin scans your home page for an existing tag. If it finds one that it did not add, it pauses its own injection so your site never loads two tags. You can re-run the check any time from the Dashboard.

= Does the plugin change my posts? =

The in-editor brief is read and copy only. Content Studio can create new posts, but only ever as drafts: nothing is published or edited on your behalf. Publishing is always a separate, human action, and that is the guardrail.

= How does effectiveness tracking work? =

When you create a draft from a Content Studio opportunity, you can attach it to a campaign. The plugin resolves the opportunity's tracked prompt (or creates one), adds it to the campaign, and stores the link on the draft. When you later publish that draft, the plugin tells llemmy the content shipped, so the campaign timeline marks the moment. On the Campaigns screen you then see the baseline-vs-current lift for visibility, share of voice, sentiment and citation rate, each with its sample size and 95% confidence interval.

= Who can use Content Studio and Campaigns? =

Any user who can edit posts. Connecting the site and changing settings still requires an administrator.

= Do I need a paid plan? =

No. Connecting, analytics and content opportunities are free. Generating briefs and drafts and Campaigns effectiveness tracking need a paid llemmy plan; on the free plan those controls show a clear upgrade nudge instead of failing. If your plan or monthly quota does not allow a generation, the plugin shows a clear message and a link to plans.

= What is the "AI visibility by llemmy" footer badge? =

One small, unobtrusive "AI visibility by llemmy" link in your site footer. It is optional on every plan, including free: it is on by default because it helps others discover llemmy, and you can turn it off any time from the settings screen.

= Does this work behind a full-page cache? =

Yes. The AI-traffic tag is client-side JavaScript, so it fires even when your pages are served from cache.

= Can I use this with a self-hosted llemmy? =

Yes. Point the base URL in Settings at your own llemmy instance; everything else works the same.

== Screenshots ==

1. The GEO dashboard in wp-admin: visibility, share of voice, sentiment and GEO score, each with sample size and a 95% confidence interval, plus AI traffic by engine and your top cited pages.
2. Content Studio: your AI visibility gaps as actionable opportunities, each one a click away from a brief and a WordPress draft.
3. Campaigns: baseline versus current visibility, share of voice, sentiment and citation rate, with confidence intervals, and the content this site shipped against the campaign.
4. Settings: connect with an API key, pick a project, and control the AI-traffic tag and footer badge.
5. The in-editor content brief, generated for the post you are writing.

== Changelog ==

= 0.5.0 =
* New AI readiness section in settings, three individual toggles: Organization and Article JSON-LD schema with datePublished and dateModified (turned off automatically when Yoast SEO, Rank Math, All in One SEO or SEOPress already outputs schema), explicit Allow rules for the major AI crawlers in robots.txt plus a sitemap reference, and an llms.txt overview of your site's key pages and recent posts.
* New content freshness list in Content Studio: your published posts and pages ranked by time since the last real update, with fresh/aging/stale chips and a practical refresh checklist. Studies of AI citations skew toward recently updated content, so this is one of the freshness levers you actually control.
* Everything above runs locally on your site and is free; no llemmy account required for these features.

= 0.4.0 =
* First WordPress.org release.
* The AI-traffic tag is now enqueued through the WordPress script API instead of printed directly.
* WordPress.org installs update through the plugin directory; the self-hosted build from llemmy.com keeps its own update channel.
* Coding-standards pass across the whole plugin (WordPress-Core, escaping, nonces).

= 0.3.1 =
* The "Powered by llemmy" footer badge is now optional on every plan, including free. It stays on by default; turn it off any time from the settings screen.

= 0.3.0 =
* Free plan: connect, analytics, the AI-traffic tag, and your content opportunities are now free to use.
* New "AI visibility by llemmy" footer badge.
* Content generation (briefs, drafts and batch drafting) and Campaigns effectiveness tracking are now paid features. On the free plan they show a clear upgrade nudge instead of failing, and your content opportunities stay fully visible.
* Settings now shows your current plan and a badge toggle.

= 0.2.0 =
* New Content Studio screen: see your data-driven content opportunities, generate a brief for any of them, and turn it into a WordPress draft in one click.
* Track effectiveness: attach a draft to a new or existing campaign when you create it, so llemmy measures the lift over time.
* Batch drafting: draft your top 3 or 5 opportunities in one pass, with a live log. The batch stops cleanly with an upgrade nudge if your plan or monthly quota is reached.
* New Campaigns screen: create campaigns and see baseline-vs-current visibility, share of voice, sentiment and citation rate, each with sample size and 95% confidence interval, plus the drafts and posts this site created against the campaign.
* Publishing a tracked draft now marks the moment on the campaign timeline in llemmy automatically.
* Content is always created as a draft. The plugin never publishes on its own.

= 0.1.0 =
* First release.
* Connect a WordPress site to llemmy with an API key and project picker.
* Auto-install the llemmy AI-traffic tag, with detection of an existing tag to avoid duplicates.
* wp-admin dashboard: visibility, share of voice, sentiment and GEO score (each with sample size and 95% confidence interval), AI traffic by engine with a window selector, and top cited pages and domains.
* In-editor content brief generation on posts and pages, display and copy only.

== Upgrade Notice ==

= 0.5.0 =
Adds AI readiness (JSON-LD schema, AI-crawler rules in robots.txt, llms.txt) and a content freshness checklist in Content Studio. All free, local to your site, and individually toggleable.

= 0.4.0 =
First WordPress.org release. Updates now come from the plugin directory.

= 0.3.1 =
The footer badge is now optional on every plan, including free.

= 0.3.0 =
The plugin is now free: analytics and content opportunities are included. Content generation and Campaigns are paid.
