# Hermoso: revenue_by_source: Revenue · Hermoso developer docs

> Machine-readable twin of https://hermoso.ai/docs/reference/ads/revenue_by_source/. Generated from the shipped page. Do not edit by hand.
> Full agent guide: https://hermoso.ai/llms.txt · MCP: https://app.hermoso.ai/mcp

[Docs](https://hermoso.ai/docs/) / [Tool reference](https://hermoso.ai/docs/reference/) / [Ad campaign management](https://hermoso.ai/docs/reference/ads/) / revenue_by_source

# `revenue_by_source`

Revenue by source (posts, ads, emails) read-only

Area: REVENUE ATTRIBUTION · [Ad campaign management](https://hermoso.ai/docs/reference/ads/). Generated from the running MCP server, like the rest of the [tool reference](https://hermoso.ai/docs/reference/).

## Description

Which posts, ads and emails led to actual sales: the brand's payments (Shopify orders and Stripe charges, whichever is connected) matched back to what Hermoso published or sent, with revenue, payments and customers per channel, campaign, single post/ad/email (groupBy item) or match method. Each payment is matched ONCE, strongest first, and says how: utm (a Hermoso tracking id on the visit), reference (a Hermoso id on a Stripe checkout), code (a discount code Hermoso created, or one you name in codes), ad_utm (the UTM tags Hermoso puts on ads it builds), tag (Hermoso's tags without an id) — these LED TO the sale; email (the buyer is someone Hermoso emailed or who replied, within emailWindowDays before paying) and referrer (the visit came from a social platform the brand posts to) are looser matches, never causation. The unattributed remainder is stated plainly. GA4's own attribution of purchases to Hermoso's tags and the ad platforms' own reported conversions (Meta, Google Ads) are shown APART, never added in: they can describe the same sales again. Money is per currency, never summed across currencies. A source that could not be read is said as such, never as zero sales. Default: the last 30 days (Shopify lets apps read its last 60). Read-only, free. Links carry Hermoso's ids only when tracking links are on (set_tracking_links).

## Parameters

Parameter Type Description

`since` `string` start date, YYYY-MM-DD; default 30 days before until

`until` `string` end date, YYYY-MM-DD; default today

`days` `number` the last N days, instead of since

`groupBy` `"channel" | "campaign" | "item" | "method"` channel (default), campaign, item (one row per post, ad, email or code) or method

`sources` `"shopify" | "stripe" | "ga4" | "email" | "ads"[]` which to read; default all that are connected

`codes` `string[]` more discount or promotion codes to count as Hermoso’s

`emailWindowDays` `number` how many days after an email a payment still matches the person; default 30, at most 90

`includeTest` `boolean` true to count Shopify test orders

`ga4Property` `string` which shared GA4 property, e.g. properties/123; default the first shared one

`googleAdsCustomerId` `string` which Google Ads account for platform-reported conversions

`platformReported` `boolean` false to skip the ad platforms’ own reported conversions

## Example call

Every required parameter is shown, filled from the schema where it gives a value and otherwise with a placeholder naming the type. Replace the placeholders with real values. The same call works on the MCP server, the CLI and `POST https://app.hermoso.ai/v1/tools/revenue_by_source`.

**MCP** (`tools/call`)

`{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"revenue_by_source","arguments":{}}}`
**CLI**

`hermoso call revenue_by_source --json '{}'`

## Credits

Credits are spent only on two things: running an AI model (image, video, voice, text, planning, post-production) and Ad Spy research. See [Credits & costs](https://hermoso.ai/docs/credits/).

## Related tools

- [set_tracking_links](https://hermoso.ai/docs/reference/ads/set_tracking_links/) Tracking links: setting, or one tagged link

[All 759 Ad campaign management tools](https://hermoso.ai/docs/reference/ads/) · [tools.json](https://hermoso.ai/docs/reference/tools.json)
