Use case

How to Analyze Ad Revenue Using AI

Compare historical publisher revenue by placement, with fill rate and ad RPM calculated from the definitions in your Cube model.

  • Define revenue and impression metrics
  • Compare complete months by placement
  • Separate observed changes from possible causes

What is ad revenue analysis with AI?

Ad revenue analysis compares publisher revenue with eligible ad requests and filled impressions across time periods and placements. It helps a data or monetization team see where revenue, fill, and yield changed, using the same metric definitions in each comparison.

Cube's semantic layer for AI gives agents governed definitions for those metrics, dimensions, joins, and access rules. An agent can query the model through MCP or the CLI and summarize historical results without rebuilding metric logic from raw event tables on each prompt.

This is descriptive and diagnostic analysis. It can show that revenue or fill changed in a placement, but it cannot establish why auction demand, pricing, or delivery moved. It does not tune bids or predict future revenue; validate explanations with the relevant delivery and auction records.

Define the revenue and impression measures

Set the revenue basis, currency, time zone, attribution date, request eligibility, and impression grain before comparing months. Use one canonical request and impression count at each placement.

Fictional inputs for an August and September publisher review
MetricIllustrative example
Gross ad revenueUSD attributed to impression month before publisher share: $8,600 in August and $11,540 in September.
Eligible ad requests2,000,000 in August and 2,500,000 in September after the publisher-defined eligibility filters.
Filled impressions1,530,000 in August and 1,860,000 in September; count each served impression once.
Fill rateFilled impressions / eligible ad requests: 76.5% in August and 74.4% in September.
Ad RPMGross ad revenue / filled impressions x 1,000: $5.62 in August and $6.20 in September.
Request yieldGross ad revenue / eligible ad requests x 1,000: $4.30 in August and $4.62 in September.
The Prompt

Copy. Paste. Run your ad revenue review.

Connect to Cube through MCP or the CLI, then run this read-only review with your preferred agent.

Start with a Cube deployment connected to your data and a model containing the metrics you want to analyze.

01Connect over MCP

Connect over MCP

Connect your agent to your existing Cube deployment and sign in through OAuth.

MCP endpoint
https://cubecloud.dev/mcp
Sign in to Cube

Complete OAuth in your agent to connect your Cube account.

Choose a deployment

Use your default deployment or select another one available to your account.

Read the MCP setup docs
01Connect with CLI

Connect with CLI

Install the Cube CLI and sign in from a terminal-capable agent.

Install the CLI
curl -fsSL https://raw.githubusercontent.com/cube-js/cube/master/install-cli.sh | sh
Log in (replace TENANT with your account name)
cube login --url https://TENANT.cubecloud.dev
Inspect API operations
cube spec --json
Read the CLI docs

02Run this prompt in your agent

Choose your agent and copy the prompt below.

Prompt for Codex
Use the Cube MCP server connected in Codex and select the intended deployment. Run read-only analytics queries. Analyze historical publisher ad revenue using my connected Cube deployment.Use read-only requests and do not expose credentials or unnecessary personal data. DEFINITIONSInspect the modeled gross ad revenue, eligible ad requests, and filledimpressions. Report each metric's approved definition, currency, unit andgrain, attribution timestamp, business time zone, filters, refresh status,and treatment of passbacks, house ads, adjustments, and missing placements.Use certified metrics and approved dimensions. Do not infer a formula froma field name. If a required metric or definition is missing or conflictswith this review, explain the gap and stop that part instead of inventinga value. For the comparison, use these definitions only when they match the modeledmetrics: fill rate = filled impressions / eligible ad requests; ad RPM =gross ad revenue / filled impressions x 1,000; request yield = gross adrevenue / eligible ad requests x 1,000. Keep the revenue currency explicit. ANALYSIS1. Compare the last two complete calendar months, from the first through   last day of each month in the model's business time zone. State the exact   dates and exclude an incomplete current month.2. For each month, report gross ad revenue, eligible requests, filled   impressions, fill rate, ad RPM, and request yield. Calculate overall   rates from summed numerators and denominators; never average placement   percentages or RPM values. If a denominator is zero, mark the rate   undefined.3. Break the same measures down by placement as recorded at impression   time. Keep unknown placement as its own row, show the request and   impression counts, and flag sparse volumes. Calculate each placement's   dollar change and share of the total revenue change. Do not treat a   correlation or mix change as a cause.4. Compare each current-month value with the prior complete month using   absolute change, percentage change where the prior value is nonzero, and   percentage-point change for rates. Keep values in separate currencies   separate unless the model provides an approved conversion. OUTPUTReturn the metric definitions, exact date windows, result tables, filters,and query context. Summarize the largest observed changes, then listfollow-up checks that could distinguish volume, fill, pricing, and mixeffects. Label explanations as hypotheses until supported by evidence.Do not forecast revenue, change bids, or recommend an optimization basedonly on these historical comparisons.

How it works

1

Confirm the modeled measures

Check the revenue basis, currency, attribution timestamp, business time zone, eligible-request rule, filled-impression grain, and placement dimension. If the model's definitions differ, resolve that before comparing results.

2

Compare complete months and placements

Review revenue, request volume, filled impressions, fill rate, ad RPM, and request yield for the last two complete months. Recalculate totals from summed counts, then identify which placements contributed the most dollars to the change.

3

Investigate without assuming a cause

Treat a placement's revenue movement as a clue, not an explanation. Check auction demand, bid and floor changes, inventory mix, delivery logs, and month-close adjustments before attributing the movement to one factor.

What a publisher ad revenue review can reveal

The chart compares fictional August and September gross ad revenue, and the table splits those totals by placement. The example uses fictional requests, filled impressions, and revenue throughout.

Worked example: fictional publisher ad revenue by placement
PlacementAugust revenueSeptember revenueFill rate (August to September)Ad RPM (August to September)Revenue change
Inline$4,000$4,50080% to 75%$5.00 to $5.00+$500 (+12.5%)
Video$2,800$4,80070% to 80%$10.00 to $12.00+$2,000 (+71.4%)
Sidebar$1,800$2,24075% to 70%$4.00 to $4.00+$440 (+24.4%)
Total$8,600$11,54076.5% to 74.4%$5.62 to $6.20+$2,940 (+34.2%)
  • Gross ad revenue rose from $8,600 in August to $11,540 in September: an increase of $2,940, or 34.2%. Eligible requests rose from 2.0 million to 2.5 million, or 25.0%, so revenue grew faster than eligible request volume.
  • Video contributed $2,000 of the $2,940 revenue increase, or 68.0%. Its fill rate rose from 70% to 80%, and its ad RPM rose from $10.00 to $12.00. This is an observed pattern; the table does not isolate demand, pricing, inventory mix, or delivery effects.
  • Overall fill rate fell 2.1 percentage points: 1.53 million / 2.0 million = 76.5% in August and 1.86 million / 2.5 million = 74.4% in September. Pooled ad RPM rose from $5.62 to $6.20, or 10.4%; calculate it from total revenue and filled impressions rather than averaging placement RPMs.

This hand-calculated example and both images use fictional values, not executed queries, customer results, benchmarks, or predictions. Publisher definitions for revenue, request eligibility, impression counting, currency, placement, and month-close timing vary. The observed changes do not establish their causes or justify bid changes.

Frequently Asked Questions

Ad revenue analytics compares publisher revenue with ad requests and served impressions over defined periods and placements. It can show changes in volume, fill, and revenue per impression; it does not by itself explain why those changes happened.

Try Cube for free