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.

  1. Log in to experience.adobe.com using your Adobe ID credentials.
  2. Navigate to Data Collection > Tags.
  3. Select the desired tag property.
  4. Navigate to Rules, then select the desired rule.
  5. Under Actions, select an existing action or create an action.
  6. Set the Extension dropdown field to Adobe Experience Platform Web SDK, and set the Action Type to Send event.
  7. Provide the data element containing the desired object in the XDM field.
  8. 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",
      }
    ]
  }
});
recommendation-more-help
ad108910-6329-42f1-aa1d-5920a2b13636