Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

The variables

What each Profit on Ad Spend parameter means, which VAT basis it uses, and which setup fills it.

Profit on Ad Spend produces two sets of parameters. Which one you get depends on how you set up your server container — see Set up the server container.

These come from the AdPage Profit on Ad Spend variable. All of them are order-level, in the event currency, and calculated excluding VAT.

Parameter
What it is

cost_of_goods

What the products on this order cost you

shipping_cost

Shipping cost for this order, from your Cost Items settings

payment_cost

Payment cost for this order, from your Cost Items settings

other_cost

Your other per-order cost lines — packaging, returns handling, a marketplace fee

gross_profit

Revenue excluding VAT, minus cost_of_goods

profit_value

gross_profit, minus shipping, payment and other cost

Alongside them you get two fields that tell you how much to trust the numbers:

Field
What it tells you

coverage

How many order lines had a real cost price (matched), how many fell back to your margin (fallback), and how many had neither (unpriced)

source

Whether the figures come from the matched order webhook (stash) or were calculated from the event itself (computed)

Why revenue is taken excluding VAT. Your purchase prices are excluding VAT, so the revenue they are subtracted from has to be as well. We use value minus tax. An order of € 21.66 including 21% VAT is calculated against € 17.91.

profit_value equal to gross_profit? That is not a bug. It means Cost Items is switched off, so shipping, payment and other cost are all zero and there is nothing to subtract. See Cost Items.

The existing set

These come from the older manual setup and still work. They need an XML feed; a container whose costs come from the Shopify or Magento catalogue never gets them.

Parameter
What it is

purchase_price

Total purchase price of the order, summed from the feed

profit_margin

A value you build yourself in Google Tag Manager

Which setup fills what

Shopify cost per item
Magento catalogue
XML feed

cost_of_goods … profit_value

yes

yes

yes

purchase_price, profit_margin

no

no

yes

Running both sets at once is fine, as long as you do not send two of them to the same metric. See Troubleshooting.

Was this helpful?