---
title: "AI Optimizer - Serpwise Documentation"
description: "Get recommended website actions that explain what will change and let you review, deploy, measure, or roll back safely."
url: "https://serpwise.ai/docs/ai-optimizer/"
source: "https://serpwise.ai/docs/ai-optimizer/"
---
[Back to Serpwise](/)

Serpwise Documentation

Connect · Configure · Execute

Search documentation

`/`

No documentation found.

↑↓ Navigate Enter to open

Browse documentation

**AI Optimizer** is a recommended action queue for your website. Serpwise finds improvements, explains why each one matters, shows what will change, and lets you deploy safely without touching your origin server.

Each action answers four questions before you approve it:

- **Why it matters** - the page or metric Serpwise is trying to improve
- **What changes** - the visible or invisible page update
- **Where it applies** - the page, page group, or rule target
- **How it stays safe** - rollback availability and measurement expectations

Actions can add **visible improvements** that visitors interact with, such as FAQ sections, CTA bars, breadcrumbs, trust badges, and payment badges. They can also make **behind-the-scenes improvements**, such as structured data, meta tags, performance hints, crawler-specific markup, and social preview tags.

Technical details such as rules, conditions, signal sources, confidence scores, and generated markup are still available, but they are behind the action review flow instead of being the first thing you have to understand.

* * *

## Recommended Actions

The main AI Optimizer screen is organized around four queues:

| Queue               | What it means                                                      |
|---------------------|--------------------------------------------------------------------|
| **Recommended**     | Actions ready for review and deployment                            |
| **Live changes**    | Deployed actions that are live or collecting measurement data      |
| **Needs attention** | Actions blocked by missing input, low confidence, or another issue |
| **Archived**        | Dismissed, expired, rejected, or rolled back actions               |

Open an action to see the preview, recommendation summary, metadata edits when needed, measurement plan, and rollback safety before deploying.

* * *

## How It Works

Behind the action queue, the AI Optimizer runs a continuous feedback loop:

```
Collect → Analyze → Propose → Deploy → Measure → Learn → (repeat)
```

| Step             | What happens                                                                           |
|------------------|----------------------------------------------------------------------------------------|
| **1. Collect**   | Aggregate traffic, SEO, performance, conversion, geo, and bot signals from your domain |
| **2. Analyze**   | Identify optimization opportunities using heuristics and AI pattern matching           |
| **3. Recommend** | Generate plain-language actions with confidence and impact estimates                   |
| **4. Deploy**    | Deploy approved actions or auto-deploy eligible actions based on your autonomy level   |
| **5. Measure**   | Run A/B tests with real traffic to measure actual impact vs. control                   |
| **6. Learn**     | Feed outcomes back into the system to calibrate future proposals                       |

Each cycle builds on previous results. Actions that improved metrics increase confidence in similar future recommendations. Actions that underperformed are noted and avoided.

* * *

## What Changes Look Like

The optimizer produces two kinds of changes, both deployed as gateway rules:

### Visible Changes

The optimizer injects real HTML components that visitors see and interact with on your pages:

- **Floating CTA bars** - contextual calls-to-action anchored to the top or bottom of the viewport
- **Breadcrumb navigation** - a clickable nav trail showing the page’s position in your site hierarchy
- **FAQ accordion sections** - expandable question-and-answer blocks inserted into page content
- **Table of contents** - an in-page navigation sidebar for long-form articles and guides
- **Trust badge strips** - security certifications, guarantees, and partner logos near conversion points
- **Related pages widgets** - contextual internal links to related content on your site
- **Geo cookie consent banners** - GDPR-compliant cookie banners shown to EU/EEA visitors based on CF-IPCountry
- **Regional payment badges** - Klarna, iDEAL, Sofort, Vipps, TWINT badges for Nordic/DACH visitors
- **Mobile click-to-call CTAs** - tap-to-call buttons injected on phone-capable devices
- **Desktop floating widgets** - sidebar or corner widgets for wider viewports only

These are deployed as `inject_html` or `inject_component` rules that insert new markup at specific positions on the page.

### Invisible Changes

Behind the scenes, the optimizer modifies existing markup to improve performance and search engine visibility:

- **Lazy loading** - adds `loading="lazy"` to offscreen images and iframes
- **Script optimization** - adds `async` or `defer` attributes to render-blocking scripts
- **Resource hints** - injects `preconnect`, `prefetch`, and `preload` links in the document head
- **Structured data** - injects or enhances JSON-LD blocks (Product, Article, FAQPage, BreadcrumbList)
- **Image alt text** - adds descriptive alt attributes to images missing them
- **Meta tags** - fills missing meta descriptions, Open Graph tags, and canonical URLs
- **Bot-specific structured data** - optimized JSON-LD for AI crawlers (GPTBot, ClaudeBot) with clean semantic markup
- **Social crawler OG tags** - Open Graph and Twitter Card meta tags for social media crawlers
- **Clean bot HTML** - simplified markup served to LLM ingestion bots for better AI visibility

