> ## Documentation Index
> Fetch the complete documentation index at: https://docs.upstackdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Agency Fees: Marketing Agency Costs

> Track agency fees for your Shopify store. Measure costs paid to marketing agencies for services.

<Tip>
  Agency Fees measures the total costs paid to marketing agencies—management fees, creative services, and other agency-related expenses.
</Tip>

## Formula

<Info>
  **Agency Fees** = **SUM** ( User-defined agency fee entries )
</Info>

### Formula Components

| Metric                 | Definition                                    |
| ---------------------- | --------------------------------------------- |
| **Agency Fee Entries** | User-configured agency costs in Cost Settings |

| Metadata        |                                                 |
| --------------- | ----------------------------------------------- |
| **Type**        | Currency                                        |
| **Data Source** | [Upstack Costs](/sources/catalog/upstack-costs) |
| **Aggregation** | Sum                                             |

***

## Example

Your Shopify store pays **\$5,000** monthly to your marketing agency.

| Component             | Amount      | Notes               |
| --------------------- | ----------- | ------------------- |
| Agency Management Fee | \$3,000     | Percentage of spend |
| Creative Services     | \$1,500     | Monthly retainer    |
| Strategy Consulting   | \$500       | Advisory hours      |
| **Total Agency Fees** | **\$5,000** | Monthly total       |

***

## How It Works

Agency Fees are configured in Cost Settings under "Costs Management." You can set fixed monthly amounts or percentage-based fees tied to ad spend. These costs are deducted at the CM4 level to calculate true operating profit.

***

## When to Use

| Scenario              | Action                                   |
| --------------------- | ---------------------------------------- |
| Tracking agency costs | Monitor total agency spend               |
| CM4 calculation       | Agency fees reduce CM3 to CM4            |
| ROI analysis          | Evaluate if agency fees are justified    |
| Budget planning       | Include agency costs in marketing budget |

***

## Related Metrics

| Metric                                                                         | Relationship                       |
| ------------------------------------------------------------------------------ | ---------------------------------- |
| [CM4](/reference/metrics/orders/contribution-margin/cm4)                       | Operating profit after agency fees |
| [Marketing Cost](/reference/metrics/orders/contribution-margin/marketing-cost) | Other marketing costs              |
| [OPEX](/reference/metrics/orders/cogs/opex)                                    | Operating expenses                 |

[See all COGS metrics →](/reference/metrics/orders/cogs)
