Collect and map Analytics data

Last update: 2023-12-05
  • Created for:
  • Beginner

Learn how to map mobile data to Adobe Analytics.

The event data which you collected and sent to Platform Edge Network in earlier lessons is forwarded to the services configured in your datastream, including Adobe Analytics. You map the data to the correct variables in your report suite.



  • Understanding of ExperienceEvent tracking.
  • Successfully sending XDM data in your sample app.
  • An Adobe Analytics report suite that you can use for this lesson.

Learning objectives

In this lesson, you will:

  • Configure your datastream with the Adobe Analytics service.
  • Understand automatic mapping of Analytics variables.
  • Set up processing rules to map XDM data to Analytics variables.

Add Adobe Analytics datastream service

To send your XDM data from the Edge Network to Adobe Analytics, you configure the Adobe Analytics service to the datastream you set up as part of Create a datastream.

  1. In the Data Collection UI, select Datastreams and your datastream.

  2. Then select Add Add Service.

  3. Add Adobe Analytics from the Service list,

  4. Enter the name of the report suite from Adobe Analytics that you want to use in Report Suite ID.

  5. Enable the service by switching Enabled on.

  6. Select Save.

    Add Adobe Analytics as datastream service

Automatic mapping

Many of the standard XDM fields are automatically mapped to Analytics variables. See the full list here.

Example #1 - s.products

A good example is the products variable which can’t be populated using processing rules. With an XDM implementation, you pass all the necessary data in productListItems and s.products are automatically populated via Analytics mapping.

This object:

"productListItems": [
      "name":  "Yoga Mat",
      "SKU": "5829",
      "priceTotal": "49.99",
      "quantity": 1
      "name":  "Water Bottle",
      "SKU": "9841",
      "priceTotal": "30.00",
      "quantity": 3

results in:

s.products = ";5829,1,49.99;9841,3,30.00"

If productListItems[].SKU and productListItems[].name both contain data, the value in productListItems[].SKU is used. See Analytics variable mapping in Adobe Experience Edge for more information.

Example #2 - scAdd

If you look closely, all events have two fields value (required) and id (optional). The value field is used to increment the event count. The id field is used for serialization.

This object:

"commerce" : {
  "productListAdds" : {
    "value" : 1

results in: = "scAdd"

This object:

"commerce" : {
  "productListAdds" : {
    "value" : 1,
    "id": "321435"

results in: = "scAdd:321435"

Validate with Assurance

Using the Assurance you can confirm that you’re sending an experience event, the XDM data is correct and the Analytics mapping is happening as expected.

  1. Review the setup instructions section to connect your simulator or device to Assurance.

  2. Send a productListAdds event (add a product to your basket).

  3. View the ExperienceEvent hit.

    analytics xdm hit

  4. Review the XDM portion of the JSON.

    "xdm" : {
      "productListItems" : [ {
        "SKU" : "LLWS05.1-XS",
        "name" : "Desiree Fitness Tee",
        "priceTotal" : 24
      } ],
    "timestamp" : "2023-08-04T12:53:37.662Z",
    "eventType" : "commerce.productListAdds",
    "commerce" : {
      "productListAdds" : {
        "value" : 1
    // ...
  5. Review the analytics.mapping event.

    analytics xdm hit

Note the following in the Analytics mapping:

  • events are populated with scAdd based on commerce.productListAdds.
  • pl (products variable) are populated with a concatenated value based on productListItems.
  • There is other interesting information in this event including all the context data.

Mapping with Context Data

XDM data forwarded to Analytics gets converted into context data including both standard and custom fields.

The context data key is constructed following this syntax:

a.x.[xdm path]

For example:

// Standard Field

// Custom Field

Custom fields are placed under your Experience Cloud Org identifier.

_techmarketingdemos is replaced with your Organization’s unique value.

To map this XDM context data to your Analytics data in your report suite, you can:

Use a field group

  • Add the Adobe Analytics ExperienceEvent Full Extension field group to your schema.

    Analytics ExperienceEvent FullExtension field group

  • Build XDM payloads in your app, conforming to the Adobe Analytics ExperienceEvent Full Extension field group, similar to what you have done in the Track Event Data lesson, or

  • Build rules in your Tags property that use rule actions to attach or modify data to the Adobe Analytics ExperienceEvent Full Extension field group. See for more details Attach data to SDK events or Modify data in SDK events.

Use processing rules

Here is what a processing rule using this data might look like:

  • You Overwrite value of (1) App Screen Name (eVar2) (2) with the value of a.x._techmarketingdemo.appinformation.appstatedetails.screenname (3) if a.x._techmarketingdemo.appinformation.appstatedetails.screenname (4) is set (5).

  • You Set event (6) Add to Wishlist (Event 3) (7) to a.x.commerce.saveForLaters.value(Context) (8) if a.x.commerce.saveForLaters.value(Context) (9) is set (10).

analytics processing rules


Some of the automatically mapped variables may not be available for use in processing rules.

The first time you map to a processing rule, the interface does not show you the context data variables from the XDM object. To fix that select any value, Save, and come back to edit. All XDM variables should now appear.

Additional information about processing rules and context data can be found here.


Unlike previous mobile app implementations, there is no distinction between a page / screen views and other events. Instead you can increment the Page View metric by setting the Page Name dimension in a processing rule. Since you are collecting the custom screenName field in the tutorial, it is highly recommended to map screen name to Page Name in a processing rule.


You have set up your app to map your Experience Edge XDM objects to Adobe Analytics variables enabling the Adobe Analytics service in your datastream and using processing rules where applicable.
Thank you for investing your time in learning about Adobe Experience Platform Mobile SDK. If you have questions, want to share general feedback, or have suggestions on future content, share them on this Experience League Community discussion post.

Next: Send data to Experience Platform

On this page