=== Pewit GEO Analysis Tool ===
Contributors: michalczajka, pewitlabs
Tags: ai, geo, generative engine optimization, aeo, schema
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Get found by AI answer engines. GEO Score, entity & E-E-A-T analysis, FAQ/Q&A, schema, AI citability, competitor share-of-voice and prompt testing.

== Description ==

Plugin homepage, documentation and paid plans: https://pewitlabs.com/product-ai-visibility-toolkit.html

GEO Analysis Tool is the all-in-one Generative Engine Optimization (GEO/AEO) suite for WordPress. It scores and improves how ChatGPT, Perplexity, Gemini and Google AI Overviews understand, trust and cite your content — and lets you test whether AI assistants actually recommend your brand.

One plugin, the whole GEO workflow:

* **GEO Score (0–100)** — a weighted readiness score across answer-first structure, clarity, factual density, entity clarity, E-E-A-T, structure, schema and freshness.
* **Entity detection** — the people, brands, places and concepts an AI associates with a page, with ambiguity flags and knowledge-graph (sameAs / knowsAbout) suggestions.
* **E-E-A-T analysis** — Experience, Expertise, Authoritativeness and Trust sub-scores with concrete fixes.
* **AI citability** — how quotable your content is, the most citable passages, and citable-sentence suggestions.
* **FAQ & Q&A generation** — answer-first FAQ pairs and natural-language Q&A blocks you can insert with one click; FAQPage schema included.
* **Schema generator** — Schema.org JSON-LD tuned for AI answer engines (integrates with AI Schema Builder when active).
* **Prompt testing** — ask real customer prompts ("Recommend a detailing company in Poznań", "Best hotel in Zakopane") and see whether your brand appears in the AI answer.
* **Competitor analysis** — AI share-of-voice between your brand and competitors, plus a gap analysis with actions.

= Fully functional and free =
Every feature in this plugin is free and fully functional with your own API key (BYOK): GEO Score, entity detection, E-E-A-T analysis, AI citability, FAQ & Q&A generation with one-click insert, schema generation, manual AI prompt testing, bulk GEO/FAQ/Q&A/schema jobs, scheduled prompt monitoring with history trends, competitor share-of-voice analysis, auto-analyze on publish, email notifications and white-label admin branding. Nothing is locked behind a license.

