I've inplemented the Mobile monitoring of an Android App with command line Auto instrumentation and the client wants to identify the user with the user tagging, however I've never done that before and I need some advice. So far I know that I have to use the OneAgent SDK for mobile and I read in the documentation that I can add it by adding it to the dependencies with the next instruction:
and that I can do the tag with the instruction:
However is it not clear for me how to do the tag could you help me please?
Also I have inplemented the mobile monitoring with manual Instrumentation (developer) for IOS can you also tell me how to do the user tagging for IOS please.
Solved! Go to Solution.
You have to add the OneAgent library as dependency to your project (in the file build.gradle) with
, where version must be the equal to the version of the auto-instrumentor. The OneAgent library is now hosted on JCenter and MavenCentral, which allows you to easily upgrade the version. But in this case we recommend to use the Dynatrace Gradle plugin, because it automatically ensures that the version of the agent and auto-instrumentor are equal.
The tag is applied by using the API
<usertag> is e.g. the users email address or a user id which you want to tag the session of a user.
Different Patrick, but I can still help 😉
Calling identifyUser will tag the entire session. The earlier the tagging is done, the earlier the tag will be available for live session. Doing it after the login would be fine. But it also is no problem if you do it later on, as long as the point where you call the API is always executed for every user.
You call it when you know which user a session should be tagged with (e.g. after login finished or after app was started and you already know which user is logged in). It has te be set on every app restart as the user tag is not persisted.
I don't understand the GUI part of this question... but you can call it from everywhere