These are deployed as `find_and_replace` rules that modify existing HTML elements without adding new visible content.

* * *

## Optimization Categories

The optimizer groups proposals into six active categories with 30 subcategories across 30 AI generators.

### Conversion Rate Optimization (CRO) - injects visible components

- Smart CTAs - a floating CTA bar with contextual calls-to-action based on traffic and conversion data
- Trust signals - a badge strip with security certifications, guarantees, and partner logos near conversion points
- Social proof - review counts, customer logos, “X people viewed this” indicators
- Urgency signals - limited-time offers, stock indicators, countdown elements

### SEO UI Enhancements - injects visible navigation + structured data

- Breadcrumb navigation - appears as a clickable nav bar on the page, with `BreadcrumbList` schema for better SERP display
- FAQ sections - appears as an expandable accordion on the page, with `FAQPage` schema for rich results
- Table of contents - appears as an in-page navigation sidebar for long-form content
- Internal links - contextual cross-link widgets to related pages on your site

### Performance - modifies existing markup

- Lazy loading - adds `loading="lazy"` to offscreen images and iframes (no new visible elements)
- Script deferral - adds `async`/`defer` to render-blocking scripts
- Resource hints - injects `preconnect`, `prefetch`, and `preload` links in the document head
- Font optimization - adds `font-display: swap` and preloads key font files

### Content - mix of visible and invisible

- Internal linking - visible widget that strengthens link equity distribution across your site
- Accessibility fixes - invisible modifications: missing alt text, ARIA labels, heading hierarchy corrections
- Structured data - invisible: injects or enhances JSON-LD for products, articles, organizations
- Content gaps - invisible: fills missing meta descriptions, Open Graph tags, and canonical URLs

### Geo & Device Personalization - region-aware and device-specific

- GDPR cookie consent - automatic cookie banners for EU/EEA visitors detected via CF-IPCountry headers
- Regional payment badges - Klarna/Vipps for Nordic (SE/NO/FI/DK), Sofort/TWINT for DACH (DE/AT/CH), iDEAL for NL
- Mobile CTAs - click-to-call buttons and mobile-optimized CTAs injected on phone-capable devices
- Desktop widgets - floating sidebar widgets and expanded navigation for wider viewports

### Bot & Crawler Optimization - crawler-specific markup

- AI crawler JSON-LD - optimized structured data for GPTBot, ClaudeBot, and other AI crawlers
- Clean bot HTML - simplified semantic markup served to LLM ingestion bots
- Search bot schema - BreadcrumbList, SiteNavigationElement, and enhanced snippets for Googlebot/Bingbot
- Social crawler tags - Open Graph and Twitter Card meta tags optimized for Facebook, Twitter, and LinkedIn crawlers

* * *

## Autonomy Levels

Control how much authority the optimizer has over your site. You can change this at any time from the AI Optimizer settings.

| Level                     | Behavior                                                                        | Best for                                               |
|---------------------------|---------------------------------------------------------------------------------|--------------------------------------------------------|
| **Manual approval**       | Every action requires review before deployment                                  | New users, high-traffic sites, regulated industries    |
| **Auto-deploy safe wins** | High-confidence reversible actions deploy automatically; the rest stay queued   | Most teams balancing speed with oversight              |
| **Autopilot**             | Eligible actions deploy automatically and alert on measurement or safety issues | Teams that trust the guardrails and want more velocity |

In all modes, protected zones and safety guardrails stay active.

* * *

## Safety & Guardrails

The AI Optimizer includes multiple layers of protection to prevent harmful changes.

### Protected Zones

Certain URL paths are **always excluded** from automatic optimization, regardless of autonomy level:

- `/login`, `/signup`, `/auth` - authentication flows
- `/privacy`, `/terms`, `/legal` - legal pages
- `/checkout`, `/payment` - transaction flows
- `/account` - user account management

These paths cannot be targeted by the optimizer. Any proposal affecting a protected zone requires explicit manual approval.

### Injection Limits

Every optimizer-generated rule is constrained by hard limits:

- **50 KB maximum** HTML injection per rule
- Cannot target `data-serpwise` elements (internal proxy markup)
- Cannot remove existing tracking scripts
- Cannot modify security headers
- No recursive injection - rules cannot trigger other optimizer rules

### Full Audit Trail

Every proposal is logged with full context:

- **Confidence score** - how certain the AI is this change will improve the target metric
- **Impact estimate** - predicted improvement range
- **Rationale** - plain-language explanation of why this change was proposed
- **HTML diff** - exact before/after comparison of what changes on the page
- **Deployment status** - pending, deployed, rolled back, or expired