Optionally, you can subscribe to **managed AI credits** (so you don't need your own API key) and priority support at https://pewitlabs.com/product-ai-visibility-toolkit.html — this is a paid external service, not a requirement to use the plugin.

= Everything included =
* OpenAI, Claude and Gemini providers — bring your own key (BYOK)
* GEO Score, entities, E-E-A-T and citability per page
* FAQ & Q&A generation + one-click insert
* Schema generation
* Manual AI prompt testing (does AI recommend your brand?)
* Bulk GEO analysis for the whole site (background jobs)
* Scheduled prompt monitoring + history trends
* Competitor share-of-voice analysis (up to 10 competitors)
* Auto-analyze on publish/update
* Email notifications
* White-label admin branding

== Installation ==

1. Upload the ZIP via Plugins → Add New → Upload Plugin.
2. Activate. Folder: `pewit-geo-analysis-tool/`, main file: `pewit-geo-analysis-tool.php`.
3. Open Pewit GEO Analysis Tool → Settings, set your brand/business details and connect your AI key (BYOK).

== External services ==

This plugin connects to third-party AI providers to analyze content and test prompts. Please review this before use.

You choose the AI provider in the plugin settings and use your own API key (BYOK). No data is sent to any provider until you trigger an analysis, generation or prompt test. Requests go directly from your site to the selected provider under your own key and that provider's terms. Nothing is sent to the plugin author.

OpenAI API (https://openai.com):
* What and when: when you analyze a page (GEO Score, entities, E-E-A-T, citability), generate FAQ/Q&A/schema, or run a prompt test with OpenAI selected, the relevant page text and/or your prompt is sent to OpenAI to produce the requested output.
* Data sent: the page content/excerpt and brand context you configure, the prompt text, and the selected model name.
* Terms: https://openai.com/policies/terms-of-use — Privacy: https://openai.com/policies/privacy-policy

Anthropic (Claude) API (https://www.anthropic.com):
* What and when: only if you select Claude as the provider — when you analyze content, generate output, or run a prompt test, the relevant page text and/or your prompt is sent to Anthropic to produce the requested output.
* Data sent: the page content/excerpt and brand context you configure, the prompt text, and the selected model name.
* Terms: https://www.anthropic.com/legal/consumer-terms — Privacy: https://www.anthropic.com/legal/privacy

Google Gemini API (https://ai.google.dev):
* What and when: only if you select Gemini as the provider — when you analyze content, generate output, or run a prompt test, the relevant page text and/or your prompt is sent to Google's Generative Language API to produce the requested output.
* Data sent: the page content/excerpt and brand context you configure, the prompt text, and the selected model name.
* Terms: https://ai.google.dev/gemini-api/terms — Privacy: https://policies.google.com/privacy

Freemius (licensing & checkout — https://freemius.com):
* What and when: used for optional license activation, updates and (for paid managed-credit plans) checkout as Merchant of Record. Opt-in is optional.
* Terms: https://freemius.com/terms/ — Privacy: https://freemius.com/privacy/

== Source code ==

All JavaScript and CSS shipped in this plugin (in assets/js and assets/css) is the original, hand-written, human-readable source. Nothing is minified, compiled, transpiled or generated by a build tool, so no separate source files are required — what you read in the plugin is the source. The only bundled third-party library is the Freemius SDK (vendor/freemius), whose source is available at https://github.com/Freemius/wordpress-sdk

== Frequently Asked Questions ==

= Does this query live ChatGPT/Perplexity results? =
Prompt testing queries your configured AI model (OpenAI/Claude/Gemini) with your own key, directly from WordPress, as a proxy for what those assistants say. It does not scrape third-party services.

= Is everything really free? =
Yes. Every feature — including bulk scans, scheduled monitoring, history and competitor tracking — works with your own API key, no paid license required.

= Do I need an AI API key? =
Yes — bring your own (BYOK) for OpenAI, Claude or Gemini. You pay your provider directly for usage.

= Does it duplicate AI Schema Builder? =
No. If AI Schema Builder is active it owns frontend JSON-LD output; Pewit GEO Analysis Tool focuses on AI-answer-engine visibility and reuses schema data where possible.

== Changelog ==

= 1.0.2 =
* Changed: plugin renamed to "Pewit GEO Analysis Tool" for a more distinctive name.
* Security: JSON-LD output now encoded with JSON_HEX_TAG so structured data cannot break out of the <script> tag.
* Changed: clarified the prompt-testing description (removed comparative wording).
* Fixed: free build no longer initializes the licensing SDK with placeholder credentials, preventing any activation error.

= 1.0.1 =
* Fixed: removed all license/plan gating of built-in features from the wordpress.org build — every shipped feature is unconditionally free and fully functional (no trialware).
* Changed: the white-label client audit report (print-ready PDF deliverable) is no longer part of the free build; it is an optional add-on feature.
* Changed: automation and white-label settings save for everyone in the free build.
* Fixed: prefixed remaining JS globals (AIVT_DeactivatePrompt) to avoid collisions.
* Added: "Source code" section documenting that all JS/CSS is hand-written, unminified source with no build step.

= 1.0.0 =
* New (flagship): GEO Autopilot — one click generates an answer-first intro, key-facts block, FAQ and FAQ schema based on a page's weakest GEO dimensions, shows the predicted score before you commit, and applies the change with a saved revision (fully reversible). Available in the post editor and via WP-CLI.
* New: WP-CLI commands — `wp aivt analyze|generate|bulk|job-status|prompt-run|autopilot`.
* New: Client audit report — a print-ready, white-label HTML GEO/AEO deliverable (Print → Save as PDF), built from stored data with no extra API calls.
* New: Suggestions (approval queue) — bulk-generated FAQ/Q&A land in a review screen; approve to insert (with a revision) or dismiss.
* New: SEO bridge — reads the focus keyword from Rank Math / Yoast into prompts, and suppresses AIVT's own JSON-LD when Rank Math, Yoast or AI Schema Builder already output schema (no duplicate structured data).
* Improved: focus-keyword context is now factored into GEO, FAQ and Q&A generation.

= 0.6.0 =
* Changed: renamed to "Pewit GEO Analysis Tool" (new slug pewit-geo-analysis-tool) for a distinctive directory name.
* Changed: every feature is now free and fully functional — no license gating of built-in features. Optional paid managed AI credits and support remain available as an external service.
* Added: External services documentation for OpenAI, Anthropic (Claude), Google Gemini and Freemius, including terms/privacy links.
* Changed: Freemius is_premium set to false for the wordpress.org build.
* Fixed: removed Google Fonts (no external font requests); admin uses a system font stack.
* Fixed: build excludes spaced and *.dc.html artifacts.

= 0.5.1 =
* Hardening for WordPress.org Plugin Check: unslash all integer inputs, set asset version on the webfont, and document intentional use of the core the_content filter. No functional changes.

= 0.5.0 =
* GEO Score history with per-page and site-wide trend sparklines (Pro).
* Brand presence trend chart on the prompt testing screen (Pro).
* Bulk jobs now cover FAQ, Q&A and Schema generation in addition to GEO Score (Pro).
* Site GEO coverage CSV report export, audit-ready (Pro).
* Three-step onboarding wizard on first activation (Free).
* Full localization: translation template plus Polish, German, French, Italian, Spanish and Russian.
* Complete data cleanup on uninstall (all options, post meta and cron events).

= 0.1.0 =
* Initial release: GEO Score, entity detection, E-E-A-T, AI citability, FAQ/Q&A generation, schema generator, prompt testing, competitor analysis, bulk jobs and scheduled monitoring (Pro/Agency).
* WordPress coding standards: per-handler nonce verification, full input unslash/sanitization, escaped output, literal text-domain i18n with translators comments, prefixed globals, GPLv2 license file.
