08 Feb 2019 12:14 PM - last edited on 30 Sep 2022 05:08 AM by MaciejNeumann
I've read everything I can relating to the mobile app instrumentation and the Cordova plugin, but one thing that is not clear to me is how to go about enabling user tagging for a hybrid mobile app.
Is there someone who's successfully done hybrid app instrumentation and configured the user tagging? Can you perhaps share the steps, exactly what needs to be added and where, sequence (if relevant)? Is the instrumentation process handled exclusively by the Cordova plugin, or does one still have to run auto-instrumentation on the APK file at some point? If it's handled only via the Cordova plugin, how is the user tagging done, which API call must be used?
The setup and configuration of the Mobile app and agentless Web app in Dynatrace is done and we see user sessions but they all appear as anonymous, even though users logged into the hybrid mobile app.
The info in this thread was shared with the developers of the hybrid app, but they came back saying that the info pertains only to native mobile app instrumentation, so any guidance would be highly appreciated. Unfortunately I don't have any dev experience, so I can't refute what they're saying.
My understanding of the answer in this thread is that the Cordova plugin will handle both the JS and the OneAgent injection parts, but it's not clear how, when and where to configure the user tagging, which is done via the OneAgent SDK for Android, correct?
Solved! Go to Solution.
I think where should be option for using JS ADK in your html page content. This is what cordova plugin does it is injecting JS into webview.
Thanks @Sebastian K., any idea what that option would be, exactly and how to get it into the code? Does it work the same for Dynatrace than what it does for AppMon, in terms of the code at least? I found this AppMon thread which mentions the dynaTrace.tagVisit("Username") for the JS agent. Still unsure how or where to add it, but I guess it this will work, the devs will hopefully understand where and how to add it to their code?
If this will work how I think this should be executed in js of your page:
As Sebastian already described the Cordova plugin is auto-injecting the JSAgent and therefore it provides the interface for the JSAgent. In Dynatrace this is dtrum. There are also typings included in the Plugin folder - You can see the interface in more detail there. The OneAgent SDK for Android is only accessible for the endSession call (with dynatraceMobile) - as it is asynchronous.
Dear @Matthias H. @Sebastian K. @Patrick H.
What is required to configure/instrument the Hybrid application to get the user tagging for the iOS and Andriod platforms?
Please share the relevant information and the specific documentation link to share with the developers.