Sensor docs
Install AI traffic tracking on WordPress
The Foglift AI Traffic plugin records recognized AI crawler requests and AI answer referrals from WordPress. Setup takes one public workspace token. No secret API key is stored or sent.
For recognized AI crawler or referral events only, the Sensor reports the page path, user agent, AI source classification, and event time. It uses no cookies, does not identify visitors, and strips query strings.
Step 1
Download the plugin
Download the signed-off Foglift package, then keep this page open for the four WordPress steps below.
Download WordPress pluginVersion 0.1.0 · ZIP package · Requires WordPress 6.0 and PHP 7.4 or newer
Step 2
Upload and activate it
- In WordPress Admin, open Plugins → Add New Plugin.
- Select Upload Plugin.
- Choose the downloaded ZIP, select Install Now, then activate Foglift AI Traffic.
Step 3
Paste your public workspace token
- In Foglift, open AI Traffic → Set up Sensor and copy the public workspace token.
- In WordPress, open Settings → Foglift AI Traffic.
- Paste the token and save changes. The token identifies your site but cannot access your Foglift account.
Step 4
Account for full-page caching
A page cache can answer a request before WordPress or PHP runs, so those cache-served crawler visits are not visible to this plugin. The plugin also adds the Foglift browser pixel to your site's <head>, which the visitor's browser runs even on a cached page, so recognized AI answer referral clicks are still recorded. Classic crawler requests served from cache stay invisible. When WP Rocket, LiteSpeed Cache, or W3 Total Cache is active, the settings page shows the same limitation.
Step 5
Verify the first server-observed visit
Return to AI Traffic and keep verification open. Foglift confirms the installation only after the endpoint receives a recognized crawler request or AI answer referral from your hostname.
Open AI TrafficBrowser pixel alternative for referral clicks
The plugin above already injects this pixel for you once your token is saved. If you cannot install the plugin, add the browser pixel by hand with a header snippets plugin or your theme's Appearance → Customize script field. It records recognized AI answer referral clicks but cannot see crawler visits.
Open Plugins → Add New Plugin to install a trusted header snippets tool, or use an existing site-wide Head field.
<script async src="https://foglift.io/pixel.js" data-foglift-brand="YOUR_WORKSPACE_ID"></script>