Use case

How to Analyze Marketing ROI Using AI

Compare campaign spend with revenue credited under your attribution rules, then review channel and campaign results with the metrics in your Cube deployment.

  • Define spend and attribution rules
  • Compare revenue ROI by channel
  • Check the denominator before drawing conclusions

What is marketing ROI analysis with AI?

Marketing ROI analysis compares campaign cost with revenue credited under an explicit attribution model. Marketing and RevOps teams can use an AI agent to review governed spend and revenue metrics by channel or campaign, check the calculation, and summarize where the results differ.

This workflow reviews historical attributed revenue. Revenue ROI is not profit or incremental lift: the calculation does not include margins or other costs unless the model includes them, and attribution assigns credit without proving that a campaign caused a sale.

Set the attribution rules before comparing channels

Define the campaign period, conversion window, spend basis, currency, and attribution model first. The fictional example below uses Q2 2026 paid media spend and 30-day last-touch click attribution.

Inputs for the fictional Q2 2026 marketing ROI review
MetricIllustrative example
Paid media spendQ2 total: $60,000 across Search ($24,000), Paid social ($18,000), Partner ($12,000), and Email ($6,000).
Attributed revenueQ2 campaigns receive $180,000 in credited revenue: $72,000, $36,000, $30,000, and $42,000 by channel.
Attribution window30-day last-touch click attribution; include only conversions within 30 days of a Q2 click, recorded through July 30, 2026.
Revenue ROI($180,000 attributed revenue - $60,000 spend) / $60,000 spend x 100 = 200%.
The Prompt

Copy. Paste. Run your marketing ROI review.

Select a Cube deployment, then run the read-only review in 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. Review marketing revenue ROI in my connected Cube deployment. Use read-only requests and keep campaign and customer identifiers private. DEFINITIONSInspect the model for its approved paid media spend, attributed revenue, campaign and channel dimensions, conversion dates, currency, attribution method, attribution window, and reporting time zone. Use the modeled definitions. If a required metric or attribution rule is missing, report the gap instead of inventing a measure or result. Revenue ROI = ((attributed revenue - paid media spend) / paid media spend) * 100. The numerator is attributed revenue minus paid media spend; the denominator is paid media spend. Do not call revenue ROI profit, return on incremental spend, or causal lift. If spend is zero or negative, report ROI as not applicable. ANALYSIS1. Review Q2 2026. In the deployment's reporting time zone, include paid media spend and qualifying clicks from April 1 through June 30, 2026 (inclusive). Include only conversions within 30 days of a qualifying click, with events recorded through July 30, 2026. State the exact dates and attribution rule used.2. Compare spend, attributed revenue, and revenue ROI by channel and campaign. Keep currency consistent and show unassigned spend or revenue separately rather than allocating it without a modeled rule.3. Reconcile channel and campaign rows to the total. Calculate blended ROI from total attributed revenue and total spend; do not average channel ROI percentages.4. Flag missing values, small denominators, incomplete conversion windows, or inconsistent attribution definitions. If the modeled window differs from the example, report the actual definition and do not silently substitute another one. OUTPUTReturn the metric definitions and query context, a table of spend, attributed revenue, and ROI by channel plus a reconciled total, and a concise interpretation. Describe observed patterns only. Do not infer that a channel caused revenue or predict future ROI; name the additional evidence or experiment needed to test those questions.

How it works

1

Confirm the spend and attribution definitions

Check the spend basis, revenue metric, campaign grain, currency, reporting time zone, last-touch rule, and 30-day conversion window. If the modeled definitions differ or are missing, resolve that before comparing results.

2

Reconcile spend, revenue, and ROI

Compare each channel and campaign using the same date boundaries and currency. Verify that attributed revenue and spend sum to the reported total, then calculate blended ROI from the totals rather than averaging channel percentages.

3

Separate attribution from impact

Use the observed results to choose follow-up checks, such as validating campaign tags or comparing against an incrementality experiment. Last-touch credit describes the model's allocation; it does not establish what caused a sale.

What a marketing ROI review can show

Compare the fictional Q2 2026 channel-level revenue ROI with the spend and attributed revenue behind each rate. The image and table use illustrative fictional values.

Worked example: fictional Q2 2026 paid media performance
ChannelPaid media spendAttributed revenueRevenue ROI
Search$24,000$72,000200%
Paid social$18,000$36,000100%
Partner$12,000$30,000150%
Email$6,000$42,000600%
Total$60,000$180,000200%
  • The blended revenue ROI is (($180,000 - $60,000) / $60,000) x 100 = 200%. Attributed revenue is three times spend; the 200% ROI is the net revenue above spend divided by spend.
  • Email has the highest illustrated revenue ROI at 600% on $6,000 of spend, while Search has the highest attributed revenue at $72,000. These metrics answer different questions, and the example does not explain why either result occurred.
  • Calculate the overall rate from the totals. Averaging the four channel percentages would give each channel the same weight, even though their spend differs.

The table and image use fictional values; they are not executed queries, customer results, benchmarks, or predictions. This calculation uses attributed revenue and paid media spend only; it does not account for margin, agency or creative costs, or incremental lift. Last-touch attribution assigns credit but does not prove causation.

Frequently Asked Questions

Divide attributed revenue minus the included campaign spend by that spend, then multiply by 100. With $180,000 attributed revenue and $60,000 spend, revenue ROI is 200%. The result depends on the attribution model and cost definition.

Try Cube for free