LLMS Central - The Robots.txt for AI
October 21, 2025 â€ĸ 10 min read

How to Install AI Bot Tracker: 4 Methods for Every Platform

WordPress Plugin, Cloudflare Workers, Server-Side, or Client-Side - Choose the best installation method for your setup.

🚀
Complete Installation Guide
4 Methods â€ĸ All Platforms â€ĸ From Beginner to Advanced

What You'll Need

🌐

Your Website

Access to your site settings

âąī¸

2 Minutes

Quick and easy setup

🆓

Free Account

No credit card needed

Choose Your Installation Method

We offer multiple installation methods to fit your technical setup and preferences:

Method 1: WordPress Plugin (Recommended)

📝

WordPress Plugin

Server-side tracking with one-click installation

✅ Why Use the Plugin?

  • â€ĸ No coding required - Install in 30 seconds
  • â€ĸ Server-side tracking - More accurate than JavaScript
  • â€ĸ Automatic updates - Always get latest bot detection
  • â€ĸ Dashboard integration - View stats in WordPress admin
  1. 1.Go to Plugins → Add New in your WordPress dashboard
  2. 2.Search for "LLMs Central Bot Tracker"
  3. 3.Click Install Now, then Activate
  4. 4.Go to Settings → Bot Tracker
  5. 5.Enter your domain from your LLMs Central dashboard
  6. 6.Click Save Changes - Done! 🎉

💡 Alternative: Download from our WordPress plugin page or install directly from the WordPress plugin directory.

Method 2: Cloudflare Workers (Edge Tracking)

⚡

Cloudflare Workers

Track bots at the edge before they hit your server

✅ Why Use Cloudflare Workers?

  • â€ĸ Zero latency - Runs at the edge, not your server
  • â€ĸ Works with any backend - WordPress, static sites, anything
  • â€ĸ No server changes - Deploy in Cloudflare dashboard
  • â€ĸ Catches ALL traffic - Even before it hits your site
  • â€ĸ Free tier available - 100K requests/day free
  • â€ĸ Interactive setup guide - Copy code, test installation
🚀

Complete Cloudflare Workers Setup Guide

Interactive guide with copy-paste code, testing tools, and step-by-step instructions

View Full Cloudflare Setup Guide →

💡 Pro Tip: The dedicated guide includes a one-click copy button, interactive testing, and advanced configuration options. Perfect for high-traffic sites!

Method 3: Server-Side Tracking (Custom Backends)

🔧

Server-Side Integration

Add to your backend for maximum accuracy

✅ Why Server-Side?

  • â€ĸ More accurate - Catches bots that block JavaScript
  • â€ĸ Better performance - No client-side overhead
  • â€ĸ Works with any framework - Node.js, Python, PHP, Ruby, etc.

📋 How It Works

  1. 1. Choose your language/framework - Pick from the examples below (Node.js, Next.js, Python, or PHP)
  2. 2. Copy the code - Add it to your backend as middleware or at the top of your main file
  3. 3. Replace 'yourdomain.com' - Change it to your actual domain name
  4. 4. Deploy - Push your changes and the tracking starts immediately

💡 The code sends a request to our API for each page visit. It's non-blocking (fire and forget) so it won't slow down your site.

Node.js / Express

app.use(async (req, res, next) => {
  const domain = 'yourdomain.com' // Replace with your domain
  const userAgent = req.headers['user-agent'] || ''
  const ip = req.ip || req.headers['x-forwarded-for'] || ''
  
  // Track the request (fire and forget)
  fetch('https://llmscentral.com/api/bot-tracker', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'User-Agent': userAgent,
      'X-Forwarded-For': ip
    },
    body: JSON.stringify({
      domain: domain,
      page: req.path
    })
  }).catch(err => console.error('Bot tracking error:', err))
  
  next()
})

Next.js Middleware

// middleware.ts
import { NextRequest, NextResponse } from 'next/server'

export async function middleware(request: NextRequest) {
  const domain = 'yourdomain.com' // Replace with your domain
  const userAgent = request.headers.get('user-agent') || ''
  const ip = request.ip || request.headers.get('x-forwarded-for') || ''
  
  // Track the request (fire and forget)
  fetch('https://llmscentral.com/api/bot-tracker', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'User-Agent': userAgent,
      'X-Forwarded-For': ip
    },
    body: JSON.stringify({
      domain: domain,
      page: request.nextUrl.pathname
    })
  }).catch(err => console.error('Bot tracking error:', err))
  
  return NextResponse.next()
}

Python / Django

import requests
import json

class BotTrackerMiddleware:
    def __init__(self, get_response):
        self.get_response = get_response
    
    def __call__(self, request):
        domain = 'yourdomain.com'  # Replace with your domain
        user_agent = request.META.get('HTTP_USER_AGENT', '')
        ip = request.META.get('REMOTE_ADDR', '')
        
        # Track the request (fire and forget)
        try:
            requests.post(
                'https://llmscentral.com/api/bot-tracker',
                headers={
                    'Content-Type': 'application/json',
                    'User-Agent': user_agent,
                    'X-Forwarded-For': ip
                },
                json={
                    'domain': domain,
                    'page': request.path
                },
                timeout=1
            )
        except:
            pass  # Don't block request if tracking fails
        
        return self.get_response(request)

PHP

<?php
$domain = 'yourdomain.com'; // Replace with your domain
$userAgent = $_SERVER['HTTP_USER_AGENT'] ?? '';
$ip = $_SERVER['REMOTE_ADDR'] ?? '';
$page = $_SERVER['REQUEST_URI'] ?? '/';

