Step 4: Capture Product Details

The addProductDetails method is used to add items when a customer views a more detailed product description on a product detail page. This is usually linked from an index or search page thumbnail. Some product detail pages may have several items described.

For example, if you implemented the addProductDetails method and you want to run an experience based on a product viewed on the product detail page, then you would navigate to the WHO part of the experience and then select the relevant data target (for example, on the product detail page with the product viewed equals "yellow shirt").

Although both product ID (PID) and SKU are required in a product catalog, Monetate only requires you to implement method calls for PID. That said, you should implement SKU if you intend to use the Product Recommendations feature.

Code ExampleTips
// addProductDetails Method
window.monetateQ.push([
  "addProductDetails", ["pidString", "pidString"]
]);
Product SKUs or IDs cannot exceed 50 characters
// addProductDetails Example 
window.monetateQ = window.monetateQ || [];
window.monetateQ.push([
  "addProductDetails", ["a123"]
]);
window.monetateQ.push([
  "trackData"
]);
 
// addProductDetails Example with SKU  
window.monetateQ = window.monetateQ || [];
window.monetateQ.push([
  "addProductDetails", [{
    productId: "pidString",
    sku: "skuString"
  }]
]);
window.monetateQ.push([
  "trackData"
]);
Sending SKU is only required if using Product Recommendations
// addProductDetails Example with Multiple SKUs
window.monetateQ = window.monetateQ || [];
window.monetateQ.push([
  "addProductDetails", [{
    productId: "pidString",
    sku: "skuString_01"
  }],
  [{
    productId: "pidString",
    sku: "skuString_02"
  }],
  [{
    productId: "pidString",
    sku: "skuString_03"
  }]
]);
window.monetateQ.push([
  "trackData"
]);