Summary
Ad Performance Intelligence is a demonstration Marketing Analytics and BI product that organizes simulated Google Ads and Meta Ads metrics into an executive view of spend, efficiency, funnel, and attributed return.
Project case study
An analytics dashboard that consolidates a simulated paid-media scenario to compare channels, model metrics, and support budget decisions with explainable rules.
Independent demonstration project with no institutional affiliation or reproduction of confidential client data. Google Ads and Meta Ads are represented dataset channels; there are no active platform integrations.
Private repository; audited reference on the main branch, commit 87fc21b.

Ad Performance Intelligence is a demonstration Marketing Analytics and BI product that organizes simulated Google Ads and Meta Ads metrics into an executive view of spend, efficiency, funnel, and attributed return.
Channel comparison loses clarity when spend, delivery, conversion, and return are read in isolation or with inconsistent denominators.
Analytics scenario modeling, implementation of calculations and rules, web experience development, documentation of assumptions, and validation of technical contracts.
The data is synthetic, deterministic, and defined in versioned TypeScript modules. The published application does not query Google Ads, Meta Ads, a CRM, or a data warehouse.
The public scenario contains ten campaigns and 1,800 daily facts from December 3, 2025 through May 31, 2026. Values are illustrative and do not represent clients, accounts, or business results.
Five layers reflect the public code and published application without describing the project as an official integration, automated ETL, or data warehouse.
TypeScript seeds define ten campaigns and fixed parameters for Google Ads and Meta Ads.
Local modules generate 180 days of facts from a fixed start date and reproducible mathematical functions.
campaignId relates campaigns, daily facts, and leads; channel, objective, and region act as dimensions.
TypeScript functions calculate rates and costs, while heuristic rules generate recommendations and estimates.
Next.js, Recharts, and TanStack Table present KPIs, comparisons, funnel, filters, and simulator.
The formulas below were verified in the public code. Divisions use safeDivide and return zero when the denominator is zero.
| Definition | Unit | Calculation rule | Use | Limitation |
|---|---|---|---|---|
| CTRImpressions that resulted in a click. | % | clicks ÷ impressions × 100; a zero denominator returns 0. | Read top-of-funnel response. | Does not measure quality or downstream conversion. |
| CPCAverage cost per click. | BRL per click | spend ÷ clicks; a zero denominator returns 0. | Compare traffic acquisition. | Does not demonstrate traffic value or intent. |
| CPLAverage cost per generated lead. | BRL per lead | spend ÷ leads; a zero denominator returns 0. | Assess lead capture. | A simulated lead does not equal a sale. |
| CPAAverage cost per attributed conversion. | BRL per conversion | spend ÷ conversions; a zero denominator returns 0. | Compare final actions across campaigns. | Demonstration attribution, without incrementality. |
| Conversion rateClicks that resulted in an attributed conversion. | % | conversions ÷ clicks × 100; a zero denominator returns 0. | Relate traffic to final actions. | Does not isolate channel, offer, or sales-service effects. |
| ROASAttributed revenue divided by media spend. | multiplier | attributed revenue ÷ spend; a zero denominator returns 0. | Contextualize attributed return. | Not ROI, total business revenue, or profit. |
| Budget utilizationShare of campaign budget represented by spend. | % | spend ÷ budget × 100; a zero denominator returns 0. | Track simulated budget use. | Fixed budget without platform pacing. |
| Average lead qualityMean lead score in the selected view. | points | sum of lead scores ÷ lead count; an empty collection returns 0. | Add qualitative context to lead volume. | Synthetic assumption, not a trained model. |
| Campaign Efficiency ScoreScore used to rank efficiency signals. | 0 to 100 | Combines normalized CTR, CPC, CPL, conversion rate, ROAS, and lead quality. | Compare campaigns within the same scenario. | Heuristic weights; not a forecast or guarantee. |
Impressions that resulted in a click.
Average cost per click.
Average cost per generated lead.
Average cost per attributed conversion.
Clicks that resulted in an attributed conversion.
Attributed revenue divided by media spend.
Share of campaign budget represented by spend.
Mean lead score in the selected view.
Score used to rank efficiency signals.
Application verified without sign-in; code paths checked in the private repository, main branch, commit 87fc21b.
Public application
Functional Portuguese dashboard with KPIs, filters, comparisons, recommendations, and a demonstration simulator.
Open evidencePrivate source code
Private snapshot used as the reference for this audit.
Public documentation
ADR records deterministic data, lack of synchronization, and demonstration-only use.
Code referencedocs/adr/002-data-strategy.md
Code reference
Generates 180 dates and campaign facts from fixed parameters.
Code referencesrc/data/daily-performance.ts
Code reference
Implementation of CTR, CPC, CPL, CPA, conversion, ROAS, utilization, and score.
Code referencesrc/lib/analytics/metrics.ts
Public endpoint
Route Handler that aggregates the local dataset and identifies the response as simulated.
Code referencesrc/app/api/kpis/route.ts
Code reference
Heuristic rules with metrics, reasons, suggested actions, and trade-offs.
Code referencesrc/lib/analytics/recommendation-engine.ts
Code reference
Estimates derived from budget, simulated historical efficiency, and lead quality.
Code referencesrc/lib/analytics/simulator.ts
Code reference
Reproducible cases for CTR, CPC, CPL, ROAS, and efficiency score.
Code referencesrc/tests/metrics.test.ts
Public documentation
Separation across presentation, analytics, validation, data, types, and Route Handlers.
Code referencedocs/architecture.md
All three values belong to the application's simulated dataset. They do not represent a media account, client, business improvement, profit, or enterprise impact.
Values reproduced through the public /api/kpis endpoint and the formulas versioned in the audited reference.
Captures of the Portuguese-only published application; all numbers belong to the simulated scenario.


Next project
Recognition of 11 hand gestures from the camera, in the browser, with explainable rules and a CPU fallback.
View full case