LLMAffiliate AI Traffic Monetizer

Description

LLMAffiliate AI Traffic Monetizer is a WordPress plugin that detects Large Language Model (LLM) traffic and dynamically serves enhanced content while ensuring compliance with search engine parity requirements.

It mirrors the behavior of an interception layer (e.g., Cloudflare Worker) directly inside WordPress, enabling controlled content delivery for AI crawlers and agents.

CORE FEATURES

  • Detects major LLM user agents including ChatGPT, Claude, Gemini, Copilot, Perplexity, Pi, LLaMA, Grok, Cohere, Mistral, Anthropic, and OpenAI.
  • Ensures Googlebot and search engine crawlers always receive original content (configurable parity enforcement).
  • Serves enhanced HTML responses via a remote content service.
  • Automatically falls back to native WordPress rendering if the external service fails.
  • Adds cache-control, licensing, and optional Text and Data Mining headers.
  • Supports secure QA overrides using HMAC-signed query parameters.

HOW IT WORKS

The plugin intercepts incoming HTTP requests and:

  1. Identifies whether the request originates from an LLM or standard browser.
  2. If LLM traffic is detected:
    • Fetches enhanced content from a configured external service.
    • Applies headers and response transformations.
  3. If the service fails:
    • Falls back to WordPress rendering safely.
  4. Ensures search engines always receive unmodified content.

USE CASES

  • AI traffic handling and request analysis
  • Controlled content delivery for LLM vs. human visitors
  • Response parity handling (search engines receive origin content)
  • Experimentation with LLM-specific rendering in compliant deployments

OPERATIONAL LOGGING & PRIVACY

An in-plugin setting (Settings LLMAffiliate AI Traffic Advanced Detection Settings) allows you to disable request and suspicious-event logging. When disabled, no logs are stored. When enabled (default), the plugin may store operational or security logs. These may include:
* IP address
* User agent
* Requested URL
* Referer
* Selected HTTP headers
* Detection and decision metadata
* Suspicious-event or request logs

This logging is used for debugging, security analysis, and request classification. Data is stored within your WordPress database. Configure and retain logs in accordance with your privacy policy and applicable regulations.

AI TERMS PAGE

The plugin can serve a public /ai-terms page (or equivalent) that displays your site’s AI usage and content terms. It functions as a site-published policy page that visitors—including AI systems and human readers—can view. Site owners are responsible for the contents and legal suitability of the terms. The plugin includes a default template; you may customize it to match your needs.

GOOGLE SEARCH CONSOLE (OPTIONAL)

The LLMAffiliate service can provide a Google Search Console HTML tag verification token on llmaffiliate.com for connected sites (see your dashboard or integration docs). If you choose to use it, open Settings LLMAffiliate AI Traffic in WordPress and paste the token into the prominent Use LLMAffiliate’s Search Console verification field, then save. The token is stored only in your site’s database and outputs the standard <meta name="google-site-verification" …> tag on your public frontend. You can clear the field at any time to remove the tag.

Why this helps: With your consent, LLMAffiliate can verify the site in Search Console tied to that token, which helps the service monitor indexing coverage and page performance for your integration and support you more effectively. This is fully optional; if you leave the field empty, nothing is added to your HTML.

No extra HTTP request is made to Google from the plugin for this feature—the meta tag is for Google’s crawler when it visits your site.

External services

This plugin connects to the LLM Affiliate cloud service to detect visiting AI crawlers (ChatGPT, Perplexity, Claude, Gemini, Copilot, etc.) and return an LLM-optimized, monetizable version of the requested article. Without this external service the plugin still performs local LLM detection, search-engine parity, and renders the /ai-terms page, but the enhanced-content feature is not available.

This service is provided by LLM Affiliate (llmaffiliate.com).

