sendEvent
The sendEvent
command is the primary way to send data to ÃÛ¶¹ÊÓƵ, to retrieve personalized content, identities, and audience destinations. Use the xdm
object to send data that maps to your ÃÛ¶¹ÊÓƵ 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 ÃÛ¶¹ÊÓƵ Experience Platform Data Collection tags interface.
- Log in to using your ÃÛ¶¹ÊÓƵ 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 ÃÛ¶¹ÊÓƵ Experience Platform Web SDK, and set the Action Type to Send event.
- 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": false,
"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 flagrenderAttempted
set totrue
.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.