xdm
The xdm
object contains the data payload sent to Adobe. Fields set within this object map directly to elements defined in the dataset’s schema.
Adobe Experience Platform uses schemas to describe the structure of data in a consistent and reusable way. By defining data consistently across systems, it becomes easier to retain meaning and, therefore, gain value from data.
This object has a maximum limit of 32 KB.
Configure the XDM object using the Web SDK extension
Set the XDM object within the actions of a tag rule. The XDM object provides an intuitive interface to map other data elements to their respective XDM fields.
- Log in to experience.adobe.com using your Adobe ID credentials.
- Navigate to Data Collection > Tags.
- Select the desired tag property.
- Navigate to Rules, then select the desired rule.
- Under Actions, select an existing action or create an action.
- Set the Extension dropdown field to Adobe Experience Platform Web SDK, and set the Action Type to Send event.
- Provide the data element containing the desired object in the XDM field.
- Click Keep Changes, then run your publishing workflow.
Configure the XDM object using the Web SDK JavaScript library
Set the xdm
object when running the sendEvent
command. Make sure that the hierarchy in this object matches the schema for the configured dataset. You can include both the xdm
object and the data
object in the same sendEvent
command.
alloy("sendEvent", {
"xdm": adobeDataLayer.getState(reference)
});
The following example uses the Commerce Details schema field group:
alloy("sendEvent",{
"xdm":{
"commerce":{
"productViews":{
"value":1
}
},
"productListItems":[
{
"SKU":"HT105",
"name":"Large field hat",
},
{
"SKU":"HT104",
"name":"Small field hat",
}
]
}
});