Skip to content

Connect WordPress

Updated 29 November 2026

Add a small plugin to your WordPress site so each visit from an AI crawler or search engine reaches Brandexa. Works on any host.

What to know

Brandexa writes a one file plugin for your site. When a crawler that Brandexa recognises asks WordPress for a page, the plugin sends Brandexa one record about the visit. It works on any host, including managed WordPress hosts that cannot stream their logs. Brandexa never needs access to your WordPress account.

Before you start

  • You can upload a file to your site, through your host's file manager, SFTP or the WordPress plugin uploader.
  • Your site does not serve every page from a full page cache. The plugin runs when WordPress builds a page. A page served from a caching plugin, your host's cache or a CDN never reaches WordPress, so those visits are not counted. If your site is cached that way, connect the CDN or host instead.
  • Your host allows WordPress to make outgoing requests. Most do.

Steps in Brandexa

  1. Open Agent analytics, then Logs, and choose Connect request logs.
  2. Choose WordPress and pick the domain the site serves.
  3. Brandexa shows the plugin code. It holds your source key and is shown once, so copy it now.

Steps on your site

  1. Save the code as a file named brandexa-agent-analytics.php. Keep the file private, because anyone who has it can send logs to your workspace.
  2. Upload the file to wp-content/mu-plugins/. Create the folder if it is missing. A must-use plugin needs no activation.
  3. You can put the file in wp-content/plugins/ instead. Then open Plugins in WordPress and activate Brandexa Agent Analytics.
  4. Open your site once to check that it loads. The plugin changes nothing a visitor sees.

The top of the file has this shape. Use the file Brandexa shows, because it holds your own key and the full list of crawlers:

brandexa-agent-analytics.php
<?php
/**
 * Plugin Name: Brandexa Agent Analytics
 * Version: 1.0.0
 */

const BRANDEXA_AA_ENDPOINT = 'https://ingest.brandexa.com/v1/logs/wordpress';
const BRANDEXA_AA_KEY = '<YOUR_SOURCE_KEY>';

The plugin reports a visit as it happens. Come back to Brandexa and choose Check status. A record appears after the next visit from an AI crawler or search engine.

What the plugin sends

Only requests whose user agent matches an AI crawler or a search engine. For each one it sends the user agent, the page path, the status code, the time and the country when your CDN provides it. It sends no visitor request, no IP address and no query string. It skips the WordPress dashboard, scheduled tasks and AJAX calls. It does not wait for Brandexa to answer, and any error is ignored, so it never changes what a visitor or a crawler receives.

Brandexa keeps only requests from recognised AI crawlers and search engines. For each one it stores the time, host, path without the query string, method, status, size, country and crawler name. It does not store visitor addresses, query strings, cookies or the user agent text.

If something goes wrong

  • Nothing appears. Check that the file is in wp-content/mu-plugins/, or that the plugin is active. Then check that your host allows outgoing requests.
  • Visits are missing. Pages served from a full page cache are not counted. Connect the CDN or host instead.
  • The source key was shared by mistake. Open the source in Brandexa, rotate the key and replace the file on your site. The old key keeps working for 24 hours.
  • To stop, delete the file, or deactivate and delete the plugin.

Still need help?

If you have a question or something is not working, get in touch.

Contact us