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.
In this lesson, you will:
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.
In the Data Collection UI, select Datastreams and your datastream.
Then select Add Service.
Add Adobe Analytics from the Service list,
Enter the name of the report suite from Adobe Analytics that you want to use in Report Suite ID.
Enable the service by switching Enabled on.
Select Save.
Many of the standard XDM fields are automatically mapped to Analytics variables. See the full list here.
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.
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:
s.events = "scAdd"
This object:
"commerce" : {
"productListAdds" : {
"value" : 1,
"id": "321435"
}
}
results in:
s.events = "scAdd:321435"
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.
Review the setup instructions section to connect your simulator or device to Assurance.
Send a productListAdds event (add a product to your basket).
View the ExperienceEvent hit.
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
}
}
// ...
Review the analytics.mapping event.
Note the following in the Analytics mapping:
scAdd
based on commerce.productListAdds
.productListItems
.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
a.x.commerce.saveforlaters.value
// Custom Field
a.x._techmarketingdemos.appinformation.appstatedetails.screenname
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:
Add the Adobe Analytics ExperienceEvent Full Extension field group to your schema.
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.
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).
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.