AWS Builder Center
How to Build a Lead Quality Dashboard with Amazon S3 and Athena

How to Build a Lead Quality Dashboard with Amazon S3 and Athena

Build a lead quality dashboard with Amazon S3 and Athena. Compare qualified leads, opportunities, and cost per qualified lead by campaign.

Love to Learn Tech especially AI things.
A lead quality dashboard connects each website enquiry to its CRM outcome and compares campaigns by qualified leads, opportunities, and cost per qualified lead. Store campaign and CRM exports in Amazon S3, use Athena to join them by stable identifiers, and group the results by when the enquiries were captured.
A campaign can generate 100 enquiries at a low cost per lead and still deliver fewer sales opportunities than a smaller campaign. Marketing needs to see how many enquiries made it through review, what happened next, and whether enough time has passed to compare the campaigns fairly.

Define the metrics with the sales team

  • Accepted enquiries are unique submissions that meet the team’s intake rules after excluding test records and confirmed spam.
  • Qualified enquiries meet the agreed sales criteria, such as a supported requirement and a confirmed project need.
  • Qualification rate divides qualified enquiries by accepted enquiries.
  • Cost per qualified enquiry divides campaign spend by qualified enquiries.
  • Opportunity rate divides enquiries linked to at least one opportunity by accepted enquiries.
Include an awaiting review count. A campaign with many unreviewed leads may appear to underperform simply because sales hasn’t assessed them yet.

Join the data at the right level

Use the original submission ID to join a website enquiry to its CRM outcome. Keep one reporting row per enquiry, even if the CRM stores multiple calls, emails, or stage changes. Aggregate those activities before joining so they do not multiply your lead counts.
Prepare three datasets:
Dataset
One row represents
Key fields
Website enquiries
One accepted submission
Submission ID, capture date, campaign ID
CRM outcomes
One enquiry’s summarized outcome
Submission ID, qualification date, opportunity indicator
Campaign spend
One campaign for one reporting day
Campaign ID, date, spend, currency
Aggregate lead outcomes and spend separately at campaign level for the same date range, then join the totals. Joining daily spend directly to every enquiry can count the same day’s budget several times. Preserve an  UNKNOWN  campaign bucket so missing attribution is visible.

Compare two campaigns using the same review window

Assume all enquiries in the example have completed a 14-day observation window and spend is recorded in the same currency.
Campaign
Spend
Accepted
Qualified
Qualification rate
Cost per qualified enquiry
CRM Discovery
$1,200
100
12
12%
$100
CRM Integration
$900
45
15
33.3%
$60
CRM Discovery had a lower cost per accepted enquiry at $12, compared with $20 for CRM Integration. CRM Integration still produced more qualified enquiries at a lower cost per qualified enquiry. Both metrics matter because they answer different budget questions.

Keep late CRM updates from distorting the comparison

Group enquiries by capture date and give each group the same observation window. If a lead comes in on Friday and qualifies the following Wednesday, credit its outcome to the capture group. A separate activity report can count qualifications by the date sales completed them.
  • Mark recent groups as provisional while leads are still under review.
  • Show the date of the most recent CRM export.
  • Reconcile unmatched submission IDs and missing campaign IDs.
  • Keep zero-qualification campaigns visible and show their cost per qualified enquiry as unavailable.
  • Retain only the fields the reporting team needs. Names, emails, and enquiry messages can stay in the CRM.
Before sharing the dashboard, trace a handful of leads from form submission to CRM outcome and check campaign spend against the source export. When marketing and sales disagree about lead quality, those individual records give them a concrete place to start.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article