AEP Mobile SDK Freeform DataElement

When you choose CORE as extension in DataElement creation UI, you would see ‘Free Form’ as Element type. The right side canvas has a placeholder for a path, but its not very clear how to use it. I couldnt find much documentation on adobe site to understand this dataElement type.

I would demonstrate how to use Freeform dataElement in AEP Mobile SDK. The setup uses sending XDM data to Edge Network.
Step1) I asked native android app developer to implement the following XDM for the pageView
String jsonString = "{" +
"'web' : { 'webPageDetails' : { " +
"'pageViews' : { 'value' : 1 } ," +
"'siteSection' : 'sign in'" +
"}" +
"}," +
"'eventType': 'pageView' " +
"}";
Map<String, Object> xdmData = new Gson().fromJson( jsonString, new TypeToken<HashMap<String, Object>>() {}.getType() );
ExperienceEvent experienceEvent = new ExperienceEvent.Builder()
.setXdmSchema(xdmData)
.build();
Edge.sendEvent(experienceEvent, null);
Step2) I intentionally skipped “name” field inside the web.webPageDetails object. As part of this PoC I would read the value from siteSection path and assign it to web.webPageDetails.name field using Rule in adobe launch.
I created a DataElement of FreeForm type to read the value from siteSection path.

As the placeholder is very small, I will share the full path here
xdm.web.webPageDetails.siteSection
Step3) I created a rule in adobe launch to modify the payload of pageView event.

Rule is triggered when XDM Event Type is pageView

As part of Action we modify the XDM JSON, to attach the freeform dataElement to web.webPageDetails.name path

here is the JSON code
{
"xdm": {
"web": {
"webPageDetails": {
"name": "freeform dataelement : {%%xdm.web.webPageDetails.siteSection%%}"
}
}
}
}
Step4) Run the app with Assurance session
As you can see the XDM path in assurance shows that we have been able to read the value from siteSection and attach it to the webPageDetails.name path.

This exercise is similar to data-prep done on server-side in the AEP dataStream. The purpose of this demonstration was to show we can do similar things at client-side.
#AdobeAnalytics #tagManager #tagManagement #tagging
#AdobeExperiencePlatform #aep
#ContinousLearning #LearningEveryday