Track AI crawlersvisiting your site

ai.js shows you when ChatGPT, Claude, and other AI models visit your website. Understand AI traffic patterns to optimize your content strategy.

Real-time visibilityinto AI traffic

Teams that use ai.js understand their AI traffic patterns and optimize content accordingly

3x
More AI crawler visits detected
vs. server logs alone
15+
AI models tracked
Including GPT, Claude, Gemini
yoursite.com
// Add to your website
<script
src="https://ai.js/track.js"
data-site="your-site"
></script>
ai.js tracking active

One Line Setup

Add the ai.js script to your website and start tracking AI crawler visits immediately.

/pricing
GPT-4
/features
Claude
/docs
Gemini
/about
Perplexity
Live AI Visits

Live Page Tracking

See exactly which pages AI models are visiting on your website in real-time.

AI Traffic Insights
Last 7 days
127
AI Visits
8
AI Models
Top Crawled Pages:
/pricing42 visits
/features38 visits
/docs31 visits

Detailed Analytics

Get comprehensive insights about AI crawler behavior and content preferences.

Implementation Examples

See how leading companies use ai.js to track AI crawler behavior

Basic Setup

Basic Implementation
<!-- Add this to your website's <head> section -->
<script src="https://cdn.trylapis.com/ai.js"></script>
<script>
  // Initialize AI crawler tracking
  Lapis.init({
    apiKey: 'your-api-key-here',
    trackBots: ['GPTBot', 'Claude-Web', 'Bard', 'all'],
    realtime: true,
    privacy: 'strict'
  });

  // Track page views from AI bots
  Lapis.track('page_view', {
    url: window.location.href,
    title: document.title,
    category: 'product-page'
  });

  // Monitor content extraction events
  Lapis.onExtraction((data) => {
    console.log('AI bot extracted content:', data);
    // Send to your analytics
  });

  // Real-time AI crawler alerts
  Lapis.onCrawl((crawler) => {
    if (crawler.bot === 'GPTBot') {
      console.log('ChatGPT is reading your site');
      // Trigger real-time notification
    }
  });
</script>

Advanced Features

Advanced Configuration
// Advanced ai.js configuration
Lapis.init({
  apiKey: 'your-api-key',
  trackBots: 'all',
  realtime: true,
  webhooks: {
    url: 'https://your-site.com/webhook',
    events: ['crawl', 'extraction']
  },
  analytics: {
    googleAnalytics: 'GA-XXXXX',
    customEvents: true
  }
});

// Custom event tracking
Lapis.onCrawl((data) => {
  // Send to your CRM
  sendToCRM(data);
  
  // Trigger marketing automation
  if (data.bot === 'GPTBot') {
    triggerSequence('chatgpt-visit');
  }
});

Understanding yourAI visitors

Know what content AI models prefer and adapt as they evolve

/pricing
/features
/docs

See what content AI likes

Different AI models visit different pages on your site. Some prefer your blog posts, others your product pages.

• Track which pages get visited most
• See patterns in AI behavior
• Optimize your best content

Stay ahead of changes

AI models update their crawling patterns regularly. Know immediately when they change and adapt accordingly.

• Get alerts for new crawlers
• Monitor frequency changes
• Adapt to new AI behaviors

Real-time intelligence

See AI crawler activity as it happens. Understand what people are searching AI models for.

• Live crawler detection
• Content preference insights
• Behavioral pattern analysis

Frequently Asked Questions

faq.md - Technical ai.js FAQ
5 questions
01
## How does ai.js detect different AI crawlers and bots?
// ai.js uses advanced user-agent parsing, behavioral analysis, and IP reputation databases to identify AI crawlers. It recognizes over 25 different AI bots including GPTBot, Claude-Web, Bard, and others through their unique fingerprints and crawling patterns.
02
## What data does ai.js collect about AI crawler visits?
// ai.js tracks crawler type, visit timestamp, pages accessed, time spent on page, content extracted, and referral sources. All data is privacy-compliant and focuses on understanding AI bot behavior rather than user tracking.
03
## How does real-time tracking work without impacting site performance?
// ai.js uses lightweight event listeners and asynchronous data transmission. The script is only 12KB minified and uses Web Workers for background processing. Real-time events are batched and sent efficiently to minimize performance impact.
04
## Can ai.js detect AI bots that don't identify themselves?
// Yes, ai.js employs machine learning models to identify stealth crawlers based on browsing patterns, request timing, and behavioral signatures. It can detect bots that attempt to mimic human behavior or use generic user agents.
05
## What happens if an AI bot has JavaScript disabled?
// ai.js provides server-side tracking options through log analysis and header inspection. You can combine client-side JavaScript tracking with server-side detection for comprehensive coverage of all AI crawler visits.
MarkdownUTF-8
Lapis Labs Engineering

Start tracking AI searchAdd ai.js to your website.