Learn how to install and configure the CleverSearch tracker script on your website to enable AI-powered content optimization and analytics.
Dynamically injects optimized titles, meta descriptions, keywords, FAQs, and content paragraphs
Automatically detects and handles single-page application route changes (Next.js, React, Vue, Angular)
Tracks Core Web Vitals (LCP, FID, CLS) and page performance metrics
Collects user behavior data, page views, and interaction events
Robust error handling with automatic retries and graceful degradation
Built-in debugging capabilities for troubleshooting integration issues
<Script
src="https://backend.cleversearch.ai/tracker/v1/tracker.js"
strategy="beforeInteractive"
async
data-config='{"SITE_ID": "your-site-id"}'
/><script
src="https://backend.cleversearch.ai/tracker/v1/tracker.js"
async
defer
data-config='{"SITE_ID": "your-site-id"}'
></script><script
src="https://backend.cleversearch.ai/tracker/v1/tracker.js"
async
defer
data-config='{"SITE_ID": "your-site-id"}'
></script><script
src="https://backend.cleversearch.ai/tracker/v1/tracker.js"
async
defer
data-config='{"SITE_ID": "your-site-id"}'
></script><script
src="https://backend.cleversearch.ai/tracker/v1/tracker.js"
async
defer
data-config='{"SITE_ID": "your-site-id"}'
></script><script
src="https://backend.cleversearch.ai/tracker/v1/tracker.js"
async
defer
data-config='{"SITE_ID": "your-site-id"}'
></script><script
src="https://backend.cleversearch.ai/tracker/v1/tracker.js"
async
defer
data-config='{"SITE_ID": "your-site-id"}'
></script>data-config='{"SITE_ID": "your-site-id"}'Replace "your-site-id" with your actual site ID from the dashboard.
data-config='{
"SITE_ID": "your-site-id",
"API_BASE": "https://backend.cleversearch.ai",
"DEBUG_MODE": false,
"RETRY_ATTEMPTS": 3,
"TIMEOUT": 2000
}'Most users only need the SITE_ID. Other options are for advanced use cases.
Check that the script URL is accessible and your SITE_ID is correct
Verify your site ID and check browser console for errors
Ensure the script loads before your SPA framework initializes
The script is optimized for minimal impact, but check network tab for any issues
Enable debug mode to see detailed logging in the browser console. This helps troubleshoot integration issues and verify the script is working correctly.
Method 1: URL Parameter
?clever-search-debug=trueMethod 2: Configuration
data-config='{"SITE_ID": "your-site-id", "DEBUG_MODE": true}'The script exposes a global API for manual control:
window.LLMOptimizer.refresh() // Refresh contentwindow.LLMOptimizer.getStats() // Get statisticswindow.LLMOptimizer.enableDebug() // Enable debug modeAfter installing the tracker script, you can start optimizing your content and tracking performance.
Reliable data collection is the foundation for accurate optimization.
Week 1: Foundation
Finish installation and validate data flow.
Output: Connected tracker, imported sitemap, baseline analysis report.
Week 2: Prioritization
Select high-impact pages and define task backlog.
Output: Prioritized optimization list with owners and due dates.
Week 3-4: Iteration
Ship updates and verify score + business impact.
Output: Before/after snapshots with measurable deltas.
Analyzed Coverage
>= 90% priority URLs analyzed monthly
Ensures optimization decisions are based on current data.
Score Movement
+8 to +15 points on target templates in 30-60 days
Validates that executed recommendations are improving quality.
Execution Velocity
At least 1 improvement cycle per week
Creates compounding gains from consistent iteration.