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.
| Parameter | Type | Requirement | Example value | Description |
|---|---|---|---|---|
id | string | Required 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. |
quantity | number | Required for Purchase | 2 | Number of units of the product in the cart / order. |
unit_price | number | Required for Purchase | 33490 | Price per unit in CZK incl. VAT. |
content_name | string | Required for Purchase | 'iPhone 15 Pro Max' | Any name. Can be used as a retargeting condition. |
content_category | string | Recommended | '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[].