|

WordPress

A WordPress plugin that detects AI bot requests and reports content_retrieved events to your OpenAttribution telemetry endpoint. No code required.

One-click install Application layer source_role: origin

How it works

flow
AI Bot ──GET──> WordPress Site
                    │
                    ├── Plugin hooks into 'template_redirect'
                    ├── Checks User-Agent against known AI bot list
                    ├── Reads OA-Telemetry-ID header (if present)
                    ├── Serves page normally (no delay to visitor)
                    └── Fires async POST to OA telemetry endpoint
                        with content_retrieved event

The plugin runs on every page request. When it detects a known AI user agent, it constructs a content_retrieved event with the page URL, title, author, and any metadata WordPress exposes. The event is sent asynchronously - it never blocks the response to the bot.

Rich metadata
Unlike CDN integrations, the WordPress plugin has access to content metadata - post title, author, categories, publish date. This makes for richer telemetry events.

Setup

Step 1: Install the plugin

Search for "OpenAttribution" in the WordPress plugin directory, or install manually:

bash
wp plugin install openattribution --activate

Step 2: Configure

Go to Settings > OpenAttribution in your WordPress admin. You need one thing:

FieldValueRequired
OA Domain / Org IDYour domain as registered with OpenAttributionYes
Telemetry endpointAuto-populated from your .well-known/openattributionAuto

If you've already claimed your domain and published your .well-known/openattribution file, the plugin reads the telemetry endpoint from there. No additional configuration needed.

Step 3: Verify

The plugin settings page shows a test button that simulates an AI bot request and confirms the event reaches your telemetry endpoint.


What gets reported

Event fieldSource
content_urlCanonical URL of the requested page
source_role"origin"
oa_telemetry_idFrom OA-Telemetry-ID request header, if present
user_agentThe requesting bot's user agent string
metadata.titlePost title
metadata.authorPost author display name
metadata.published_atPost publish date (GMT)
metadata.categoriesPost categories and tags

Example event

json
{
  "type": "content_retrieved",
  "timestamp": "2026-03-14T09:15:22Z",
  "content_url": "https://example.com/2026/03/best-running-shoes/",
  "source_role": "origin",
  "oa_telemetry_id": "550e8400-e29b-41d4-a716-446655440000",
  "data": {
    "user_agent": "ClaudeBot/1.0",
    "metadata": {
      "title": "Best running shoes for 2026",
      "author": "Jane Smith",
      "published_at": "2026-03-10T08:00:00Z",
      "categories": ["reviews", "running"]
    }
  }
}

Bot detection

The plugin maintains a list of known AI bot user agent strings. This list is updated with plugin updates and can be extended via a filter hook:

php
// Add custom bot user agents
add_filter('openattribution_bot_agents', function ($agents) {
    $agents[] = 'MyCustomBot';
    return $agents;
});

The default list covers all major AI training crawlers and inference fetchers. It updates with each plugin release as new agents appear.


Access gating (future)

A future version of the plugin will support conditional access gating - blocking AI agents that don't send the OA-Telemetry-ID header. Agents that participate in the protocol get access. Agents that don't can be redirected to a notice page explaining how to participate.


Requirements

RequirementMinimum
WordPress5.6+
PHP7.4+
Outbound HTTPwp_remote_post must be able to reach your telemetry endpoint
WordPress.com
Free and Personal WordPress.com plans don't support custom plugins. Business and eCommerce plans do. Self-hosted WordPress (WordPress.org) works with any hosting provider.