Change Attribute

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

❗️

This event is currently available for script implementation only.

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:
PropertyDescriptionType
dyTypeMust be "change-attr-v1"String
attributeType
Color, size, fit, brand, author, keyword, category, or any other attribute you allow.String
attributeValueThe new value (for example, new color is Gray)String

📘

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

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

👍

Go to the API reference for the Events endpoint to learn more.