View the complete proposal history from the AI Optimizer dashboard.

### Instant Rollback

If a deployed optimization underperforms or causes issues:

- **One-click rollback** - revert any individual proposal from the dashboard
- **Emergency kill switch** - instantly disable all active optimizer rules for a domain
- **Sub-second cache invalidation** - changes take effect on the next request
- **Auto-pause** - the optimizer automatically pauses if it detects a greater than 10% regression in any monitored metric

* * *

## A/B Testing

The optimizer validates every deployed change with automatic A/B testing.

### How Traffic Splitting Works

Traffic is split between the **control** (original page) and **variant** (page with optimization) using **cookie-based deterministic assignment**. Each visitor is consistently assigned to the same group for the duration of the test - no flip-flopping between variants.

```
Visitor Request → Check cookie → Assign group
  ├─ Control (no optimization applied)
  └─ Variant (optimization applied)
```

### Statistical Significance

Results are calculated in real time. The optimizer monitors:

- Primary metric (e.g., click-through rate, bounce rate, conversion rate)
- Sample size and confidence interval
- Time elapsed

Once the test reaches statistical significance:

- **Winners are auto-promoted** - the optimization becomes permanent
- **Losers are auto-rolled back** - the rule is disabled and the result is logged

You can also manually end a test early from the dashboard.

* * *

## Action Preview

The AI Optimizer includes a split-pane before/after preview for every action.

- **Before panel** - shows the page as it currently renders
- **After panel** - shows the page with the proposed change applied
- **Device toggle** - switch between desktop and mobile viewports
- **Technical details** - inspect the exact rule actions, conditions, and generated markup when needed

Preview is available for all action states so you can inspect what changed at any point.

* * *

## Revenue Impact Estimation

Each proposal includes a monthly revenue impact projection based on your site’s traffic and conversion data.

The estimate considers:

- Current traffic volume for targeted pages
- Historical conversion rates and average order value
- Predicted improvement range from the confidence model
- Statistical uncertainty bounds (shown as a range)

Revenue estimates are informational - they help you prioritize which actions to approve first. Actual impact is measured via A/B testing after deployment.

* * *

## Optimization Score

Every domain gets a **0-100 optimization score** that reflects how well the AI Optimizer is performing across all dimensions.

The score is a weighted composite:

| Component         | Weight | What it measures                                                   |
|-------------------|--------|--------------------------------------------------------------------|
| **Opportunities** | 40%    | How many identified opportunities have been addressed              |
| **SEO Health**    | 25%    | Structured data coverage, meta tag completeness, schema quality    |
| **Performance**   | 20%    | Core Web Vitals improvements from optimizer rules                  |
| **Success Rate**  | 15%    | Percentage of deployed proposals that improved their target metric |

The dashboard shows the current score with a trend indicator (improving, stable, declining) based on the last 30 days.

* * *

## Performance Tracking & Auto-Rollback

The optimizer tracks before/after metrics for every deployed change.

### Tracked Metrics

- **Conversion rate** - click-through, form submission, purchase events
- **Bounce rate** - single-page session percentage
- **Core Web Vitals** - LCP, FCP, CLS changes
- **SEO score** - structured data and audit score deltas
- **Engagement** - time on page, scroll depth

### Auto-Rollback

If a deployed optimization causes a **greater than 10% regression** in any primary metric over a 24-hour window, the optimizer automatically:

1. Disables the rule
2. Marks the proposal as “auto-rolled back”
3. Logs the regression data for future calibration
4. Sends a notification to the domain owner

This ensures that even in Full Auto mode, harmful changes are caught and reverted quickly.

* * *

## Confidence Calibration

The optimizer uses **Bayesian calibration** to improve confidence scoring over time.

Each subcategory (e.g., “CRO → Smart CTAs”, “SEO → FAQ Sections”) maintains its own calibration model based on historical outcomes. When a proposal is deployed and measured:

- **Successful outcomes** increase base confidence for that subcategory
- **Failed outcomes** decrease base confidence
- **Category-level patterns** propagate across related subcategories

This means the optimizer gets smarter the longer it runs on your domain. A subcategory that consistently delivers positive results will have higher baseline confidence, while one that underperforms will be more conservative.

* * *

## Weekly AI Insights Summary

Domain owners receive a **weekly email digest** with AI-generated insights about their optimization performance.

The summary includes:

- **Proposals this week** - new proposals generated, deployed, and rolled back
- **Top performers** - the highest-impact optimizations currently running
- **Optimization score trend** - current score vs. previous week
- **Revenue impact** - estimated cumulative revenue impact from active optimizations
- **Recommendations** - AI-generated suggestions for what to review or enable next

The digest is generated using Gemini and sent every Monday morning. You can disable it from the AI Optimizer settings.

