sendEvent

The sendEvent command is the primary way to send data to Adobe, to retrieve personalized content, identities, and audience destinations. Use the xdm object to send data that maps to your Adobe Experience Platform schema. Use the data object to send non-XDM data. You can use the datastream mapper to align data within this object to schema fields.

Send event data using the Web SDK tag extension

Sending event data is performed as an action within a rule in the Adobe Experience Platform Data Collection tags interface.

  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. Set the desired fields, click Keep Changes, then run your publishing workflow.

Send event data using the Web SDK JavaScript library

Run the sendEvent command when calling your configured instance of the Web SDK. Make sure that you call the configure command before calling the sendEvent command.

alloy("sendEvent", {
  "data": dataObject,
  "documentUnloading": true,
  "edgeConfigOverrides": { "datastreamId": "0dada9f4-fa94-4c9c-8aaf-fdbac6c56287" },
  "renderDecisions": true,
  "type": "commerce.purchases",
  "xdm": adobeDataLayer.getState(reference)
});

Response object

If you decide to handle responses with this command, the following properties are available in the response object:

  • propositions: An array of propositions returned by the Edge Network. Propositions that are automatically rendered include the flag renderAttempted set to true.
  • inferences: An array of inference objects, which contain machine learning information about this user.
  • destinations: An array of destination objects returned by the Edge Network.
recommendation-more-help
ad108910-6329-42f1-aa1d-5920a2b13636