How do I tag mobile users for session analysis?

Dynatrace enables you to tag each user of your mobile apps with a unique user name. This enables you to search and filter specific user sessions and analyze individual user behavior over time. The steps below explain how to manually tag an individual user via the Dynatrace API.

Android

Use the following Gradle command to add the Dynatrace API to your project during the compile process:

compile dynatrace.agent()

Within your Android Java project, use the following API call to tag a specific user:

Dynatrace.identifyUser(<usertag>);

iOS

Within Swift, use the following API call to tag a specific user:

Dynatrace.identifyUser(<username>)

Within Objective-C, use the following API call to tag a specific user:

[Dynatrace identifyUser:<username>];