> ## Documentation Index
> Fetch the complete documentation index at: https://academy.trackbase.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Install the Trackbase Analytics WordPress plugin

> The Trackbase Analytics plugin adds visitor tracking and server-side AI crawler detection to WordPress. Install, configure and verify it.

The Trackbase Analytics plugin connects a WordPress website to Trackbase in one place. It adds the visitor tracking script and it detects crawlers server-side, so you get both [visitor analytics](https://academy.trackbase.ai/visitor-analytics.md) and [crawler analytics](https://academy.trackbase.ai/crawler-analytics.md) without touching your theme.

## Before you start

In Trackbase, open **Settings** and keep two values at hand:

* your **project ID**: the site token shown in the analytics tracking card
* your **crawler analytics token**, from the WordPress tab of the crawler analytics card

![The WordPress tab of the Crawler analytics card in the Trackbase settings, with the token, the setup steps, the caching instructions, the list of AI crawler user agents and the test command. The token is a placeholder.](https://mintcdn.com/trackbase/jx2O_NE0ZwS5vmkO/images/settings-crawler-wordpress.png?fit=max\&auto=format\&n=jx2O_NE0ZwS5vmkO\&q=85\&s=810f907ed0c53736a2fe4c0bb0eea2b3)

## Install and configure

**1. Install the plugin**

In your WordPress admin, go to **Plugins → Add New**. Search for "Trackbase Analytics" and install it, or upload the plugin ZIP.

**2. Open the plugin settings**

Activate the plugin, then open **Trackbase** in the WordPress sidebar.

**3. Enter your project ID**

Paste your project ID into the **Analytics Tracking** field.

**4. Enter your crawler key**

Paste your token into the **Crawler Analytics Key** field.

**5. Handle caching**

If your website uses a caching plugin, tick **Bypass page cache for AI crawlers** under **Cache compatibility**.

**6. Save**

Click **Save Changes**.

## Why caching matters

A page cache serves a stored copy of a page before WordPress runs. The plugin then never sees the request, and crawler visits to cached pages go uncounted.

With **Bypass page cache for AI crawlers** turned on, the plugin registers the AI crawler user agents with your caching plugin, so those requests reach WordPress. Search engine crawlers keep getting cached pages, so there is no effect on their crawl speed.

The bypass works with WP Rocket, W3 Total Cache, WP Super Cache, LiteSpeed Cache, WP Fastest Cache and SiteGround Speed Optimizer.

> [!WARNING]
>
> Caches at server level are not supported by the bypass. This includes Nginx FastCGI cache, Varnish, Kinsta, WP Engine and Cloudflare APO. For those, exclude the AI crawler user agents from the cache yourself. The list of user agents is shown in the WordPress tab in Trackbase and on the plugin settings page.

## Verify that it works

**1. Send a test request**

Run this command from any terminal. Replace the domain with your own website.

```bash theme={null}
curl -s -o /dev/null -A "Mozilla/5.0 (compatible; GPTBot/1.0)" https://www.example.com/
```

**2. Check the request log**

Open the **Crawlers** page in Trackbase. The GPTBot request should appear in the request log within a minute.

No request in the log? Check the **Cache compatibility** status in the plugin, or exclude the user agents in your cache manually.

## Good to know

The crawler analytics token is the same token that Cloudflare Logpush uses. If you regenerate it, update it in WordPress and in any Logpush job that uses it.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.