WordPress
A WordPress plugin that detects AI bot requests and reports content_retrieved events to your OpenAttribution telemetry endpoint. No code required.
How it works
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 eventThe 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.
Setup
Step 1: Install the plugin
Search for "OpenAttribution" in the WordPress plugin directory, or install manually:
wp plugin install openattribution --activateStep 2: Configure
Go to Settings > OpenAttribution in your WordPress admin. You need one thing:
| Field | Value | Required |
|---|---|---|
| OA Domain / Org ID | Your domain as registered with OpenAttribution | Yes |
| Telemetry endpoint | Auto-populated from your .well-known/openattribution | Auto |
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 field | Source |
|---|---|
content_url | Canonical URL of the requested page |
source_role | "origin" |
oa_telemetry_id | From OA-Telemetry-ID request header, if present |
user_agent | The requesting bot's user agent string |
metadata.title | Post title |
metadata.author | Post author display name |
metadata.published_at | Post publish date (GMT) |
metadata.categories | Post categories and tags |
Example event
{
"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:
// 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
| Requirement | Minimum |
|---|---|
| WordPress | 5.6+ |
| PHP | 7.4+ |
| Outbound HTTP | wp_remote_post must be able to reach your telemetry endpoint |