> 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/documentation/documentation-nl/optimaliseer-je-installatie/winst-op-advertentie-uitgaven/de-variabelen.md).

# De variabelen

Wat elke parameter van Winst op advertentie-uitgaven betekent, welke btw-basis wordt gebruikt en welke instelling deze vult.

Profit on Ad Spend produceert twee sets parameters. Welke je krijgt, hangt af van hoe je je servercontainer instelt — zie De servercontainer instellen.

## De aanbevolen set

Deze komen uit de **AdPage Profit on Ad Spend** variabele. Ze zijn allemaal op orderniveau, in de valuta van de gebeurtenis, en berekend **exclusief btw**.

| Parameter       | Wat het is                                                                                          |
| --------------- | --------------------------------------------------------------------------------------------------- |
| `cost_of_goods` | Wat de producten in deze order jou hebben gekost                                                    |
| `shipping_cost` | Verzendkosten voor deze order, uit je Cost Items-instellingen                                       |
| `payment_cost`  | Betaalkosten voor deze order, uit je Cost Items-instellingen                                        |
| `other_cost`    | Je overige kostenregels per order — verpakking, afhandeling van retouren, een marktplaatsvergoeding |
| `gross_profit`  | Omzet exclusief btw, minus `cost_of_goods`                                                          |
| `profit_value`  | `gross_profit`, minus verzend-, betaal- en overige kosten                                           |

Daarnaast krijg je twee velden die aangeven hoeveel vertrouwen je in de cijfers kunt hebben:

| Veld      | Wat het je vertelt                                                                                                                                           |
| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `dekking` | Hoeveel orderregels een echte kostprijs hadden (`gematcht`), hoeveel terugvielen op je marge (`terugval`), en hoeveel geen van beide hadden (`zonder prijs`) |
| `bron`    | Of de cijfers afkomstig zijn van de gematchte order-webhook (`opslag`) of zijn berekend op basis van de gebeurtenis zelf (`berekend`)                        |

{% hint style="info" %}
**Waarom omzet exclusief btw wordt genomen.** Je inkoopprijzen zijn exclusief btw, dus de omzet waarvan ze worden afgetrokken moet dat ook zijn. We gebruiken `waarde` minus `belasting`. Een order van € 21,66 inclusief 21% btw wordt berekend op € 17,91.
{% endhint %}

**`profit_value` gelijk aan `gross_profit`?** Dat is geen bug. Het betekent dat Cost Items is uitgeschakeld, dus verzend-, betaal- en overige kosten zijn allemaal nul en er valt niets af te trekken. Zie [Cost Items](https://docs.adpage.io/documentation/documentation-nl/optimaliseer-je-installatie/winst-op-advertentie-uitgaven/kostenposten.md).

## De bestaande set

Deze komen uit de oudere handmatige configuratie en werken nog steeds. Ze hebben een XML-feed nodig; een container waarvan de kosten uit de Shopify- of Magento-catalogus komen, krijgt ze nooit.

| Parameter        | Wat het is                                            |
| ---------------- | ----------------------------------------------------- |
| `purchase_price` | Totale inkoopprijs van de order, opgeteld uit de feed |
| `profit_margin`  | Een waarde die je zelf opbouwt in Google Tag Manager  |

{% hint style="warning" %}
Zonder feed, `purchase_price` is **0.00** op elke aankoop. Geen fout, en niets in de interface wijst erop — de parameter staat er simpelweg leeg. Als je overal nullen ziet, controleer dan of er überhaupt een feed is geconfigureerd.
{% endhint %}

## Welke configuratie wat vult

|                                   | Shopify-kosten per item | Magento-catalogus | XML-feed |
| --------------------------------- | ----------------------- | ----------------- | -------- |
| `cost_of_goods` … `profit_value`  | ja                      | ja                | ja       |
| `purchase_price`, `profit_margin` | nee                     | nee               | ja       |

Beide sets tegelijk gebruiken is prima, zolang je er niet twee naar dezelfde metriek stuurt. Zie Problemen oplossen.


---

# 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/documentation/documentation-nl/optimaliseer-je-installatie/winst-op-advertentie-uitgaven/de-variabelen.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.
