Prism Documentation

What Prism Does

Prism is a CAC (Customer Acquisition Cost) optimization proxy layer that sits in front of a customer's existing website. One DNS change at their domain provider, no platform swap, they keep everything. Then it runs on autopilot.

1
DNS change needed
20+
API endpoints
5
Core engines
0
Platform rewrites

The Problem

Today businesses stitch 3 disconnected tools: Hyros (ad attribution, ~60% accurate), Mixpanel (blind to on-site conversion) and HubSpot (CRM). Data should flow across all three but doesn't. Consequences: they pick the wrong leads to call and never feed on-site conversion data back to the ads team.

The Solution

Prism unifies attribution + on-site conversion + sales data, optimizes live, feeds insight back and CAC drops automatically. Plus deep funnel detail: who converts, why, where to look that you can't see today.

How It Works

DNS ChangePoint CNAME to Prism
SSL + ProxyAuto-provisioned
Learn FunnelTrack every visitor
Score LeadsHot/Warm/Cool/Cold
Run ExperimentsA/B + MAB + Personalization
CAC DropsAutopilot optimization

Five Core Engines

EngineWhat It Does
DNS ProxyReverse-proxy layer. Client changes one DNS record and Prism sits in front of their site. Works with Shopify, WordPress, custom builds, enterprise stacks. SSL auto-provisioned.
AttributionTracks every visitor from ad click to conversion to sale. Five models: last-touch, first-touch, linear, reverse (recommended) and data-driven. Confidence-scored. Replaces Hyros.
Conversion OptimizerRecords full visitor journeys: pages visited, scroll depth, hesitation points, form interactions, time-on-page. AI-scored lead scoring (Hot/Warm/Cool/Cold). Replaces Mixpanel's conversion funnel.
Experiment EngineRuns live page experiments without code changes. A/B tests, multi-armed bandits (auto-allocate traffic to winners) and personalization (different content per traffic source). Auto-applies winning variants.
Sales Feedback LoopCRM integration: sales team reports which leads closed, revenue, days-to-close. Feeds back to attribution and lead scoring. Now the ads team knows which creatives produce revenue, not just clicks. Replaces the HubSpot silo.

CAC Dashboard

Real-time dashboard showing:

Budget Optimizer

Feed in your total ad budget and Prism allocates across channels based on actual CAC and ROAS data. Sorted by performance: best-performing channels get the most budget. Shows projected CAC reduction and projected conversions per channel.

Pitch Angles

AudienceLead WithMessage
Growth VP / CEOCAC"Dump $1 in, get $1.50 out. Prism lowers the $1 to $0.80."
Sales LeaderConversion rate"Your leads are already on your site. Prism makes sure the right ones convert and your team calls the right ones first."
MarketingAttribution accuracy"Stop guessing which ads work. Prism traces from click to closed deal, not just form fill."

API Endpoints

Proxy Setup

MethodEndpointPurpose
POST/api/proxy/setupConfigure proxy for a domain
POST/api/proxy/{client}/verifyVerify DNS is pointed correctly
POST/api/proxy/{client}/start-learningBegin funnel learning phase
GET/api/proxy/{client}/statusCheck proxy status

Visitor Journeys

MethodEndpointPurpose
POST/api/clients/{id}/journeysRecord a visitor journey
GET/api/clients/{id}/journeysList journeys (?converted=true to filter)

Attribution

MethodEndpointPurpose
GET/api/clients/{id}/attributionRun attribution analysis (?model=reverse|first_touch|linear|data_driven)

Experiments

MethodEndpointPurpose
POST/api/clients/{id}/experimentsCreate experiment (A/B, MAB or personalization)
GET/api/clients/{id}/experimentsList experiments (?status= filter)
GET/api/clients/{id}/experiments/{eid}Get single experiment
POST/api/clients/{id}/experiments/{eid}/startStart experiment (begins traffic split)
POST/api/clients/{id}/experiments/{eid}/completeDeclare winner + lift

Page Changes

MethodEndpointPurpose
POST/api/clients/{id}/page-changesRecord a live page change
GET/api/clients/{id}/page-changesList all page changes

Sales Feedback

MethodEndpointPurpose
POST/api/clients/{id}/sales-feedbackReport lead close/loss from CRM
GET/api/clients/{id}/sales-feedbackList all feedback

Dashboard & Optimizer

MethodEndpointPurpose
GET/api/clients/{id}/dashboardFull CAC dashboard (all metrics)
POST/api/clients/{id}/budget-optimizerAI budget allocation ({total_budget: 5000})

Demo & Health

MethodEndpointPurpose
GET/api/demoFull Northwind Jewelers demo with sample data
GET/api/healthHealth check

Integration with Pyonair

Prism plugs into the Pyonair platform as a resale layer. The flow:

The AI agents command Prism directly via API. The dashboard is the legacy fallback for human review.

Competitive Position

ToolAttributionOn-Site ConversionSales FeedbackLive Optimization
Hyros~60% accurateNoNoNo
MixpanelNoBasic funnelsNoNo
HubSpotLimitedNoYes (CRM)No
PrismFull + 5 modelsJourney + lead scoringClosed-loopA/B + MAB + Personalization

Running Prism

# Start the server
python3 prism_app.py          # port 8128

# Or with custom port
PRISM_PORT=9000 python3 prism_app.py

# Run tests
python3 -m pytest tests/test_cac_optimizer.py -v
python3 -m pytest tests/test_prism_api.py -v