Add AI Bot Tracking
Track which AI crawlers visit your website. See GPTBot, ClaudeBot, PerplexityBot, and 100+ other AI bots in real-time.
TL;DR: Add one script tag to track AI bot traffic. No cookies, GDPR-friendly, ~1KB.
Important: Most AI crawlers (GPTBot, ClaudeBot, PerplexityBot, etc.) don't execute JavaScript—they just fetch raw HTML.
This JS pixel is a quick start that catches human visitors and JS-executing AI agents (like ChatGPT web browsing). For comprehensive crawler detection, combine with server-side log integration. Learn more about our hybrid approach.
Fastest Setup (30 seconds)
Add this script tag to your HTML, just before the closing </body> tag:
<script
src="https://www.aisearchindex.com/pixel.js"
data-tid="YOUR_TRACKING_ID"
data-spa="true"
></script>YOUR_TRACKING_ID with your ID from the dashboardFramework Integrations
Next.js (App Router)
import Script from 'next/script'
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<body>
{children}
<Script
src="https://www.aisearchindex.com/pixel.js"
data-tid="YOUR_TRACKING_ID"
data-spa="true"
strategy="afterInteractive"
/>
</body>
</html>
)
}React / Vite / Create React App
import { useEffect } from 'react'
function App() {
useEffect(() => {
const script = document.createElement('script')
script.src = 'https://www.aisearchindex.com/pixel.js'
script.dataset.tid = 'YOUR_TRACKING_ID'
script.dataset.spa = 'true'
script.async = true
document.body.appendChild(script)
return () => { document.body.removeChild(script) }
}, [])
return <div>{/* Your app */}</div>
}
export default AppVue.js / Nuxt
<script setup>
import { onMounted, onUnmounted } from 'vue'
let script = null
onMounted(() => {
script = document.createElement('script')
script.src = 'https://www.aisearchindex.com/pixel.js'
script.dataset.tid = 'YOUR_TRACKING_ID'
script.dataset.spa = 'true'
script.async = true
document.body.appendChild(script)
})
onUnmounted(() => {
if (script) document.body.removeChild(script)
})
</script>Astro
---
// Layout.astro
---
<html>
<body>
<slot />
<script
src="https://www.aisearchindex.com/pixel.js"
data-tid="YOUR_TRACKING_ID"
data-spa="true"
is:inline
></script>
</body>
</html>SvelteKit
<script>
import { onMount } from 'svelte'
onMount(() => {
const script = document.createElement('script')
script.src = 'https://www.aisearchindex.com/pixel.js'
script.dataset.tid = 'YOUR_TRACKING_ID'
script.dataset.spa = 'true'
script.async = true
document.body.appendChild(script)
})
</script>
<slot />Remix
import { Scripts } from "@remix-run/react"
export default function App() {
return (
<html>
<body>
<Outlet />
<script
src="https://www.aisearchindex.com/pixel.js"
data-tid="YOUR_TRACKING_ID"
data-spa="true"
/>
<Scripts />
</body>
</html>
)
}What You'll Track
AI Training Crawlers
GPTBot, ClaudeBot, Google-Extended, Bytespider, CCBot, Cohere, and more
AI Search Bots
ChatGPT-User, PerplexityBot, Claude-Web, YouBot, KagiBot
Search Engines
Googlebot, Bingbot, DuckDuckBot, YandexBot, Applebot
Other Bots
Social media bots, SEO tools, monitoring services
Privacy & Compliance
- No cookies — We don't use or set any cookies
- GDPR compliant — No personal data collection
- Lightweight — ~1KB script, minimal performance impact
- No consent banner needed — Bot analytics don't require user consent