Using Tags (formerly Adobe Launch) as a TMS in Mobile Apps with AEP SDK
This article is 2nd post of the AEP Mobile SDK blog series.
It is often questioned if we can use Tags (formerly Adobe Launch) as a tag manager for a mobile app, the way we use it for HTML web pages?
The answer is yes, you can, but with some limitations.
In addition, Tags helps you get rid of many challenges, such as:
To deal with all such scenarios, Tags lets you create rules and data elements, which can listen to app track state and track action events, and attach context data dynamically.
With this, you can now attach any additional context data using JSON payload inside Tags to trackState() or trackAction() APIs. Once your rule is in build, you will see context data from Tags flowing into Analytics along with context data set via app code.
Here are the steps on how to do it:
- Create a rule, and in event section of a rule, click Add > Choose “Mobile Core” from Extension drop drown.
- Choose “Track State” or “Track Action” from Event Type drop down.


- Now, in Action component, choose action type as Attach Data. On the right pane, in the JSON Payload field, strictly use below syntax:
{
"contextdata": {
"launch.ecid": "{%%ECID%%}",
"launch.user": "Raj",
"launch.deviceName": "{%%DeviceName%%}"
}
}
- You can create two data elements such as “ECID” and “DeviceName” to return MID and Device Name




- Add all these newly created resources in your library and re-build it.


- Now re-build your app and run it. To check your attached context data open logcat and filter logs with “eventdata for”. You will see context data from Tags appended to the original context data object.


Some points to be noted:
- Use context data JSON name as “contextdata” only. Do not change/modify the name.
- JSON payload format is very strict. Adobe would just reject it if correct format is not followed.
- This feature can’t remove/update any existing context data key-value pair from the app code but can only append to it.
With now Tags in picture, we can leverage on to rules and data elements to append any missing or OOB available information with context data sent from app code.
This feature doesn’t just give control to analytics developer over mobile tracking but also, somewhat, reduces dependency from development team.
That’s it from this post, and in the next one, I will cover the most talked about topic of AEP Mobile SDK, which is “Configuration and Debugging with AEP Assurance (formerly Project Griffon)”.
You can also checkout the recording of webinar, we recently held, on migrating mobile implementation from SDK 4.x to new AEP Mobile SDK.
I hope you enjoyed this blog, and should you have any questions, let us know by emailing us at info@softcrylic.com.