Help menu

Product object – contents

The contents array describes the individual products in a transaction. It is passed in the ViewContent, AddToCart, AddToWishlist, InitiateCheckout, AddPaymentInfo and Purchase events.

Object parameters

Each object in the array describes one product. The array may contain any number of objects.

ParameterTypeRequirementExample valueDescription
idstringRequired for Purchase'ABC12345'Unique identifier of the item in the e-shop – must match the value you use in the ITEM_ID tag in your Zboží.cz XML feed.
quantitynumberRequired for Purchase2Number of units of the product in the cart / order.
unit_pricenumberRequired for Purchase33490Price per unit in CZK incl. VAT.
content_namestringRequired for Purchase'iPhone 15 Pro Max'Any name. Can be used as a retargeting condition.
content_categorystringRecommended'Elektronika | Mobilní telefony | Apple'Full category path from your XML feed. Use a vertical bar | (pipe) as the level separator. Pass the same value as listed for offers in the XML feed – the full string can then be used as an exact condition for retargeting or conversions.

Example

contents: [
  {
    id: 'ABC12345',
    quantity: 1,
    unit_price: 33490,            // incl. VAT
    content_name: 'iPhone 15 Pro Max',
    content_category: 'Elektronika | Mobilní telefony | Apple'
  },
  {
    id: 'KRYT999',
    quantity: 2,
    unit_price: 500,              // incl. VAT
    content_name: 'Ochranný kryt'
  }
]

value vs. sum of contents
The value parameter at event level is the total value of products excl. VAT. The unit_price parameters in contents[]delivery_price and other_costs are incl. VAT. value does not necessarily equal the sum of unit_price × quantity converted to the tax base – it may include discounts or other adjustments. The detailed cart breakdown is in contents[].

Potřebujete další pomoc?

Pokud si stále nevíte rady, obraťte se na naše specialisty. 95 % vašich dotazů umíme vyřešit do 2 hodin.