Skip to content

Documentation

Everything you need to integrate EverAd into your app, website, or ad stack.

Getting Started

EverAd is an AI-powered ad optimization platform. Create a campaign, generate variations, embed them on your site, and let the algorithm find the best performers automatically.

Quick Start (5 minutes)

1
Create an account
Sign up with Google SSO at /login. Free tier includes 1 campaign and 10 variations.
2
Create a campaign
From the dashboard, click "New Campaign". Enter your product name, URL, target audience, and industry.
3
AI generates variations
EverAd creates 10 unique ad variations with different copy angles and AI-generated images.
4
Embed on your site
Copy the embed code from the "Embed" tab and paste it on any webpage.
5
Watch it optimize
Smart optimization automatically shifts traffic to winning variations. Check analytics in real-time.

Embed Guide

Add EverAd to any website with a single line of code. The embed automatically serves the best-performing variation, tracks impressions, and records clicks.

HTML Embed (iframe)

html
<iframe src="https://everad.vercel.app/api/embed?campaignId=YOUR_CAMPAIGN_ID" width="300" height="250" frameBorder="0" style="border: none; border-radius: 12px;" ></iframe>

React Component

tsx
function EverAd({ campaignId }: { campaignId: string }) { return ( <iframe src={`https://everad.vercel.app/api/embed?campaignId=${campaignId}`} width={300} height={250} style={{ border: 'none', borderRadius: 12 }} /> ); }

Customization Options

campaignIdstringrequiredYour campaign ID
widthnumberAd width in pixels (default: 300)
heightnumberAd height in pixels (default: 250)
themestring'light' or 'dark' (default: dark)

API Reference

All API endpoints require authentication via session cookie (Google SSO) unless noted. The serve and track endpoints are public.

Campaigns

GET/api/campaigns
POST/api/campaigns
GET/api/campaigns/:id
PATCH/api/campaigns/:id
DELETE/api/campaigns/:id

Variations

POST/api/variations
PATCH/api/variations/:id
DELETE/api/variations/:id

Serve (Public)

GET/api/serve

This is the core endpoint that powers ad serving. It runs real-time optimization, picks a winner, increments impressions, and returns the ad creative.

bash
curl "https://everad.vercel.app/api/serve?campaign_id=YOUR_ID" # With debug info curl "https://everad.vercel.app/api/serve?campaign_id=YOUR_ID&debug=true" # Simulate company enrichment curl "https://everad.vercel.app/api/serve?campaign_id=YOUR_ID&debug=true&company=bestbuy.com"

Response Format

json
{ "variationId": "uuid", "campaignId": "uuid", "headline": "Your Best Ad Yet", "description": "AI-optimized copy that converts.", "ctaText": "Get Started", "productUrl": "https://yoursite.com", "imageUrl": "https://storage.supabase.co/..." }

Track Clicks (Public)

POST/api/track
bash
curl -X POST "https://everad.vercel.app/api/track" \ -H "Content-Type: application/json" \ -d '{"variationId": "YOUR_VARIATION_ID"}'

Optimize

POST/api/optimize

Kills bottom 5 performers, generates 5 new variations via AI, marks the top performer as winner, and logs the optimization round.

Generate More

POST/api/campaigns/:id/generate

Webhooks

EverAd uses Stripe webhooks to keep billing in sync. Configure your webhook endpoint in the Stripe Dashboard.

Webhook URL

text
https://everad.vercel.app/api/stripe/webhook

Events Handled

checkout.session.completedUser completes payment → plan upgraded in DB
customer.subscription.updatedPlan changed → DB synced to new plan
customer.subscription.deletedSubscription canceled → downgraded to free
invoice.payment_failedPayment failed → logged for follow-up

Optimization Algorithm

EverAd uses adaptive optimization, powered by Bayesian optimization. It's proven to converge faster than traditional A/B testing while minimizing regret (wasted impressions on bad variants).

How It Works

text
For each variation: alpha = clicks + 1 beta = (impressions - clicks) + 1 sample = random draw from Beta(alpha, beta) Serve the variation with the highest sampled score. This naturally balances: - Exploration: new variations get tested - Exploitation: proven winners get more traffic

When to Run Optimization

Click "Optimize" on your campaign to trigger a cycle. This kills the bottom 5 performers, generates 5 fresh variations via AI, and starts the next round. We recommend running optimization after every 500-1000 impressions.

Compliance API

POST/api/compliance/check
POST/api/compliance/check-public
bash
curl -X POST "https://everad.vercel.app/api/compliance/check-public" \ -H "Content-Type: application/json" \ -d '{ "headline": "FREE MONEY NOW!!!", "description": "Click here to get rich quick with no effort", "ctaText": "GET RICH", "platforms": ["google", "meta"] }'

Response

json
{ "score": "F", "issues": [ { "platform": "google", "rule": "Excessive capitalization", "severity": "error", "message": "Headline uses all caps which violates Google Ads policy", "fix": "Use normal capitalization: 'Free Money Now'" } ], "fixedVersion": { "headline": "Smart Investment Opportunities", "description": "Discover proven strategies to grow your wealth responsibly.", "ctaText": "Learn More" } }

Competitor API

POST/api/competitors/analyze
POST/api/competitors/analyze-public
bash
curl -X POST "https://everad.vercel.app/api/competitors/analyze-public" \ -H "Content-Type: application/json" \ -d '{"url": "https://competitor.com"}'

Response

json
{ "competitor": { "name": "CompetitorCo", "product": "Email marketing platform", "valueProps": ["Easy automation", "500+ templates"], "pricing": "$29/mo starter", "weaknesses": ["No AI optimization", "Limited analytics"], "audience": "Small business marketers" }, "counterAds": [ { "headline": "Smarter Than Templates", "description": "Why use 500 templates when AI writes the perfect ad every time?", "ctaText": "Try AI Ads Free", "angle": "technology-superiority" } ] }

Visitor Enrichment

Every ad serve request automatically extracts visitor signals. On the Scale plan, referrer domains are enriched via Apollo.io to provide company-level data.

Free Signals (All Plans)

Device type, OS, browser, language, traffic source, referrer URL, day/time, weekend detection, UTM parameters.

Apollo.io Enrichment (Scale Plan)

Company name, industry, employee count, annual revenue, HQ location, LinkedIn URL. Data is cached for 24 hours to minimize API usage.

Testing Enrichment

Use the ?company=domain.com parameter on the serve endpoint to simulate enrichment from any company:

bash
curl "https://everad.vercel.app/api/serve?campaign_id=YOUR_ID&debug=true&company=shopify.com"

Billing & Plans

FeatureFreeStarter $99Growth $299Scale $799
Campaigns110
Variations10
AI Generation
Smart Optimization
Embed Code
AnalyticsBasicFullFull
Per-Segment Optimization
Apollo.io Enrichment
White-label
API Access

Billing is handled via Stripe. Upgrade, downgrade, or cancel anytime from the billing page.

Ready to Get Started?

Start optimizing your ads in 5 minutes. No credit card required.

Start Free Trial →