---
slug: shop-bestelldaten-senden
title: "How do I send cart, new customers and margin from my shop?"
category: installation
locale: en
updated: 2026-10-17
keywords: ["cart","items","new customer","contribution margin","margin","cost of goods","net value","ecommerce","shop"]
questions: ["How do I pass line items, the net value, the cost of goods and whether it was a new customer?","Send cart data to Metrunio","Track order line items","Measure new versus returning customers","Contribution margin instead of revenue","ROAS on margin","Pass cost of goods","Product-level reporting"]
url: https://bench.metrunio.com/en/help/shop-bestelldaten-senden
---

# How do I send cart, new customers and margin from my shop?

**How do I pass line items, the net value, the cost of goods and whether it was a new customer?**

On checkout, `tracker.conversion(…)` and the Server Events API also accept `newCustomer`, the breakdown of the order value (`netValue`, `taxValue`, `shippingValue`, `discountValue`, `costOfGoods`) and the cart line items (`items`). All fields are optional; without them Metrunio measures as before. With them you get new-customer cost, contribution margin and product-level reporting.

A 200 euro order says little on its own. Whether it came from a new customer, and how much is left after the cost of goods, decides whether the advertising was worth it. Your shop knows both; Metrunio does not. So you can send it along.

## From the browser

```javascript
metrunio.conversion({
  orderId: '12345',
  value: 238.00,          // what the customer pays
  currency: 'EUR',
  newCustomer: true,      // first order by this customer?
  netValue: 200.00,       // goods value excluding tax and shipping
  taxValue: 38.00,
  shippingValue: 0,
  costOfGoods: 80.00,     // cost of goods
  items: [
    { productRef: 'CHAIR-01', sku: 'CHAIR-01-BLUE', name: 'Nordlicht chair',
      quantity: 1, unitPrice: 200.00, unitCost: 80.00, lineValue: 200.00 },
  ],
});
```

> **Note:** If your shop redirects to an external payment page, report the purchase server-side through the Server Events API, with the same fields and the same order number. Then report it only there, not from the browser as well.

## What each field gives you

| Field | What you get |
| --- | --- |
| newCustomer | New-customer cost: what a new customer cost, rather than only what an order cost |
| netValue and costOfGoods | Contribution margin: the campaign is measured against what is left, not against revenue |
| taxValue, shippingValue | ROAS without tax and shipping in the numerator |
| items | Reporting by product, category and brand |

## Four rules worth knowing

- Report each purchase with its order number. It then counts once per website, even when browser and server both report it. Value and currency come from the server as soon as it reports; “Data status” lists ORDER_ALREADY_COUNTED or, if the value differed, ORDER_VALUE_FROM_SERVER. Without an order number Metrunio recognises duplicates only by event_id, and that applies per route: the tracking script assigns its own, and even the same event_id from browser and server counts as two reports. The same purchase sent both ways then counts twice.
- A cost of goods (costOfGoods) without a net value (netValue) is rejected. A margin on the gross value would count sales tax as profit. The message appears in the browser console immediately.
- Metrunio does not calculate anything inside cart line items. If lineValue is missing it stays empty: two units at 25 euros are not necessarily 50 euros, and your discount is your calculation.
- If you say nothing about newCustomer, Metrunio derives the answer from its own measurements and labels it as such (“measured” rather than “from the shop”). That is the weaker statement, because we do not know the time before the first measurement.

## Refunds

Send a refund with the same order number and it reduces the value of the order. Include netValue and costOfGoods of the refunded part and the contribution margin stays correct. For a full refund the amount is enough: everything is back. For a partial refund without those figures Metrunio does not extrapolate the share: the order is excluded from contribution margin totals and reported there with a count.

How Metrunio matches a refund to its purchase, how long it waits for a purchase that has not arrived yet, and how you can tell that it has been applied is covered in “How do refunds reach Metrunio?”.

> **Note:** All fields are optional. A shop that sends only an order number and an amount measures just as reliably as before. It simply misses the reports that rest on these figures.

## Also asked

- Send cart data to Metrunio
- Track order line items
- Measure new versus returning customers
- Contribution margin instead of revenue
- ROAS on margin
- Pass cost of goods
- Product-level reporting

## Related

- https://bench.metrunio.com/en/help/shopsysteme
- https://bench.metrunio.com/en/help/wordpress-plugin
- https://bench.metrunio.com/en/help/server-events-api
- https://bench.metrunio.com/en/help/erstattungen
- https://bench.metrunio.com/en/help/neukundenkosten-und-deckungsbeitrag
- https://bench.metrunio.com/en/help/was-metrunio-nicht-tut
