Product attributes

When sending QL product events, from your e-shop product page, you may pass an optional hash of product attributes that will be added to each product you send to QL.

For example, if you want to tell QL that your product has the color "blue" and the size "large", you should pass the color and size attributes in the product event as follows:

  window.QLAsync = function(QL){
    var clientKey = '{{clientKey}}',
        productId = '{{productId}}',
        shelfPrice = '{{shelfPrice}}',
        permalink = self.location.href,
        attributes = {"color": "blue", "size": "large"};
    QL.sendProductEvent(productId, parseFloat(shelfPrice, 10), permalink, attributes);
<script src="//"></script>

Please Note

Passing product attributes is only supported in product events. Confirmation events do not support passing product attributes

Supported types

The attributes hash supports values of only two types - String and Array of strings. Please make sure you format your values accordingly.

var attributes = {
  "color": "blue",
  "size": "10.5",
  "categories": ["Men shoes", "Trainers"]