Using Tags (formerly Adobe Launch) as a TMS in Mobile Apps with AEP SDK

HomeInsightsBlogs | Last Updated July 5, 2023 - by rajdeep singh under digital analytics

Published onSeptember 25, 2020

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:

  • If you miss adding a certain context data on a state/action, it becomes very challenging for a business to get that data any time soon.
  • Asking developers to add methods to capture data such as MID, SDK version, advertiser ID, Push ID, Visitor Identifier, etc. is always an overhead.
  • Pushing analytics changes is time consuming as it depends on app development build cycles.

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:

  1. Create a rule, and in event section of a rule, click Add > Choose “Mobile Core” from Extension drop drown.
  2. Choose “Track State” or “Track Action” from Event Type drop down.
    Using AEP Launch as TMShover-icon
  3. 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%%}"
    }
    }

    Using AEP Launch as TMShover-icon

  4. You can create two data elements such as “ECID” and “DeviceName” to return MID and Device Name
    Using AEP Launch as TMShover-icon
    Using AEP Launch as TMShover-icon
  5. Add all these newly created resources in your library and re-build it.
    Using AEP Launch as TMShover-icon
  6. 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.
    Using AEP Launch as TMShover-icon

Some points to be noted:

  1. Use context data JSON name as “contextdata” only. Do not change/modify the name.
  2. JSON payload format is very strict. Adobe would just reject it if correct format is not followed.
  3. 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.

Contact us now to start the conversation

    Rajdeep Singh

    Rajdeep Singh works as a Digital Analytics Manager at Softcrylic. He has over 7 years of experience in Digital Analytics Design, Implementation, and Analysis. Rajdeep utilizes his vast experience to help his clients solve complex data problems using digital analytics.

    Contact Us

    We're not around right now. But you can send us an email and we'll get back to you, asap.

    Not readable? Change text. captcha txt

    Start typing and press Enter to search