Process summary

The process of configuring data collection for your website can be summarized as follows:

  1. Create a schema to determine how your data will be structured when being sent to the Edge Network.
  2. Create a datastream to configure which destinations you want your data to be sent to.
  3. 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.

NOTE
XDM schemas are very customizable. Rather than being overly prescriptive, the steps outlined below focus specifically on the schema requirements for the Web SDK. Outside of these parameters, you are free to define the remaining structure your data however you wish.

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.

Schemas workspace

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.

Schemas workspace

The schema canvas appears, showing a tree structure of your XDM schema including the fields provided by the Web SDK field group.

Schema structure

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.

Name 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.

Add field groups

NOTE
See the guide on adding field groups in the XDM documentation for detailed steps on how to search for different field groups to suit your use cases.
Best practice is to only add fields for data you plan on sending through the Edge Network. Once you have added fields to a schema and saved it, only additive changes can be made to the schema thereafter. See the section on the rules of schema evolution for more information.

Once you have added the fields you need, select Save to save the schema.

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.

NOTE
If you want to use event forwarding (assuming your organization is licensed for the functionality), you must enable it for a datastream in the same way that you enable Adobe products. Details on this process are covered in a later section.

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.

Datastreams

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.

NOTE
This section uses the Data Collection UI to configure the Web SDK tag extension, but you can also install and configure it using raw code instead. Refer to the following guides for more information:
Also note that even if you only want to use event forwarding, you must still install and configure the SDK as described before configuring event forwarding at a later step.

The process can be summarized as follows:

  1. Install the Adobe Experience Platform Web SDK on a tag property to gain access to its capabilities.
  2. Create an XDM Object data element to map variables on your website to the structure of the XDM schema you created previously.
  3. Create a rule to tell the SDK when it should send data to the Edge Network.
  4. 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.

Properties

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.

Create property

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.

Install the Web SDK

The configuration page for the SDK appears. Most required values are auto-populated with defaults that you can choose to change if you wish.

Configure the Web SDK

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.

Set datastream and save

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.

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.

XDM object 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.

XDM object type

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.

Map data to XDM fields

NOTE
The screenshot above demonstrates how to map a globally accessible variable from the client side of your website (cartAbandonsTotal) to an XDM field by referencing its name in the Value field, surrounded by percent signs (%).
You can also use other previously created data elements to populate these fields. See the reference on data elements in the tags documentation for more information.

Once you have finished mapping your data to the schema, provide a name for the data element before selecting Save.

Name and save data element