* * *

## Domain Variables

The optimizer supports **domain variables** - placeholder tokens that are replaced with domain-specific values at render time.

| Variable          | Description             | Example                                       |
|-------------------|-------------------------|-----------------------------------------------|
| `{brand}`         | Your brand/company name | ”Acme Corp”                                   |
| `{phone}`         | Contact phone number    | ”+1 (555) 123-4567”                           |
| `{cta_text}`      | Default CTA button text | ”Get Started Free”                            |
| `{support_email}` | Support email address   | ”[support@acme.com](mailto:support@acme.com)” |
| `{address}`       | Physical address        | ”123 Main St, NYC”                            |

Domain variables are configured in **Domain Settings → Variables**. The optimizer uses them in AI-generated content so that CTA bars, trust signals, and contact widgets use your actual brand information instead of generic placeholders.

* * *

## Page Builder Integration

The AI Optimizer can deploy **Page Builder components** as `inject_component` actions.

When the optimizer determines that a reusable component from your [Page Builder](/docs/page-builder) library would improve a page, it can:

1. Select the most appropriate published component
2. Generate an `inject_component` rule targeting the right pages
3. Deploy the component at the specified position (before/after header, in content area, etc.)

This bridges the visual Page Builder editor with the AI’s autonomous deployment - you design components visually, and the optimizer decides where and when to show them.

* * *

## Data Sources

The optimizer draws signals from multiple Serpwise features:

| Source                                             | Signals                                                              |
|----------------------------------------------------|----------------------------------------------------------------------|
| [Analytics](/docs/analytics)                       | Traffic volume, bounce rate, session duration, page-level engagement |
| [SEO Audit](/docs/seo-audit)                       | Audit scores, flagged issues, missing tags, broken structured data   |
| [Core Web Vitals](/docs/core-web-vitals)           | LCP, FID/INP, CLS measurements per page                              |
| [Tracking](/docs/conversion-tracking)              | Conversion events, funnel drop-off, goal completions                 |
| [Product Intelligence](/docs/product-intelligence) | Product performance, pricing signals, category trends                |
| Domain Variables                                   | Brand name, phone, CTA text, and other domain-specific tokens        |
| [Page Builder](/docs/page-builder)                 | Published components available for `inject_component` actions        |
| SEO Details                                        | Page-level meta data, canonical URLs, structured data inventory      |
| Geo & Device Headers                               | CF-IPCountry, user-agent, device type for personalization rules      |

The more data sources you have active, the better the optimizer’s proposals. At minimum, enable Analytics and SEO Audit for meaningful optimization.

* * *

## Credits

| Action                          | Credit cost |
|---------------------------------|-------------|
| Signal aggregation and analysis | Free        |
| AI-generated CTA copy           | 2 credits   |
| AI-generated meta descriptions  | 2 credits   |
| AI-generated FAQ sections       | 3 credits   |
| AI-generated structured data    | 2 credits   |
| Rule deployment and rollback    | Free        |
| A/B testing                     | Free        |

You can set a **monthly credit budget** for the optimizer to prevent unexpected usage. When the budget is reached, the optimizer pauses AI generation but continues monitoring. See [Credits & AI Pricing](/docs/credits) for package details.

* * *

## Limitations

- **Data lag** - actions are based on accumulated data; new domains need sufficient traffic history before the optimizer can make meaningful suggestions
- **No cross-domain optimization** - each domain is optimized independently
- **JavaScript-heavy SPAs** - the optimizer works best on server-rendered or statically-generated pages; heavily client-rendered content may limit what can be detected and modified
- **Manual intervention required** for complex structural changes (page layout redesigns, navigation restructuring)
- **Geo personalization requires Cloudflare** - CF-IPCountry headers must be present for geo-targeted rules; other CDNs may not provide equivalent headers
- **AI-generated content should be reviewed** - while the optimizer generates high-quality content, we recommend periodic review of AI-generated CTA copy, FAQ answers, and meta descriptions

* * *

## Related Features

[**Rules Engine**  
→  
\
The underlying system that the AI Optimizer generates rules for - learn how conditions and actions work.](/docs/rules-overview)

[**SEO Audit**  
→  
\
Page-level SEO scoring that feeds optimization signals to the AI Optimizer.](/docs/seo-audit)

[**Core Web Vitals**  
→  
\
Performance measurements that trigger performance optimization proposals.](/docs/core-web-vitals)

[**Analytics**  
→  
\
Traffic and engagement data that informs CRO and content optimization.](/docs/analytics)

[**Page Builder**  
→  
\
Visual component editor - published components can be deployed by the AI Optimizer as inject\_component actions.](/docs/page-builder)

[**Domain Variables**  
→  
\
Configure brand-specific variables used by the optimizer in AI-generated content.](/docs/domains)