How Despora Works
The complete technical overview of Despora's AI-powered marketing attribution engine — from call ingestion to revenue reporting.
TL;DR: Despora is an AI-powered marketing attribution platform that connects CallRail (call tracking), Google Analytics 4 (traffic data), Search Console (organic impressions), and Google Ads (spend data). It analyzes every lead — phone calls, form submissions, SMS, and chat — using Google Gemini AI to score each interaction for sales intent, estimate revenue, rate agent performance, and filter out spam. The result: a real-time dashboard showing true ROI, conversion rates (overall and local), and revenue attribution per marketing channel — per page, per device, per region.
What Is Despora?
Despora is a marketing attribution engine for service businesses that rely on inbound leads — phone calls, form submissions, SMS, and chat — as their primary conversion events. Unlike traditional analytics tools that count clicks and raw call volume, Despora analyzes the actual content of every interaction to determine whether it was a qualified lead, what service the prospect needs, and how much revenue it is likely to generate.
It is not a replacement for CallRail — it uses CallRail as a data source. You keep CallRail for call tracking and recording. Despora adds the intelligence layer: AI scoring, revenue estimation, spam filtering, and true ROI calculation.
The Attribution Problem
Service businesses face a fundamental disconnect between their marketing data and their actual revenue:
- Google Analytics 4 tells you how many sessions you had, but it can't tell you which sessions generated paying customers — especially when the conversion is a phone call.
- CallRail tells you how many calls you received and which tracking number was dialed. It even offers AI-powered Conversation Intelligence. But it doesn't group repeated calls from the same person into a single lead, doesn't attach a revenue value to each call, and doesn't calculate your true ROI per marketing channel.
- Google Ads tells you how many “conversions” your campaigns generated, but a click-to-call that lasted 4 seconds is counted the same as a $50,000 project inquiry.
- Search Console tells you which queries bring clicks, but has zero connection to whether those clicks generated revenue.
Despora closes all four gaps by unifying these data sources and applying AI to answer the only question that matters: “Which marketing dollars generated actual revenue?”
System Architecture
Data Flow
The system operates on a four-stage pipeline:
- Ingestion — Data flows in from CallRail (webhooks + batch sync), GA4 (API), Search Console (API), and Google Ads (API)
- Transcription — Audio recordings are transcribed via CallRail native transcripts or Deepgram Nova-2 with speaker diarization
- AI Analysis — Each transcript is sent to Google Gemini for intent scoring, service identification, revenue estimation, and agent performance rating
- Attribution — Results are merged with traffic and spend data to compute per-channel ROI, conversion rates, and revenue attribution
Lead Ingestion Pipeline
Real-Time Webhooks
When a call, form submission, or SMS comes into CallRail, a webhook fires to Despora within seconds. The webhook payload includes caller information, call duration, recording URL, and the marketing source that triggered the interaction.
Batch Synchronization
For historical data and catch-up, Despora runs batch syncs against the CallRail API. This fetches all calls within a date range, deduplicates against existing records, and processes any that haven't been analyzed yet. The sync uses cursor-based pagination and respects CallRail's rate limits with exponential backoff.
Multi-Touchpoint Grouping
When the same person calls multiple times, submits a form, and sends an SMS, Despora automatically groups these interactions into a single lead record. Matching is done by phone number normalization and email address. Each interaction becomes a “touchpoint” on the unified lead.
Call Transcription Engine
Despora uses a dual-path transcription strategy:
- CallRail Native Transcripts (fast path) — If CallRail has already transcribed the call, Despora uses that transcript directly. This is the fastest path and avoids redundant processing.
- Deepgram Nova-2 (fallback) — If no CallRail transcript exists, Despora downloads the call recording and sends it to Deepgram's Nova-2 model for transcription with automatic speaker diarization (separating agent vs. caller speech).
Voicemail Detection
Before sending any transcript to the AI, Despora runs voicemail detection. If the audio contains only an answering machine greeting with no caller message, the call is flagged as a voicemail and no credit is consumed. Only calls with real conversational content proceed to AI analysis.
AI Lead Scoring (Gemini)
Every qualified transcript is analyzed by Google Gemini (gemini-2.5-pro). The AI evaluates:
- Lead Score (0.0 – 1.0) — How likely is this caller to become a paying customer?
- Qualification — High Intent, Medium Intent, Low Intent, or Not Qualified
- Service Identified — What service is the caller inquiring about? Matched against your service catalogue.
- Sales Value — Estimated revenue based on the identified service and your pricing catalogue.
- Summary — A concise, human-readable summary of the call.
Agent Performance Scoring
For every call, Gemini also rates the agent (receptionist, sales rep) on three dimensions:
- Professionalism (0 – 10)
- Listening Skills (0 – 10)
- Closing Ability (0 – 10)
This creates accountability: you can see not just whether marketing is driving leads, but whether your team is converting them.
Automatic Filtering
Before consuming an AI credit, Despora automatically rejects:
- Spam calls — Robocalls, solicitors, scam calls (regex + AI detection)
- Job seekers — “I'm calling about the job posting” pattern matching
- Empty voicemails — Machine greeting with no caller message
- Ultra-short calls — Answered and immediately dropped (<5 seconds)
Source Attribution Model
Despora assigns a canonical marketing channel to every lead using a priority chain:
- UTM Parameters — If the caller's session had UTM tags, those take priority
- CallRail source_name — The marketing source assigned by CallRail's tracking
- CallRail source — Fallback to the tracker-level source type
These raw values are normalized into canonical channel labels: Organic, Google Ads,GBP (Google Business Profile), Google LSA, Social,Bing Ads, Direct, Referral, Email, and Yelp.
Conversion Rate Analysis
Despora calculates two distinct conversion rates — a critical distinction that no other tool makes:
- Overall Conversion Rate = Approved Leads ÷ Total Traffic × 100
- Local Conversion Rate = Approved Leads from Organic/Direct ÷ Local Traffic × 100
The local conversion rate filters out visitors from outside your service area. A plumber in Boston doesn't care about visitors from California — the local rate tells you how well you convert the people who can actually hire you.
Both rates are broken down per page, per device (mobile vs. desktop vs. tablet), and per day — so you can identify exactly which pages and devices drive real conversions.
Revenue & ROI Calculations
- Expected Revenue = salesValue × closeRate (per lead, adjusted for historical close probability)
- Customer Lifetime Value (CLV) = expectedCLV field, incorporating repeat-customer multipliers
- Cost Per Lead (CPL) = Total Ad Spend ÷ Approved Leads
- ROI = Expected Revenue ÷ Ad Spend (as a ratio — 2.5 means $2.50 back per $1 spent)
Ad spend is calculated from Google Ads API data plus any custom channel costs (SEO retainer, social media management fees, etc.) configured per project.
Real-Time Dashboard
The dashboard is powered by a server-side in-memory cache with cross-container invalidation for Vercel deployments. Data is streamed to the client via NDJSON for instant rendering:
- KPI Cards — Total leads, approved leads, revenue, conversion rate (local + overall), ROI, CPL, CLV
- Trend Charts — Traffic, leads, conversion rate, and ad spend over time with daily granularity
- Source Breakdown — Leads by channel with per-channel revenue and conversion rates
- Regional Analytics — Per-state lead distribution based on caller location
- Device Segmentation — Mobile vs. desktop vs. tablet traffic and lead breakdown
- Page-Level Data — Per-URL traffic, leads, and conversion rates
- Agent Leaderboard — Per-agent professionalism, listening, and closing scores
What Makes Despora Different?
- Only real, AI-verified leads — Not raw call counts, not form fills, not “conversions” that Google defines. Actual qualified leads — from calls, forms, SMS, and chat — verified by AI analysis of the interaction.
- Per-lead revenue attribution — Every lead has an estimated revenue value based on your service catalogue and close rates. Not session-level proxies.
- Local vs. overall conversion rate — The metric that nobody else tracks. Know how well you convert the people who can actually hire you.
- Agent accountability — Your marketing can drive 100 perfect leads, but if your receptionist scores 3/10 on closing ability, you're leaving money on the table. Despora shows you both sides.
- Pay-as-you-go pricing — No monthly subscriptions. Spam calls, voicemails, and job seekers don't cost you anything. You only pay for real analysis.
Human Oversight & Continuous Learning
AI is powerful, but it's not infallible. That's why Despora is built around ahuman-in-the-loop feedback system that makes the AI smarter over time.
The Feedback Loop
Every lead Despora's AI scores is presented to the business owner or account manager for review. You can approve, reject, or adjust each lead's qualification and value. This creates a continuous learning cycle:
- AI scores the lead — qualification tier, service match, revenue estimate
- Human reviews the decision — confirms, overrides, or corrects the AI's assessment
- Feedback refines future scoring — the system learns which leads your business considers qualified and at what value, improving accuracy with every review cycle
What Improves Over Time
- Lead qualification accuracy — The AI learns your specific definition of a “qualified lead” based on your approval history
- Revenue estimation — As you confirm or adjust sales values, the AI calibrates its estimates to match your real-world pricing and close rates
- Spam & noise filtering — Rejected leads teach the system which call patterns are irrelevant to your business
- Service matching — Corrections to service identification sharpen the AI's understanding of your catalogue
This means Despora doesn't just analyze your calls — it learns your business. The longer you use it, the more accurate it becomes. No other call attribution platform combines AI speed with human judgment in this way.
