Skip to content

AI Pages Installation

Step-by-step guide to installing AI Pages on your website.

10 min readUpdated Mar 7, 2026
What you'll achieve
  • 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:

PlatformRuntimeDifficulty
Cloudflare WorkersCloudflare EdgeEasy
Vercel Edge MiddlewareVercel EdgeEasy
Netlify Edge FunctionsNetlify Edge (Deno)Easy
Next.js MiddlewareNext.js Edge RuntimeEasy
AWS CloudFrontLambda@Edge (Node.js)Medium
WordPressPHP mu-pluginEasy
Node.js / ExpressNode.jsEasy
Nginx / OpenRestyOpenResty (Lua)Advanced
Other (Shopify, Squarespace, Wix, etc.)Cloudflare DNS ProxyMedium

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

  1. 1Go to Trakkr → AI Pages
  2. 2Click Enable AI Pages
  3. 3Enter your domain (e.g., nike.com)
  4. 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.

Note
Not sure which to pick? If your site is deployed on Vercel, choose Vercel. If it's a WordPress site, choose WordPress. If you use Cloudflare for DNS, choose Cloudflare Workers. If your platform isn't listed, choose "Other" for a Cloudflare DNS proxy setup.

Step 3: Select AI crawlers

Choose which AI crawlers should receive optimized content:

CrawlerCompanyRecommended
GPTBotOpenAI✓ Yes
ChatGPT BrowserOpenAI✓ Yes
OpenAI SearchBotOpenAI✓ Yes
ClaudeBotAnthropic✓ Yes
PerplexityBotPerplexity✓ Yes
Google-ExtendedGoogle✓ Yes
Google-AgentGoogle✓ Yes

Most sites enable all AI crawlers by default.


Step 4: Select optimization features

Enable the optimization features you want:

FeatureWhat it doesRecommended
Structured Data InjectionAdds JSON-LD schema markup✓ Yes
Key Facts ExtractionMarks important data points✓ Yes
Automated FAQ InjectionGenerates Q&A pairs✓ Yes
AI Summary BlockCreates page summaries✓ Yes
Entity RecognitionIdentifies 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

  1. 1Create a Worker in Workers & Pages
  2. 2Paste the generated code
  3. 3Add a Worker Route matching your domain (*yourdomain.com/*)

Vercel / Next.js

  1. 1Create middleware.ts at your project root
  2. 2Paste the generated code
  3. 3Commit and deploy

Netlify

  1. 1Create netlify/edge-functions/prism.ts
  2. 2Paste the generated code
  3. 3Add the edge function config to netlify.toml
  4. 4Deploy

AWS CloudFront

  1. 1Create a Lambda function in us-east-1 (Node.js 20.x)
  2. 2Paste the generated code
  3. 3Publish a version and attach as a CloudFront viewer-request trigger

WordPress

  1. 1Save the generated code as trakkr-prism.php
  2. 2Upload to wp-content/mu-plugins/ via FTP/SFTP
  3. 3Must-use plugins load automatically — no activation needed

Node.js / Express

  1. 1Save as prism-middleware.js
  2. 2Add app.use(require('./prism-middleware')) before your routes
  3. 3Restart your server

Nginx / OpenResty

  1. 1Install OpenResty and lua-resty-http
  2. 2Add the Lua block to your server {} config
  3. 3Reload Nginx

Other (Shopify, Squarespace, Wix, etc.)

  1. 1Sign up for Cloudflare (free) and add your domain
  2. 2Update your nameservers to Cloudflare's
  3. 3Deploy a Cloudflare Worker with the generated code
  4. 4Add a Worker Route for your domain
Warning
Keep your API key secret. Don't share the integration code publicly. The API key is tied to your billing.

Step 6: Verify setup

Test that everything is working:

Quick test in Trakkr

  1. 1Go to Trakkr → AI Pages
  2. 2Use the Test tool to analyze any page on your domain
  3. 3You should see optimized HTML with AI Pages enhancements

Manual test with curl

Open a terminal and run:

Terminal
curl -A "GPTBot" https://yourdomain.com/ | head -100

You should see optimized HTML with schema markup, not your normal site.

Check for AI Pages headers

Look for these headers in the response:

Text
X-Prism-Optimized: true
X-Prism-Cache: HIT (or MISS)

Check AI Pages Analytics

  1. 1Go to Trakkr → AI Pages → Dashboard
  2. 2You should see your test request logged
  3. 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?

Tip
Be patient. AI crawlers visit periodically, not constantly. It may take 24-48 hours before you see your first real crawler visit. In the meantime, you can test manually using the methods above.

After setup, AI Pages will:

  1. 1Detect AI crawler visits automatically
  2. 2Serve optimized content from cache (~100ms response)
  3. 3Log all activity in your AI Pages Analytics dashboard
  4. 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?

Press ? for keyboard shortcuts