AI Pages Installation
Step-by-step guide to installing AI Pages on your website.
- Set up AI Pages in under 15 minutes
- Choose from 9 supported platforms (Cloudflare, Vercel, Netlify, Next.js, CloudFront, WordPress, Node.js, Nginx, or manual)
- Get personalized integration code generated for your platform
- Verify everything works with the built-in test tool
This guide walks you through the complete AI Pages installation process. By the end, AI crawlers visiting your site will receive optimized content while human visitors see your normal website unchanged.
Supported platforms
AI Pages integrates with all major hosting platforms. During setup, you'll choose your platform and receive personalized code:
| Platform | Runtime | Difficulty |
|---|---|---|
| Cloudflare Workers | Cloudflare Edge | Easy |
| Vercel Edge Middleware | Vercel Edge | Easy |
| Netlify Edge Functions | Netlify Edge (Deno) | Easy |
| Next.js Middleware | Next.js Edge Runtime | Easy |
| AWS CloudFront | Lambda@Edge (Node.js) | Medium |
| WordPress | PHP mu-plugin | Easy |
| Node.js / Express | Node.js | Easy |
| Nginx / OpenResty | OpenResty (Lua) | Advanced |
| Other (Shopify, Squarespace, Wix, etc.) | Cloudflare DNS Proxy | Medium |
For platforms without native server-side support (like Shopify, Squarespace, or Webflow), you can use Cloudflare as a free DNS proxy in front of your site.
Prerequisites
Before starting, make sure you have:
- [ ] A Trakkr Growth or Scale plan (AI Pages is not available on Free)
- [ ] Access to your hosting platform's configuration (e.g., code deployment, plugin uploads, or DNS settings)
- [ ] About 15 minutes of uninterrupted time
Step 1: Configure AI Pages in Trakkr
- 1Go to Trakkr → AI Pages
- 2Click Enable AI Pages
- 3Enter your domain (e.g., nike.com)
- 4Click Continue
Step 2: Choose your platform
Select the platform that matches where your site is hosted. Trakkr will generate integration code specific to your platform.
Step 3: Select AI crawlers
Choose which AI crawlers should receive optimized content:
| Crawler | Company | Recommended |
|---|---|---|
| GPTBot | OpenAI | ✓ Yes |
| ChatGPT Browser | OpenAI | ✓ Yes |
| OpenAI SearchBot | OpenAI | ✓ Yes |
| ClaudeBot | Anthropic | ✓ Yes |
| PerplexityBot | Perplexity | ✓ Yes |
| Google-Extended | ✓ Yes | |
| Google-Agent | ✓ Yes |
Most sites enable all AI crawlers by default.
Step 4: Select optimization features
Enable the optimization features you want:
| Feature | What it does | Recommended |
|---|---|---|
| Structured Data Injection | Adds JSON-LD schema markup | ✓ Yes |
| Key Facts Extraction | Marks important data points | ✓ Yes |
| Automated FAQ Injection | Generates Q&A pairs | ✓ Yes |
| AI Summary Block | Creates page summaries | ✓ Yes |
| Entity Recognition | Identifies brands/products/people | ✓ Yes |
We recommend enabling all features for maximum optimization.
Step 5: Deploy the integration
After saving your settings, Trakkr generates personalized integration code for your chosen platform. The setup wizard shows platform-specific instructions, but here's a summary for each:
Cloudflare Workers
- 1Create a Worker in Workers & Pages
- 2Paste the generated code
- 3Add a Worker Route matching your domain (
*yourdomain.com/*)
Vercel / Next.js
- 1Create
middleware.tsat your project root - 2Paste the generated code
- 3Commit and deploy
Netlify
- 1Create
netlify/edge-functions/prism.ts - 2Paste the generated code
- 3Add the edge function config to
netlify.toml - 4Deploy
AWS CloudFront
- 1Create a Lambda function in us-east-1 (Node.js 20.x)
- 2Paste the generated code
- 3Publish a version and attach as a CloudFront viewer-request trigger
WordPress
- 1Save the generated code as
trakkr-prism.php - 2Upload to
wp-content/mu-plugins/via FTP/SFTP - 3Must-use plugins load automatically — no activation needed
Node.js / Express
- 1Save as
prism-middleware.js - 2Add
app.use(require('./prism-middleware'))before your routes - 3Restart your server
Nginx / OpenResty
- 1Install OpenResty and lua-resty-http
- 2Add the Lua block to your
server {}config - 3Reload Nginx
Other (Shopify, Squarespace, Wix, etc.)
- 1Sign up for Cloudflare (free) and add your domain
- 2Update your nameservers to Cloudflare's
- 3Deploy a Cloudflare Worker with the generated code
- 4Add a Worker Route for your domain
Step 6: Verify setup
Test that everything is working:
Quick test in Trakkr
- 1Go to Trakkr → AI Pages
- 2Use the Test tool to analyze any page on your domain
- 3You should see optimized HTML with AI Pages enhancements
Manual test with curl
Open a terminal and run:
curl -A "GPTBot" https://yourdomain.com/ | head -100You should see optimized HTML with schema markup, not your normal site.
Check for AI Pages headers
Look for these headers in the response:
X-Prism-Optimized: true
X-Prism-Cache: HIT (or MISS)Check AI Pages Analytics
- 1Go to Trakkr → AI Pages → Dashboard
- 2You should see your test request logged
- 3Status should show "Cache Created" or "Cache Served"
Troubleshooting installation
Integration not intercepting requests
- Verify the integration code is deployed and active
- Check that your platform's routing is configured correctly
- Confirm the integration runs before your app's route handlers
"Optimization not applied"
- Verify your API key in the integration code is correct
- Check that the crawler user-agent matches (e.g., "GPTBot")
- Review your platform's logs for errors
"Site not loading" or errors
- Remove or disable the AI Pages integration (this instantly restores normal operation)
- Check your platform's status page for outages
- Verify the integration code was copied correctly
"API key invalid"
- Regenerate your API key in Trakkr → AI Pages → Settings
- Update your integration code with the new key
- Redeploy
Still stuck?
Contact [email protected] with:
- Your domain
- Which platform you're using
- Screenshots of any errors
- Your platform's error logs
What happens next?
After setup, AI Pages will:
- 1Detect AI crawler visits automatically
- 2Serve optimized content from cache (~100ms response)
- 3Log all activity in your AI Pages Analytics dashboard
- 4Count requests against your monthly usage
Next steps
Usage & Billing
Understand your usage limits and costs.
Analytics
Monitor crawler visits and optimization performance.
Technical Details
Learn exactly how AI Pages works under the hood.
Was this helpful?
