Back to integrations
HTML

HTML

Add AI SEO tracking to any HTML website with our simple script. Monitor how AI interacts with your content and optimize for better visibility in AI search.

Overview

Our HTML integration is designed for any website, regardless of how it's built. Simply add our tracking script to your HTML pages and start monitoring how AI systems interact with your content immediately. This client-side solution is compatible with all web platforms and hosting providers, making it the most versatile option for tracking AI interactions.

Features

  • Works with any HTML website
  • Simple script installation
  • No framework dependencies
  • Lightweight impact on page load
  • Compatible with all major browsers
  • Easy to add to existing websites
  • No server configuration required
  • Universal compatibility with any hosting platform

Requirements

  • Access to edit your website's HTML
  • API key from xseek
  • Website ID from your xseek dashboard

Setup Process

  1. 1

    Copy our JavaScript tracking code

  2. 2

    Add the script to the <head> section of your HTML pages

  3. 3

    Replace the placeholder values with your API key and website ID

  4. 4

    Save and deploy your changes to start tracking AI visits

Integration Setup

Important Information

Make sure to replace YOUR_API_KEY and YOUR_WEBSITE_ID with your actual values in the integration code. Your API key can be found in your account settings.

JavaScript Integration (Works with any HTML website)

Add this script to the <head> section of your HTML:

<!-- Add this script to your website (works with any HTML site) -->
<script>
  // Function to detect AI bots
  function checkForAIBot() {
    const userAgent = navigator.userAgent;
    
    // Define patterns for all known AI bots
    const AI_BOTS = [
    { name: 'anthropic-ai', pattern: /anthropic-ai/i },
    { name: 'claudebot', pattern: /ClaudeBot/i },
    { name: 'claude-web', pattern: /claude-web/i },

    { name: 'perplexitybot', pattern: /PerplexityBot/i },
    { name: 'perplexity-user', pattern: /Perplexity-User/i },

    { name: 'grokbot', pattern: /GrokBot(?!.*DeepSearch)/i },
    { name: 'grok-search', pattern: /xAI-Grok/i },
    { name: 'grok-deepsearch', pattern: /Grok-DeepSearch/i },

    { name: 'deepseekbot', pattern: /DeepSeekBot/i },

    { name: 'GPTBot', pattern: /GPTBot/i },
    { name: 'chatgpt-user', pattern: /ChatGPT-User/i },
    { name: 'oai-searchbot', pattern: /OAI-SearchBot/i },

    { name: 'google-extended', pattern: /Google-Extended/i },

    { name: 'applebot', pattern: /Applebot(?!-Extended)/i },
    { name: 'applebot-extended', pattern: /Applebot-Extended/i },

    { name: 'meta-external', pattern: /meta-externalagent/i },
    { name: 'meta-externalfetcher', pattern: /meta-externalfetcher/i },

    { name: 'bingbot', pattern: /Bingbot(?!.*AI)/i },
    { name: 'bingpreview', pattern: /bingbot.*Chrome/i },
    { name: 'microsoftpreview', pattern: /MicrosoftPreview/i },

    { name: 'cohere-ai', pattern: /cohere-ai/i },
    { name: 'cohere-training-data-crawler', pattern: /cohere-training-data-crawler/i },

    { name: 'youbot', pattern: /YouBot/i },

    { name: 'duckassistbot', pattern: /DuckAssistBot/i },

    { name: 'semanticscholarbot', pattern: /SemanticScholarBot/i },

    { name: 'ccbot', pattern: /CCBot/i },

    { name: 'ai2bot', pattern: /AI2Bot/i },
    { name: 'ai2bot-dolma', pattern: /AI2Bot-Dolma/i },

    { name: 'aihitbot', pattern: /aiHitBot/i },

    { name: 'amazonbot', pattern: /Amazonbot/i },
    { name: 'novaact', pattern: /NovaAct/i },

    { name: 'brightbot', pattern: /Brightbot/i },

    { name: 'bytespider', pattern: /Bytespider/i },
    { name: 'tiktokspider', pattern: /TikTokSpider/i },

    { name: 'cotoyogi', pattern: /Cotoyogi/i },

    { name: 'crawlspace', pattern: /Crawlspace/i },

    { name: 'pangubot', pattern: /PanguBot/i },
    { name: 'petalbot', pattern: /PetalBot/i },

    { name: 'semrushbot-ocob', pattern: /SemrushBot-OCOB/i },
    { name: 'semrushbot-swa', pattern: /SemrushBot-SWA/i },

    { name: 'sidetrade-indexer', pattern: /Sidetrade indexer bot/i },

    { name: 'timpibot', pattern: /Timpibot/i },

    { name: 'velenpublicwebcrawler', pattern: /VelenPublicWebCrawler/i },

    { name: 'omgili', pattern: /omgili/i },
    { name: 'omgilibot', pattern: /omgilibot/i },
    { name: 'webzio-extended', pattern: /Webzio-Extended/i }
    ];
    
    // Check if the user agent matches any bot pattern
    for (const bot of AI_BOTS) {
      if (bot.pattern.test(userAgent)) {
        // Send data to the tracking API
        fetch('https://api.aiseotracker.com/track-ai-bot', {
          method: 'POST',
          headers: {
            'Content-Type': 'application/json',
            'x-api-key': 'YOUR_API_KEY', // Replace with your actual API key
          },
          body: JSON.stringify({
            botName: bot.name,
            userAgent: userAgent,
            url: window.location.href,
            referer: document.referrer || undefined,
            websiteId: 'YOUR_WEBSITE_ID', // Replace with your website ID
          }),
        }).catch(error => {
          console.error('Error tracking AI bot:', error);
        });
        
        console.log('AI bot detected:', bot.name);
        break;
      }
    }
  }
  
  // Run the check when the page loads
  window.addEventListener('load', checkForAIBot);
</script>

Note: Client-side detection is less reliable than server-side since some bots don't execute JavaScript. For optimal tracking, use server-side integration when possible.

Ready to go!

Your HTML website is now set up to track AI crawler visits. Visit the xseek dashboard to see your data.

Need more help?

Check our comprehensive documentation for detailed instructions.

View documentation