Initializing the Product List Elements
- 1 Minute to read
- Print
- DarkLight
Initializing the Product List Elements
- 1 Minute to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
To select the product list elements to be measured, add the configurations to the array "wt_pli".
Example
window.wt_pli = window.wt_pli || [];
wt_pli.push({
selector: document.getElementById("list-item-1"),
data: {
product: "075eo2f002",
productPosition: 1,
// optional
productCost: "49.99",
productQuantity: "1",
productCategory: {
1: "100% cotton",
2: "normally",
6: "en",
7: "men",
8: "shirts"
},
customEcommerceParameter: {
1: "blue"
},
grossMargin: "25",
productSoldOut: "0"
}
});
Parameter | Description |
---|---|
selector | Under "selector" you enter the product list element which is to be measured. You can either pass this directly as HTML-element or pass the CSS-selector of the element. |
data | Under "data" you enter the product information of the list element. |
product | Mandatory. Specify the product name. |
productPosition | Mandatory. The product position indicates where the element is located in the list. |
Optional parameters | Optionally, you can add the following parameters:
|
Was this article helpful?