Service endpoints used:

  1. Site OnboardingPOST https://api.llmaffiliate.com/api/v1/enhanced-content/onboarding/

    • Purpose: Registers your WordPress site with the LLM Affiliate backend so the site can receive enhanced content. Think of it as a one-time (idempotent) handshake.
    • When it is sent: Only when you click Generate Token in the plugin admin screen (Settings LLMAffiliate AI Traffic). It is also re-sent if you regenerate/rotate the token. It is not sent on every page load.
    • Data sent (JSON body):
      • token – the authentication token generated by the plugin
      • site_id – an internal site identifier (e.g., site_xxxxxxxx) generated by the plugin
      • host – your site’s public URL (WordPress home_url())
    • No post content, no user data, no visitor IP, and no visitor PII is transmitted by this endpoint.
  2. Enhanced Content RenderGET https://api.llmaffiliate.com/api/v1/enhanced-content/render

    • Purpose: Fetches the LLM-optimized HTML version of a single article URL to serve back to the detected AI crawler.
    • When it is sent: Only when the plugin’s LLM detector classifies an incoming request as an AI/LLM user-agent (ChatGPT, Perplexity, Claude, Gemini, Copilot, LLaMA, Grok, Cohere, Mistral, DeepSeek, Pi, and similar). It is not sent for human visitors, for search-engine crawlers (Googlebot, Bingbot), or for admin/REST/static-asset requests.
    • Data sent (query string + pass-through headers):
      • url – the public URL of the article being requested (query string + path)
      • llm_profile – the detected LLM profile name (e.g., chatgpt, claude, gemini)
      • User-Agent header – forwarded from the visiting LLM client
      • Accept-Language header – forwarded from the visiting LLM client
      • X-LLM-Profile header – the plugin’s detected profile
      • X-LLM-Confidence header – a numeric confidence score (0–1) from the local detector
    • No cookies, session IDs, logged-in-user identifiers, or page body content are sent. Only the public URL and the minimum context needed to produce and attribute enhanced content is transmitted.
  3. User sitemaps (for the plugin sitemap endpoint only)GET https://api.llmaffiliate.com/api/v1/enhanced-content/public/user-sitemaps?host=<hostname>

    • Purpose: Returns JSON listing LLM-optimized sitemap URLs for the given site hostname so this plugin can serve /sitemap.xml (or the configured sitemap path) as a simple URL index for search engines.
    • When it is sent: Only on GET requests that match the plugin’s dedicated sitemap path (not on normal page views). The host query parameter is your site’s hostname from WordPress home_url() (no path, no user input from forms).
    • Data sent: host only, in the query string. Non-200 responses result in an empty <urlset> (no URLs listed).

All requests are made over HTTPS. If the service is unavailable or returns a non-200 response, the plugin adds an X-LLMAFFTM-Interceptor: fallback header and allows WordPress to render the normal (origin) page — humans and LLMs always receive something.

Use of the LLM Affiliate service is governed by the provider’s terms. Please review them before generating a token:

  • Terms of Service: https://llmaffiliate.com/terms
  • Privacy Policy: https://llmaffiliate.com/privacy
  • Service provider homepage: https://llmaffiliate.com/

Installation

Automatic installation

  1. Go to Plugins Add New in your WordPress dashboard.
  2. Search for LLMAffiliate AI Traffic Monetizer.
  3. Click Install Now and then Activate.
  4. Go to Settings LLMAffiliate AI Traffic, generate a token, and complete onboarding/integration on LLM Affiliate.
  5. Optionally paste the Search Console verification token (from LLMAffiliate or your own Google Search Console) using the prominent field at the top of that settings screen.
  6. Optionally configure logging and detection threshold in Advanced Detection Settings.

Manual installation

  1. Upload the plugin to /wp-content/plugins/ using the folder name llmaffiliate-ai-traffic-monetizer (this must match the Text Domain header so automated checks and translations stay aligned).
  2. Activate the plugin via the WordPress Plugins screen.
  3. Go to Settings LLMAffiliate AI Traffic.
  4. Generate a token (click Generate Token) and complete onboarding/integration on LLM Affiliate.
  5. Optionally paste the Search Console verification token in the plugin settings if you use LLMAffiliate’s optional verification flow (see readme).
  6. Optionally configure logging and detection threshold in Advanced Detection Settings.

FAQ

Does the plugin modify admin or API routes?

No. WordPress admin, login, REST API, and static assets are always bypassed.

What happens if the content service fails?

The plugin logs the failure (if enabled), adds an X-LLMAFFTM-Interceptor: fallback header, and allows WordPress to render normally.

How do signed overrides work?

Enable “Allow Signed Override” and configure an HMAC secret.

Then append:
?llm_profile=&llm_sig=

