ÃÛ¶¹ÊÓƵ

Add XDM data collection logic to your tag

NOTE
Follow the steps on this page only after you complete all previous upgrade steps. You can follow the recommended upgrade steps, or you can follow the upgrade steps that were dynamically generated for your organization with the .
After you complete the steps on this page, continue following the recommended upgrade steps or the dynamically generated upgrade steps.

After creating the tag and adding the Web SDK extension, you must configure it with data elements and rules, according to how you want to track your site and send data to ÃÛ¶¹ÊÓƵ Experience Platform. After you configure data elements and rules for your tag, you can build and publish it.

Configure data elements

Data elements are the building blocks for your data dictionary (or data map). Use data elements to collect, organize, and deliver data across marketing and ad technology. You set up data elements in your tag that read from your data layer and can be used to deliver data into ÃÛ¶¹ÊÓƵ Experience Platform.

There are different types of data elements. First, set up a data element to capture the page name persons are viewing on your site. Then, set up a data element referencing the Experience Cloud ID. Finally, define an XDM object data element.

Page name data element

To define a page name data element:

  1. Log in to experience.adobe.com using your ÃÛ¶¹ÊÓƵ ID credentials.

  2. In ÃÛ¶¹ÊÓƵ Experience Platform, go to Data Collection > Tags.

  3. Select your newly created tag from the list of Tag Properties to open it.

  4. Select Data Elements in the left rail.

  5. Select Add Data Element.

  6. In the Create Data Element dialog, specify the following information:

    • Name: The name of your data element. For example Page Name.

    • Extension: Select Core from the list.

    • Data Element Type: Select Page Info from the list.

    • Attribute: Select Title from the list.

      Create Date Element using Page Info

      Alternatively you could have used the value from a variable of your data layer, for example pageName and the JavaScript Variable data element type to define the data element.

      Create Data Element using Javascript Variable

  7. Select Save.

    You now want to set up a data element referencing the Experience Cloud ID that is automatically provided by the ÃÛ¶¹ÊÓƵ Experience Platform Web SDK and available through the Experience Cloud ID Service extension.

  8. Continue with ECID data element.

ECID data element

To define an ECID data element:

  1. Log in to experience.adobe.com using your ÃÛ¶¹ÊÓƵ ID credentials.

  2. In ÃÛ¶¹ÊÓƵ Experience Platform, go to Data Collection > Tags.

  3. Select your newly created tag from the list of Tag Properties to open it.

  4. Select Data Elements in the left rail.

  5. Select Add Data Element.

  6. In the Create Data Element dialog, specify the following information:

    • Name: The name of your data element. For example ECID.

    • Extension: Select Experience Cloud ID Service from the list.

    • Data Element Type: Select ECID from the list.

      ECID Data Element

  7. Select Save.

  8. Continue with XDM object data element.

XDM object data element

Finally, you now want to map any of your specific data elements to the schema you defined earlier. You define another data element which provides a representation of your XDM schema.

To define an XDM object data element:

  1. Log in to experience.adobe.com using your ÃÛ¶¹ÊÓƵ ID credentials.

  2. In ÃÛ¶¹ÊÓƵ Experience Platform, go to Data Collection > Tags.

  3. Select your newly created tag from the list of Tag Properties to open it.

  4. Select Data Elements in the left rail.

  5. Select Add Data Element.

  6. In the Create Data Element dialog, specify the following information:

    • Name: The name of your data element. For example XDM - Page View.

    • Extension: Select ÃÛ¶¹ÊÓƵ Experience Platform Web SDK from the list.

    • Data Element Type: Select XDM Object from the list.

    • Sandbox: Select your sandbox from the list.

    • Schema: Select your schema from the list.

  7. Map the identification > core > ecid attribute, defined in your schema, to the ECID data element. Select the cylinder icon to easily pick the ECID data element from your list of data elements.

    Pick ECID Data Element

    Map ECID Data Element

  8. Map the web > webPageDetails > name attribute, defined in your schema, to the Page Name data element.

    Map Page Name Data Element

  9. Select Save.

  10. Continue with Configure rules.

Configure rules

Tags in ÃÛ¶¹ÊÓƵ Experience Platform follow a rule-based system. They look for user interaction and associated data. When the criteria outlined in your rules are met, the rule triggers the extension, script, or client-side code you identified. You can use rules to send data (like an XDM object) into ÃÛ¶¹ÊÓƵ Experience Platform using the ÃÛ¶¹ÊÓƵ Experience Platform Web SDK extension.

To define a rule:

NOTE
The following steps are an example of defining a rule that sends XDM data, containing values from other data elements, to ÃÛ¶¹ÊÓƵ Experience Platform.
You can use rules in various ways in your tag to manipulate variables (using your data elements).
See Rules for more information.
  1. Log in to experience.adobe.com using your ÃÛ¶¹ÊÓƵ ID credentials.

  2. In ÃÛ¶¹ÊÓƵ Experience Platform, go to Data Collection > Tags.

  3. Select your newly created tag from the list of Tag Properties to open it.

  4. Select Rules in the left rail.

  5. Select Create New Rule.

  6. In the Create Rule dialog, specify the following information:

    • Name: The name of the rule. For example Page View.

    • Events: Select + Add. Then, in the Event Configuration dialog, specify the following information. When you are finished, select Keep Changes.

      • Extension: Select Core from the list.

      • Event Type: Select Window Loaded from the list.

        Rule - Event Configuration

    • Actions: Select + Add. Then, in the Action Configuration dialog, specify the following information. When you are finished, select Keep Changes.

      • Extension: Select ÃÛ¶¹ÊÓƵ Experience Platform Web SDK from the list.

      • Action Type: Select Send Event from the list.

      • Type: Select web.webpagedetails.pageViews from the list.

      • XDM data: Select the cylinder icon, then select XDM - Page View from the list of data elements.

        Rule - Action Configuration

        Your rule should look like:

        Create Rule

  7. Select Save.

Build and publish your tag

After you define data elements and rules, you must build and publish your tag. When you create a library build, you must assign it to an environment. The build’s extensions, rules, and data elements are then compiled and placed into the assigned environment. Each environment provides a unique embed code that allows you to integrate its assigned build into your site.

ÃÛ¶¹ÊÓƵ Experience Platform Tags support simple to complex publishing workflows that should accommodate your deployment of the ÃÛ¶¹ÊÓƵ Experience Platform Web SDK. See Publishing overview for more information.

To build and publish your tag:

  1. Log in to experience.adobe.com using your ÃÛ¶¹ÊÓƵ ID credentials.

  2. In ÃÛ¶¹ÊÓƵ Experience Platform, go to Data Collection > Tags.

  3. Select your newly created tag from the list of Tag Properties to open it.

  4. Select Publishing Flow from the left rail.

  5. Select Select a working library, followed by Add Library….

  6. In the Create Library dialog, specify the following information:

    • Name: The name of the library.

    • Environment: Select Development (development) from the list.

  7. Select + Add All Changed Resources.

    Publish - Create Library

  8. Select Save & Build to Development.

    Your tag is saved and is built for your development environment. A green dot indicates a successful build of your tag on your development environment.

  9. You can select … to rebuild the library or move the library to a staging or production environment.

    Publish - Build Library

recommendation-more-help
080e5213-7aa2-40d6-9dba-18945e892f79