Data Prep for Data Collection
Use Data Prep, an Adobe Experience Platform service, to map, transform, and validate data to and from Experience Data Model (XDM). When configuring an Experience Platform-enabled datastream, you can use Data Prep capabilities to map your source data to XDM when sending it to the Adobe Experience Platform Edge Network.
All data sent from a web page must land in Experience Platform as XDM. You have three ways to translate data from an on-page data layer to the XDM accepted by Experience Platform:
- Reformat the data layer into XDM on the web page itself.
- Use the Tags built-in data elements functionality to reformat a web page’s existing data layer format into XDM.
- Reformat a web page’s existing data layer format into XDM via the Edge Network, using Data Prep for Data Collection.
This guide covers the third option.
When to use Data Prep for Data Collection when-to-use-data-prep
Data Prep for Data Collection is useful in two situations:
- The website has a well-formed, governed, and maintained data layer, and you prefer to send it directly to the Edge Network instead of using JavaScript manipulation to convert it to XDM on the page (either via Tags data elements or via manual JavaScript manipulation).
- A tagging system other than Tags is deployed on the site.
Send an existing data layer to the Edge Network via Web SDK send-datalayer-via-websdk
The existing data layer must be sent using the data object within the sendEvent command.
If you are using Tags, you must use the Data field of the Send Event action type.
The rest of this guide covers how to map the data layer to XDM standards after it has been sent by the Web SDK.
This guide covers how to map your data within the UI. To complete the steps, start the process of creating a datastream up to (and including) the basic configuration step.
For a quick demonstration of the Data Prep for Data Collection process, see the following video:
Provide sample data select-data
Select Save and Add Mapping after completing the basic configuration for a datastream, and the Select data step appears. From here, you must provide a sample JSON object that represents the structure of the data that you plan on sending to Experience Platform.
To capture properties directly from your data layer, the JSON object must have a single root property data. The subproperties of the data object should then be constructed in a way that maps to the data layer properties that you want to capture. Select the section below to view an example of a properly formatted JSON object with a data root.
data root| code language-json |
|---|
|
To capture properties from an XDM object data element, the same rules apply to the JSON object, but the root property must be keyed as xdm instead. Select the section below to view an example of a properly formatted JSON object with an xdm root.
xdm root| code language-json |
|---|
|
You can select the option to upload the object as a file, or paste the raw object into the provided textbox instead. If the JSON is valid, a preview schema is displayed in the right panel. Select Next to continue.
Map your data mapping
The Mapping step appears, allowing you to map the fields in your source data to that of the target event schema in Experience Platform. From here, you can configure the mapping in two ways:
- Create mapping rules for this datastream through a manual process.
- Import mapping rules from an existing datastream.
identityMap XDM payloads, which can further impact profile matching against Real-Time CDP audiences.Create mapping rules create-mapping
To create a mapping rule, select Add new mapping.
Select the source icon (
Next, select the schema icon (
The mapping page reappears with the completed field mapping shown. The Mapping progress section updates to reflect the total number of fields that have been successfully mapped.
[*] after the array name in the source and destination field paths, as shown below.
Import existing mapping rules import-mapping
If you have previously created a datastream, you can reuse its configured mapping rules for a new datastream.
To start, select Import Mapping.
In the dialog that appears, select the datastream whose mapping rules you want to import. Once the datastream is chosen, select Preview.
The next screen shows a preview of the saved mapping rules for the selected datastream. Make sure that the displayed mappings are what you expect, and then select Import to confirm and add the mappings to the new datastream.
Complete the mapping complete-mapping
Continue mapping the remaining fields to the target schema. While you do not have to map all available source fields, any fields in the target schema that are set as required must be mapped to complete this step. The Required fields counter indicates how many required fields are not yet mapped in the current configuration.
When the required field count reaches zero and you are satisfied with your mapping, select Save to finalize your changes.
Next steps next-steps
This guide covered how to map your data to XDM when setting up a datastream in the UI. If you were following the general datastreams tutorial, you can now return to the step on viewing datastream details.