// Track the request (fire and forget)
$data = json_encode([
    'domain' => $domain,
    'page' => $page
]);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://llmscentral.com/api/bot-tracker');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Content-Type: application/json',
    "User-Agent: $userAgent",
    "X-Forwarded-For: $ip"
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 1);
curl_exec($ch);
curl_close($ch);
?>

Method 4: Client-Side JavaScript (Search Engines Only)

âš ī¸

Important: Limited AI Bot Detection

Client-side JavaScript tracking only works for search engines (Google, Bing) and cannot reliably track AI bots like GPTBot, Claude, or Perplexity because:

  • â€ĸ AI bots often don't execute JavaScript
  • â€ĸ Many AI crawlers block client-side tracking
  • â€ĸ Server-side detection is required for accurate AI bot tracking

✅ For AI Bot Tracking, Use:

Use this method only if you need basic search engine tracking and don't have backend access:

📝

WordPress

  1. 1.Copy your tracking code from /widget
  2. 2.Go to Appearance → Theme File Editor
  3. 3.Select footer.php from the right sidebar
  4. 4.Find the </body> tag (usually near the bottom)
  5. 5.Paste your tracking code just before the </body> tag
  6. 6.Click Update File

💡 Alternative: Use a plugin like "Insert Headers and Footers" or "WPCode" for easier management without editing theme files.

đŸ›ī¸

Shopify

  1. 1.Copy your tracking code from /widget
  2. 2.Go to Online Store → Themes
  3. 3.Click Actions → Edit Code
  4. 4.Open theme.liquid from the Layout folder
  5. 5.Scroll to find </body>
  6. 6.Paste your code before </body>
  7. 7.Click Save
🎨

Wix

  1. 1.Copy your tracking code from /widget
  2. 2.Go to Settings → Custom Code in your Wix dashboard
  3. 3.Click + Add Custom Code
  4. 4.Paste your tracking code
  5. 5.Name it "AI Bot Tracker"
  6. 6.Select Body - end for placement
  7. 7.Choose All Pages
  8. 8.Click Apply
âŦ›

Squarespace

  1. 1.Copy your tracking code from /widget
  2. 2.Go to Settings → Advanced → Code Injection
  3. 3.Paste your code in the Footer section
  4. 4.Click Save

âš ī¸ Note: Code Injection is available on Business plans and higher.

🌊

Webflow

  1. 1.Copy your tracking code from /widget
  2. 2.Go to Project Settings → Custom Code
  3. 3.Paste your code in the Footer Code section
  4. 4.Click Save Changes
  5. 5.Publish your site
đŸ”ļ

HubSpot

  1. 1.Copy your tracking code from /widget
  2. 2.Go to Settings → Website → Pages
  3. 3.Scroll to Site Footer HTML
  4. 4.Paste your tracking code
  5. 5.Click Save

💡 Alternative: Add to individual page templates for more granular control.

đŸˇī¸

Google Tag Manager

  1. 1.Copy your tracking code from /widget
  2. 2.Log in to Google Tag Manager
  3. 3.Go to Tags → New
  4. 4.Click Tag Configuration → Custom HTML
  5. 5.Paste the code in the HTML field
  6. 6.Set Triggering to All Pages
  7. 7.Name it "LLMS Central Bot Tracker"
  8. 8.Click Save and then Submit to publish

💡 Perfect for marketers: If you already use GTM for analytics, this is the easiest method - no code access needed!

▲

Next.js

  1. 1.Copy your tracking code from /widget
  2. 2.Open app/layout.tsx (App Router) or pages/_app.tsx (Pages Router)
  3. 3.Import Script component: import Script from 'next/script'
  4. 4.Add in the body: <Script src="https://llmscentral.com/widget.js" data-domain="yourdomain.com" />
âš›ī¸

React

  1. 1.Copy your tracking code from /widget
  2. 2.Open public/index.html
  3. 3.Find the </body> tag
  4. 4.Paste your code before </body>
  5. 5.Rebuild your app
📄

HTML / Static Sites

  1. 1.Copy your tracking code from /widget
  2. 2.Open your HTML file in a text editor
  3. 3.Find the </body> tag (usually at the bottom)
  4. 4.Paste your code just before </body>
  5. 5.Save the file and upload to your server

Verify Installation

After installing, verify it's working:

1

Visit Your Website

Open your site in a browser

2

Check Network Tab

Open DevTools (F12) → Network → Look for "bot-tracker" request

3

View Dashboard

Go to your dashboard and click "Refresh" - you should see "✓ Installed"

Troubleshooting

❌ "Not Installed" in Dashboard

  • â€ĸ Make sure you pasted the code before </body>
  • â€ĸ Clear your browser cache and reload
  • â€ĸ Check if your domain matches exactly (no www or https://)

❌ CORS Error in Console

  • â€ĸ This should be fixed automatically - our API allows all origins
  • â€ĸ If persists, contact support at support@llmscentral.com

❓ No Bot Visits Yet

  • â€ĸ AI bots typically discover sites within 1-7 days
  • â€ĸ Make sure your site is publicly accessible
  • â€ĸ Submit your sitemap to search engines to speed up discovery

Need Help?

We're here to help you get set up:

🚀

Ready to Track AI Bots?

Get your tracking code and start seeing which AI models visit your site.

Get Tracking Code →

Last Updated: October 3, 2025 â€ĸ Platform instructions verified and tested on all major website builders.