Product Performance is a dynamic variable type used to display aggregated product activity. Unlike static variables (text, image, color, and so on), the value of this variable is retrieved once the variation is served, based on the SKU in context.
The Product Performance variable is a dynamic variable type that displays aggregated product activity (such as pageviews or purchases). Unlike static variables (text, image, color, and so on), its value is retrieved at render time, based on the SKU in context.
Adding a product performance variable to an API campaign
In any API campaign, select Product Performance from the Variable Type dropdown.
When selected, two configuration options appear, for the variable to return the following data:
- Interaction Type:
- Pageviews
- Purchases
- Timeframe:
- 1 day (last 24 hours)
- 2 days (last 48 hours)
- 1 week (last 7 days)
In the preview, the variable appears as {##} until it is resolved dynamically by the API.
How it works
When used on a product details page (PDP), Dynamic Yield:
- Identifies the SKU from the request context
- Finds the associated Group ID for that SKU
- Aggregates performance data across all SKUs in that group
- Returns a single, real-time integer value representing total product activity
Behavior in API Choose calls
When a variation containing a Product Performance variable is returned:
- Product page with SKU
If the page type is PRODUCT and the request includes a valid SKU, the response includes a resolved integer value.
Response example:
{
"Text": "People purchased this product in the past week",
"Highlighted Text": "Going fast!",
"Product Performance": 1352
} - Non-product pages or missing SKU
If the request lacks a valid SKU or the page type is not PRODUCT, the value is returned empty.
When to use social proof in API campaigns
Use Product Performance in API campaigns when you want to:
- Add real-time social proof to server-rendered experiences
- Keep messaging consistent across server-side and client-side delivery
- Personalize PDPs dynamically, without manual data aggregation
Best practices
- Always include a valid SKU in the request when previewing PDP experiences
- Ensure that each SKU is mapped to the correct Group ID
- Use out-of-the-box templates to speed things up
- Apply numeric formatting client-side if needed (for example, converting 1352 → 1,352)