Signature format:
hash_hmac(‘sha256’, “|”, )

Is this plugin safe for SEO?

Yes. Googlebot and other search crawlers always receive original content, ensuring compliance with search engine guidelines.

Why does Plugin Check report a Text Domain mismatch?

If the plugin lives in a directory with a different name (for example llm-interceptor), some tools compare that folder to the Text Domain and show a warning. Use the directory name llmaffiliate-ai-traffic-monetizer (the plugin slug) under wp-content/plugins/—the same layout as the WordPress.org distribution ZIP.

What does the Search Console verification field do?

It saves a google-site-verification meta content value in your database and prints one meta tag on the public site. LLMAffiliate may issue a token on llmaffiliate.com so they can verify the property for support, monitoring, and better visibility into indexing and performance—or you can paste your own token from Google Search Console. Clear the field and save to remove the tag.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“LLMAffiliate AI Traffic Monetizer” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

1.0.7

  • readme: Tested up to WordPress 7.0 (plugin directory compatibility header).

1.0.0

  • Initial release.

1.0.1

  • Prefixed plugin identifiers (options, hooks, scripts, classes) with llmafftm_ / LLMAFFTM_. Legacy llm_interceptor_* options are migrated on upgrade. Response headers use X-LLMAFFTM-*.

1.0.2

  • readme: point legal/privacy reference to the public https://llmaffiliate.com/ URL (verified).
  • Removed heredoc templates; AI Terms HTML and admin inline JS use output buffering so variables are escaped in normal PHP flow. JSON-LD built with wp_json_encode().

1.0.3

  • Text domain and settings screen slug aligned with the plugin repository slug: llmaffiliate-ai-traffic-monetizer.

1.0.4

  • AI Terms page stylesheet now uses the proper WordPress asset API (wp_register_style() + wp_enqueue_style() + wp_print_styles()) instead of a direct <link rel="stylesheet"> tag, per the WordPress Plugin Review Team’s guidance on correctly enqueuing CSS and JavaScript.

1.0.5

  • Added a dedicated == External services == section to the readme that fully discloses the LLM Affiliate cloud service (onboarding and enhanced-content render endpoints), the data transmitted, the conditions under which each request is made, and links to the service’s Terms of Service and Privacy Policy — per the WordPress Plugin Review Team’s third-party-service disclosure requirement.
  • Output escaping: every echoed variable in the plugin now flows through an appropriate WordPress escaping function. Proxied HTML documents (the enhanced-content response and the standalone /ai-terms page) are passed through wp_kses() with a full-document allow-list, which is exposed via the new filter llmafftm_allowed_full_html so the list can be extended without modifying plugin files. The JSON-LD structured-data block uses wp_json_encode() inline with the JSON_HEX_TAG|JSON_HEX_AMP|JSON_HEX_APOS|JSON_HEX_QUOT flags so it is safe to inline inside a <script type="application/ld+json"> tag.
  • Replaced remaining raw json_encode() calls with wp_json_encode() (onboarding POST body and suspicious-event debug log) per the WordPress Coding Standards preference for the WP-safe JSON encoder.
  • Replaced urlencode() in the enhanced-content URL builder with rawurlencode() so query-string values are encoded per RFC 3986, as recommended by the WordPress Plugin Review Team and WordPress.PHP.DiscouragedPHPFunctions.urlencode_urlencode.
  • Verified publicly reachable Terms of Service (https://llmaffiliate.com/terms) and Privacy Policy (https://llmaffiliate.com/privacy) URLs referenced from the == External services == section of this readme.

1.0.6

  • Readme: document the public/user-sitemaps external API used when serving the plugin sitemap URL.
  • Policy / privacy: remove hardcoded default Google Search Console verification token; verification is opt-in only via the llmafftm_google_site_verification filter.
  • Sitemap XML: late esc_url() on <loc> output for WordPress EscapeOutput compliance.

1.0.2

  • Settings: prominent optional field to save Google Search Console HTML-tag content (LLMAffiliate-issued or site-owner’s), stored in llmafftm_gsc_verification_token, with Save / Clear and AJAX handler llmafftm_save_gsc_verification.
  • Readme: describe optional Search Console verification, llmaffiliate.com as token source, and how this helps LLMAffiliate support monitoring of indexing and performance; new FAQ entry.