=== MrKeyword Connector ===
Contributors: splitform
Tags: seo, meta description, internal links, ai crawlers, search console
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.2.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Apply the SEO title, meta description and internal-link changes you approve in MrKeyword, and see which AI crawlers visit your pages.

== Description ==

MrKeyword Connector links your WordPress site to [MrKeyword](https://mrkeyword.io), an SEO tool built on your own Google Search Console data.

**Reviewed SEO changes.** MrKeyword suggests better titles, meta descriptions and internal links. Nothing changes until you approve a change in MrKeyword. The plugin then applies it to that one published post or page.

* Works alongside Yoast SEO and Rank Math, and prints its own meta description when neither is installed.
* Refuses a change if the page was edited in WordPress after you reviewed it.
* Only edits published posts and pages that the connected user may edit, and only over HTTPS.
* Removing the plugin removes its title and description overrides, so pages go back to their previous values.

**AI crawler reporting (optional, off by default).** See which AI bots, such as GPTBot, ClaudeBot and PerplexityBot, fetch which pages. The plugin records a visit only when the visitor's user agent matches a known AI or search bot. Human visitors are never recorded or sent.

A MrKeyword account is required. The free plan works with this plugin.

== Installation ==

1. Install the plugin from Plugins, Add New, or upload the zip, then activate it.
2. To apply SEO changes, create an application password under Users, Profile, Application Passwords. Paste your username and that password into MrKeyword when it asks to connect your WordPress site.
3. To report AI crawler visits, create a website key in MrKeyword under AI Crawlers. In WordPress, open Settings, MrKeyword, paste the key, tick "Send AI bot visits to MrKeyword" and save.

== Frequently Asked Questions ==

= Does the plugin send anything before I set it up? =

No. SEO changes only happen when MrKeyword calls your site with an application password you created. AI crawler reporting sends nothing until you paste a key and turn it on.

= Does it track my visitors? =

No. Only requests whose user agent matches a fixed list of bot names are recorded. No cookies are set, and no IP addresses are stored or sent.

= Will it conflict with Yoast SEO or Rank Math? =

No. When you approve a title or description in MrKeyword, the plugin passes it through those plugins' own filters. Pages without an approved change keep their existing values.

= Can I undo a change? =

Yes. Revert it in MrKeyword, or deactivate and delete the plugin to remove every override it applied.

= Why does it need HTTPS? =

Application passwords travel with each request. The plugin refuses connections that are not encrypted.

== External services ==

This plugin connects to MrKeyword, a service run by the plugin's authors, in one optional case.

**AI crawler reporting.** Only after you paste a website key in Settings, MrKeyword and turn reporting on, the plugin sends recent AI bot visits to `https://app.mrkeyword.io/api/integrations/wordpress/bot-hits`, or to the MrKeyword address you set. It sends at most once every 10 minutes, and only when there are visits to report. Each report contains your site's home URL and, for each bot visit, the time, the requested path, the HTTP status (200 or 404) and the bot's user agent. Your website key is sent as the authorization header. No visitor IP addresses, cookies or data about human visitors are sent.

**SEO changes.** The plugin itself makes no outgoing requests for this feature. MrKeyword calls your site's REST API at `/wp-json/mrkeyword/v1/` using the application password you gave it.

MrKeyword terms of service: https://mrkeyword.io/terms
MrKeyword privacy policy: https://mrkeyword.io/privacy

== Screenshots ==

1. Settings, MrKeyword in WordPress: the connection check address, a link to create an application password, and AI crawler reporting (off by default).
2. The WordPress screen in MrKeyword, where you connect your site and review title and meta description changes before they are applied.
3. The AI Crawlers page in MrKeyword, where AI bot visits from the plugin or uploaded server logs appear.

== Changelog ==

= 1.2.0 =
* Tested up to WordPress 7.1.
* Settings, MrKeyword now links to the application password screen and to MrKeyword.
* Plugin Check: the named database lock queries are annotated, with no change in behaviour.

= 1.1.0 =
* New Settings, MrKeyword page that explains the connection and holds AI crawler reporting.
* AI crawler reporting can no longer be turned on without a website key.
* Uninstall now removes the plugin's settings and title and description overrides.
* Translation-ready.

= 1.0.0 =
* First release: reviewed title, meta description and internal-link changes, and AI crawler reporting.

== Upgrade Notice ==

= 1.2.0 =
Tested up to WordPress 7.1. Settings, MrKeyword now links to the application password screen and to MrKeyword. No settings change.

= 1.1.0 =
Settings moved to Settings, MrKeyword. AI crawler reporting keeps your saved key and on/off choice.
