Basket Tracking
Capture cart data at the line-item level — for precise commission calculation per article.
Variants
There are two variants:
- Browser-based: Cart data is passed as additional parameters in the tracking pixel (get_trans.cgi) on the order confirmation page
- SOAP-based: Cart data is submitted server-side via the SOAP methods
new,changeorchange_or_new
Coordinate the introduction of basket tracking with the QUALITYCLICK team in advance (info@qualityclick.com), so that commission products and reports are set up appropriately.
Basket tracking via browser
Extend the tracking pixel code on the order confirmation page with cart data:
// Item 1
&ba1=SKU_ITEM_1
&bv1=VARIANT_1
&bc1=COMMISSION_PRODUCT_1
&bu1=UNIT_PRICE_NET_1
&bq1=QUANTITY_1
&bt1=ITEM_NAME_1
// Item 2
&ba2=SKU_ITEM_2
&bv2=VARIANT_2
&bc2=COMMISSION_PRODUCT_2
&bu2=UNIT_PRICE_NET_2
&bq2=QUANTITY_2
&bt2=ITEM_NAME_2For each additional item, increment the number (ba3, bv3, bc3, bu3, bq3, bt3 etc.). Number the items consecutively starting from 1 without gaps: the cart is evaluated up to the first missing number.
| Parameter | Description | Example |
|---|---|---|
ba[n] | Article number (SKU), at least 2 characters | ABC-123 |
bv[n] | Variant (e.g. size, color), optional | XL |
bc[n] | Commission product in QUALITYCLICK | Sale |
bu[n] | Unit price net | 23.00 |
bq[n] | Quantity (empty = 1) | 3 |
bt[n] | Article name | T-Shirt XL |
Rules for cart items
- Uniqueness: Each combination of article number and variant may occur only once in the cart. The same article in two sizes is therefore permitted if you pass the variant.
- Quantity: If the quantity is left empty, it is counted as 1.
- Duplicate items: If the same combination of article number and variant occurs more than once, the cart is rejected with an error message. On request, the QUALITYCLICK team (info@qualityclick.com) can configure duplicate items to be merged instead, with their quantities added up.
- Commission product: The product aliases created under Products & Commissions also apply to
bc[n].
Basket tracking via SOAP
Alternatively, submit cart data via the SOAP interface. The methods new, change and change_or_new provide a "basket" property for an arbitrary list of line items.
A basket item has this data structure:
| Field | Description | Format | Example |
|---|---|---|---|
article_id | Article number (unique with variant) | Text, at least 2 chars, max 255 | abc123 |
variant | Variant (size, color) | Text, max 255 | XL |
commission_id | Commission product (product aliases apply) | Text, max 255 | test-product |
unitprice | Unit price net | Decimal | 23.00 |
quantity | Quantity (empty = 1) | Number | 3 |
title | Product title | Text, max 255 | T-Shirt |
The same rules apply as for browser tracking: article number and variant must be unique together, and duplicate items lead to an error message.