---
title: Request additional attributes in product recommendations
slug: product-recommendations/docs/additional-attributes-and-recommendations
docTags: 
createdAt: 2026-07-30T20:41:31.415Z
---

If the Optimizely Product Recommendations product was enabled for the current page, you can request that additional product attributes (such as star ratings) are supplied in the `smartRecs` callback.

| Name      |                 | Description and usage                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| --------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| smartRecs |                 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
|           | showAttributes  | \[Optional]<br />Controls which attributes to show in the smartRecs callback.<br />A comma-separated list of attribute names to send in the smartRecs callback. If this property is not supplied, no attributes are sent. If this property is set to "\*", all available attributes are sent.                                                                                                                                                                                                                                  |
|           | markRecsAsShown | \[Optional]<br />Whether all recommendations sent as the response are rendered.<br />This must be included if a subset of recommendations sent as the response is rendered on the front end of your site/application.<br />Default is true; that is, all recommendations in the response are assumed to have been rendered.<br />If set to false, an additional API call needs to be made to inform Optimizely of the IDs of recommendations that have been rendered. See [Impression tracking](docId\:HIaTBr1jYDvmVtrH5GvTt). |

For example, on a product page tracking request, to show all attributes for the recommended products, send the following.

```csharp
<script> 
    PeeriusCallbacks.track={ 
     	type        : "product",
      lang        : "en-gb",
      "smartRecs" : {
        "showAttributes" : ["*"]
      },
      product     : {
        refCode:"PROD500"
      }
    } 
    </script>
```

If you want the callback to contain only the attribute "starrating", for each recommended product, send the following.

```json
<script> 
    PeeriusCallbacks.track={
      type        : "product",
      lang        : "en-gb",
      "smartRecs" : {
        "showAttributes" : ["starrating"]
      },
      product     : {
        refCode:"PROD500"
      }
    } 
</script>
```
