Process summary
The process of configuring data collection for your website can be summarized as follows:
- Create a schema to determine how your data will be structured when being sent to the Edge Network.
- Create a datastream to configure which destinations you want your data to be sent to.
- Install and configure the Web SDK to send data to the datastream when certain events occur on your website.
Once you are able to send data to the Edge Network, you can also optionally configure event forwarding if your organization has a license for it.
Create a schema
Experience Data Model (XDM) is an open-source specification that provides common structures and definitions for data in the form of schemas. In other words, XDM is a way of structuring and formatting your data in a way that is actionable by the Edge Network and other Adobe Experience Cloud applications.
The first step in setting up your data collection operations is to create an XDM schema to represent your data. At a later step in this tutorial, you will map the data you want to send to the structure of this schema.
In the UI, select Schemas in the left navigation. From here, you can see a list of previously created schemas belonging to your organization. To continue, select Create schema, then select XDM ExperienceEvent from the dropdown menu.
A dialog appears that prompts you to start adding field groups to the schema. In order to send events using the Web SDK, you must add the field group AEP Web SDK ExperienceEvent Mixin. This field group contains definitions for data attributes that are automatically collected by the Web SDK library.
Use the search bar to narrow down the list to help find this field group easier. Once you have found it, select it from the list before selecting Add field groups.
The schema canvas appears, showing a tree structure of your XDM schema including the fields provided by the Web SDK field group.
Select the root field in the tree to open Schema properties in the right rail, where you can provide a name and optional description for the schema.
If you want to add more fields to the schema, you can do so by selecting Add under the Field groups section in the left rail.
Once you have added the fields you need, select Save to save the schema.
Create a datastream
A datastream is a configuration that tells the Edge Network where you want your data to be sent. Specifically, a datastream specifies which Experience Cloud products you want to send the data to, and how you want the data to be handled and stored in each product.
Select Datastreams in the left navigation. From here, you can select an existing datastream from the list to edit, or you can create a new configuration by selecting New Datastream.
The configuration requirements for a datastream depend on which products and capabilities you are sending data to. For detailed information on the configuration options for each product, refer to the datastreams overview.
Install and configure the Web SDK
Once you have created a schema and a datastream, the next step is to install and configure the Experience Platform Web SDK to start sending data to the Edge Network.
The process can be summarized as follows:
- Install the Adobe Experience Platform Web SDK on a tag property to gain access to its capabilities.
- Create an XDM Object data element to map variables on your website to the structure of the XDM schema you created previously.
- Create a rule to tell the SDK when it should send data to the Edge Network.
- Build and install a library to implement the rule on your website.
Install the SDK on a tag property
Select Tags in the left navigation to show a list of tag properties. You can choose an existing property to edit if you wish, or you can select New Property instead.
If creating a new property, provide a descriptive name and set the Platform to Web. Provide the full domain for the web property, and then select Save.
The overview page for the property appears. From here, select Extensions in the left navigation, then select Catalog. Find the listing for the Experience Platform Web SDK (optionally using the search bar to narrow results) and select Install.
The configuration page for the SDK appears. Most required values are auto-populated with defaults that you can choose to change if you wish.
Before you can install the SDK, however, you must select a datastream so it knows where to send your data to. Under Datastreams, use the dropdown menu to select the datastream that you configured at an earlier step. Once you’ve set the datastream, select Save to finish installing the SDK to the property.
Create an XDM data element
In order for the SDK to send data to the Edge Network, that data must be mapped to the XDM schema you created in a previous step. This mapping is accomplished through the use of a data element.
In the UI, select Data Elements, then select Create New Data Element.
On the next screen, select Adobe Experience Platform Web SDK under the Extension dropdown, then select XDM object for the data element type.
The configuration dialog appears for the XDM object type. The dialog automatically selects your Experience Platform sandbox, and from here you can see all the schemas that have been created in that sandbox. Select the XDM schema you created earlier from the list.
The structure of the schema appears. All fields with an asterisk (*) indicate fields that will automatically populate when events fire. For all other fields, you can explore the structure of the schema and fill out the rest of the data.
cartAbandonsTotal
) to an XDM field by referencing its name in the Value field, surrounded by percent signs (%
).Once you have finished mapping your data to the schema, provide a name for the data element before selecting Save.