---
updatedAt: 2026-01-22T11:09:44.000Z
---

# Change Attribute

Reports that a user changed an attribute of the displayed product (such as color or size).

### Parameters

* **name:** Human-readable name, not used to identify an event type
* **properties:** A container for the event properties as specified in the following table:

[block:parameters]
{
  "data": {
    "h-0": "Property",
    "h-1": "Description",
    "h-2": "Type",
    "0-0": "**dyType**",
    "0-1": "Must be \"change-attr-v1\"",
    "0-2": "String",
    "1-0": "**attributeType  \n**",
    "1-1": "Color, size, fit, brand, author, keyword, category, or any other attribute you allow.",
    "1-2": "String",
    "2-0": "**attributeValue**",
    "2-1": "The new value (for example, new color is Gray)",
    "2-2": "String"
  },
  "cols": 3,
  "rows": 3,
  "align": [
    "left",
    "left",
    "left"
  ]
}
[/block]

> 📘 Note
>
> The attribute type and value must match information in your product feed. The currently displayed product is inferred from the in-page context.

**Example: Implementation via script**

```javascript
DY.API("event", {
  name: "Change Attribute",
  properties: {
    dyType: "change-attr-v1",
    attributeType: "Color",
    attributeValue: "Navy Blue"
  }
});
```

**Example: Implementation via server-side API**

```
"events": [
    {
      "properties": {
        "dyType": "change-attr-v1",
        "attributeType": "color",
        "attributeValue": "lavender"
      }
    }
  ]
```

<br />

> 👍 Go to the [API reference for the Events endpoint](https://dy.dev/dy-dev/reference/track-events) to learn more.