> For the complete documentation index, see [llms.txt](https://docs.adpage.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.adpage.io/optimize-your-setup/profit-on-ad-spend/cost-items.md).

# Cost Items

Shipping, payment and other per-order costs, subtracted from your margin so profit\_value is what you actually keep.

`cost_of_goods` covers what the products cost you. Everything else an order costs — the parcel, the payment provider, the packaging — is a **cost item**.

Switch cost items on and three parameters start filling: `shipping_cost`, `payment_cost` and `other_cost`. Leave them off and all three are zero, which is why `profit_value` would equal `gross_profit`.

{% hint style="info" %}
This page quotes the dashboard in English. Using it in Dutch? See the [Dutch glossary](/optimize-your-setup/profit-on-ad-spend/dutch-glossary.md) for every label.
{% endhint %}

## Where to find it

Cost items, the purchase-price feed and the on/off switch all live on one screen in the AdPage dashboard: **Profit on Adspend**.

{% stepper %}
{% step %}

#### Open your container

Log in at [data.adpage.io](https://data.adpage.io) and open the container you want to set up.
{% endstep %}

{% step %}

#### Go to Profit on Adspend

Open the container **Settings** and pick **Profit on Adspend** in the menu (*Feed, cost items and mode*). Click **Open Profit on Adspend**.

The screen lives at `https://data.adpage.io/containers/<your container id>/profit-on-adspend`, so you can also bookmark it.
{% endstep %}

{% step %}

#### Make sure the mode is Advanced

At the top, under **Mode**, choose **Advanced**. Cost items are only available in Advanced: in Standard mode the screen shows *Cost items are not available in this mode* and the margin stays at revenue minus purchase price.
{% endstep %}

{% step %}

#### Fill in the cost items

Scroll to the **Cost items** block, switch on **Subtract cost items**, fill in the blocks below and click **Save cost items**.
{% endstep %}
{% endstepper %}

{% hint style="info" %}
**Looking for the purchase price per product?** That is not a cost item. The purchase price (`cost_of_goods`) comes from your shop or a feed, and is managed there:

| Your cost source | Where you change the purchase price                                                                                                                 |
| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| Shopify          | In Shopify: product → variant → **Cost per item**                                                                                                   |
| Magento          | In Magento: product → Advanced Pricing → **Cost**                                                                                                   |
| XML feed         | In the tool that generates your feed. The feed URL and column names are set on the same **Profit on Adspend** screen, in the **Product feed** block |

See Choose your cost source for the details.
{% endhint %}

## The three blocks

| Block                 | What belongs in it                                                                |
| --------------------- | --------------------------------------------------------------------------------- |
| **Shipping costs**    | What the carrier charges you. Fulfilment belongs here too — it is the same parcel |
| **Payment costs**     | What your payment provider charges per transaction                                |
| **Other order costs** | A free list: packaging, returns handling, a marketplace fee                       |

Each block is either **Flat + percentage**, or **Per method** (a table per method).

{% hint style="warning" %}
**Do not enter the same cost twice.** Fulfilment in *Shipping costs* and a € 5 "Fulfilment" line under *Other order costs* both get subtracted, and your margin is € 5 per order too low. Nothing errors — the number is simply wrong. The total at the bottom of the block is the only place this shows up, so check it.
{% endhint %}

## A table per method

A flat amount is an average, and an average is wrong on every individual order. If PostNL costs you € 4 and DHL € 8, a table charges each order what it really cost.

The method is looked up in one of two fields, depending on the block:

| Field             | Filled from                                                               |
| ----------------- | ------------------------------------------------------------------------- |
| `shipping_method` | Shopify's shipping line title, or `shipping_lines[].title` in the webhook |
| `payment_type`    | Shopify's payment gateway, or `payment_gateway_names` in the webhook      |

Using GA4's `shipping_tier` in your dataLayer? Then you are already covered: the AdPage variable sends `shipping_tier` as the shipping method when it is present, so a table on `shipping_method` matches your tiers.

## Get the spelling right

The method on the order is matched against your table as an exact string. `Mollie - iDEAL` typed by hand next to the real `mollie - ideal` silently gives you the fallback rate rather than the one you entered — no warning, just a different number.

So do not type them. With Shopify connected, the editor reads the methods your shop actually used over the last 30 days and lists them under **Found in Shopify**. Click those. Without Shopify, the same list comes from your own order webhooks (**Found in webhooks**).

A method missing from the list simply has not occurred recently; add it by hand and copy the spelling from an order.

## The fallback

Every table has a **Fallback**, used for a method that is not in it. Leave it at 0 and an unknown method costs you nothing in the calculation — which flatters the margin. A realistic average is the safer setting.

## Product without a cost price

Below the cost items you choose what happens to a product that is not in your feed or catalogue: **Count as free** (the order counts as full profit for that product) or **Estimate with a gross margin**. Count as free is only right when your cost source is complete.

## Per order, not per parcel

All of this is charged **per order**. An order that ships in two parcels is still one order, so it is charged one shipping cost. No source tells us the number of parcels, so a per-parcel rate is not expressible; if that difference matters to you, raise the flat amount to your real average per order.

## What it changes

```
gross_profit = revenue excluding VAT − cost_of_goods
profit_value = gross_profit − shipping_cost − payment_cost − other_cost
```

Both the Profit dashboard and the purchase event use the same settings, so the two agree. To see the result on a real order, use **Check on a real order** at the bottom of the Profit on Adspend screen and click **Check an order**.

See The variables for what each parameter contains, and Troubleshooting when a cost comes out as zero.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.adpage.io/optimize-your-setup/profit-on-ad-spend/cost-items.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
