<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>article Resolve User Tagging Issues for Android and iOS in Dynatrace in Troubleshooting</title>
    <link>https://community.dynatrace.com/t5/Troubleshooting/Resolve-User-Tagging-Issues-for-Android-and-iOS-in-Dynatrace/ta-p/199952</link>
    <description>&lt;DIV class="lia-message-template-content-zone"&gt;
&lt;P&gt;&lt;EM&gt;Summary:&amp;nbsp;This article explains common reasons why user tagging may fail in mobile applications. It outlines configuration steps, SDK considerations, and platform‑specific tagging behaviors.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;How to tag a user in a session&amp;nbsp;&lt;/H2&gt;
&lt;P&gt;A session gets tagged when SDK API method is called.&lt;/P&gt;
&lt;PRE&gt;Dynatrace.identifyUser("john.doe@example.com");&lt;/PRE&gt;
&lt;P&gt;for both Android and iOS.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;H2&gt;Session is not being tagged?&lt;/H2&gt;
&lt;P&gt;Review the logs.&lt;/P&gt;
&lt;P&gt;From the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Application =&amp;gt; Mobile app settings&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;=&amp;gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Instrumentation settings.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;If opt-in mode is enabled&lt;/P&gt;
&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mceclip0.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/8847iA32714FBAA8A0D39/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mceclip0.png" alt="mceclip0.png" /&gt;&lt;/span&gt;
&lt;P&gt;Make sure that, for iOS, in the plist&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;DTXUserOptIn&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;is set to true or, for Android, in the configuration file that&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;userOptIn&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;set to true&lt;/P&gt;
&lt;P&gt;From Logs&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;iOS&lt;/STRONG&gt;: DTXUserOptIn , value: 1,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Android&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;:&amp;nbsp;userOptIn=true&lt;/P&gt;
&lt;P&gt;Confirm that the application code has the privacy notice added so users can set their preferences. Example&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://dt-url.net/bq5m0pnm" target="_blank" rel="noopener"&gt;here&lt;/A&gt;.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;H3&gt;iOS&lt;/H3&gt;
&lt;PRE&gt;import Dynatrace&lt;BR /&gt;&lt;BR /&gt;// Privacy settings configured below are only provided&lt;BR /&gt;// to allow a quick start with capturing monitoring data.&lt;BR /&gt;// This has to be requested from the user&lt;BR /&gt;// (e.g. in a privacy settings screen) and the user decision&lt;BR /&gt;// has to be applied similar to this example.&lt;BR /&gt;let privacyConfig = Dynatrace.userPrivacyOptions()&lt;BR /&gt;privacyConfig.dataCollectionLevel = .userBehavior&lt;BR /&gt;privacyConfig.crashReportingOptedIn = true&lt;BR /&gt;privacyConfig.crashReplayOptedIn = true&lt;BR /&gt;Dynatrace.applyUserPrivacyOptions(privacyConfig) { (Bool) in&lt;BR /&gt;    // callback after privacy changed&lt;BR /&gt;}&lt;/PRE&gt;
&lt;H3&gt;Android&lt;/H3&gt;
&lt;PRE&gt;// Privacy settings configured below are only provided&lt;BR /&gt;// to allow a quick start with capturing monitoring data.&lt;BR /&gt;// This has to be requested from the user&lt;BR /&gt;// (e.g. in a privacy settings screen) and the user decision&lt;BR /&gt;// has to be applied similar to this example.&lt;BR /&gt;Dynatrace.applyUserPrivacyOptions(UserPrivacyOptions.builder()&lt;BR /&gt;.withDataCollectionLevel(DataCollectionLevel.USER_BEHAVIOR)&lt;BR /&gt;.withCrashReportingOptedIn(true)&lt;BR /&gt;.build());&lt;/PRE&gt;
&lt;P&gt;These parts of code can be found in&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Application =&amp;gt; Mobile app settings&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;=&amp;gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Instrumentation wizard&amp;nbsp;&lt;/STRONG&gt;for each platform.&lt;/P&gt;
&lt;H3&gt;DataCollectionLevel meanings&lt;/H3&gt;
&lt;UL&gt;
&lt;LI&gt;OFF (the agent does not capture data.)&lt;BR /&gt;from logs will be referenced to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;iOS&lt;/STRONG&gt;:&amp;nbsp; dataCollectionLevel:0,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Android&lt;/STRONG&gt;: dataCollectionLevel=OFF&lt;/LI&gt;
&lt;LI&gt;PERFORMANCE (the agent only captures anonymous performance data.)&lt;BR /&gt;from logs will be referenced to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;iOS&lt;/STRONG&gt;:&amp;nbsp; dataCollectionLevel:1,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Android&lt;/STRONG&gt;: dataCollectionLevel=PERFORMANCE&lt;/LI&gt;
&lt;LI&gt;USER_BEHAVIOR (he agent captures performance and user data.)&lt;BR /&gt;from logs will be referenced to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;iOS&lt;/STRONG&gt;:&amp;nbsp; dataCollectionLevel:2,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Android&lt;/STRONG&gt;: dataCollectionLevel=USER_BEHAVIOR&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;In this situation, USER_BEHAVIOR is the only status in which the user will be tagged.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&amp;nbsp;IOS&lt;/P&gt;
&lt;P&gt;Search in the xcode console logs for the following, Here "&lt;STRONG&gt;Kazuya"&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;name is tagged.&lt;/P&gt;
&lt;PRE&gt;CREATED IDENTIFY_USER EVENT: &amp;lt;DTXMeasurement 0x7fcd89521410: visitorId=7868376413403 sessionId=12 sessionSequence=0 name=&lt;STRONG&gt;Kazuya&lt;/STRONG&gt;&lt;SPAN&gt; startTimestamp=2021-08-19 14:13:56 +0000 customValue=0 duration=0.000000 sent=0 connectionType=w networkProtocol=802.11x batteryStrengthPercent=-2 freeMemoryPercent=0 activeMemoryPercent=42 inactiveMemoryPercent=42 wiredMemoryPercent=9 portraitOrientation=1 currentTag=-1 enclosingTag=0 customValueDouble=0.000000 eventType=60 self.eventTypeString=IdentifyUser lifecycleSequence0=18 lifecycleSequence1=0 lifecycleSequence2=0 lifecycleSequence3=0 threadId=1 bytesReceived=0 bytesSent=0 &amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Android&lt;/P&gt;
&lt;P&gt;In this example, the application user is tagged with "&lt;STRONG&gt;Ace Ventura&lt;/STRONG&gt;" and the corresponding log entry can be found in Logcat (either in Android Studio or with the adb logcat command-line tool)&lt;/P&gt;
&lt;PRE&gt;2021-08-19 11:41:59.818 10455-10455/com.dynatrace.mobilelab D/dtxAgentCore&lt;/PRE&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="100%"&gt;
&lt;P&gt;NOTE:&lt;BR /&gt;Changing the data collection level will generate a new user session. Meaning whenever the value changes the current session will end and a new one is created.&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;Some sessions are anonymous?&lt;/H2&gt;
&lt;P&gt;So if we are sure that the Dynatrace.identifyUser is being called and sometimes users are not tagged.&lt;/P&gt;
&lt;P&gt;We have to confirm that this line of code "&lt;STRONG&gt;Dynatrace.identifyUser&lt;/STRONG&gt;" is being called.&lt;/P&gt;
&lt;P&gt;An easy way to do that is to print in the log a custom message&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Example:&lt;/STRONG&gt;&lt;/P&gt;
&lt;PRE&gt;print("***WILL START TAGGING***")&lt;BR /&gt;Dynatrace.identifyUser("john.doe@example.com");&lt;BR /&gt;print("***Tagged the user***")&lt;/PRE&gt;
&lt;P&gt;If you don't see the printed parts in the logs, then identifyUser was never called.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Also, make sure that the passed variable to identify the user is not&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;null&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;or&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;empty&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;(simply by printing its value to the logs.)&lt;/P&gt;
&lt;P&gt;If you pass a null or empty string to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Dynatrace.identifyUser("");&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;the sessions won't be tagged.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;H2&gt;Tracking a session from logs to Dynatrace?&lt;/H2&gt;
&lt;P&gt;From iOS logs:&lt;/P&gt;
&lt;P&gt;Here the visitor ID is&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;14054083387977&lt;/STRONG&gt;&lt;/P&gt;
&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sessionID.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/8848i3E0210DC0DD7BCE2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sessionID.png" alt="sessionID.png" /&gt;&lt;/span&gt;
&lt;P&gt;From the logs search for visitorID: &amp;lt;visitorID&amp;gt;&lt;/P&gt;
&lt;PRE&gt;&lt;STRONG&gt;&lt;SPAN&gt;2021-08-23 14:29:40.045093+0200 DynaPods[7304:249306] &lt;span class="lia-unicode-emoji" title=":upwards_button:"&gt;🔼&lt;/span&gt; FINE&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;span class="lia-unicode-emoji" title=":satellite_antenna:"&gt;📡&lt;/span&gt; Communication&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;[DTXCommunicationsManager.m:1118-12803-2] sendMetrics for visitorId: 14054083387977 sessionId: 151, number of metrics to send: 12&lt;/STRONG&gt;&lt;/PRE&gt;
&lt;P&gt;From Android logs:&lt;/P&gt;
&lt;P&gt;Here the visitor's session ID is&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;3672025434&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;From the logs at the beacon search for vi=&amp;lt;visitorID&amp;gt;&lt;/P&gt;
&lt;PRE&gt;#12712.aPOST url[https://bf62926nek.bf.dynatrace.com/mbeacon?type=m&amp;amp;srvid=3&amp;amp;app=012cb464-3e06-4454-ada1-db0ec2db871a&amp;amp;va=8.217.1.1003&amp;amp;tt=maandroid&amp;amp;pt=0&amp;amp;resp=json&amp;amp;cts=1625491826087&amp;amp;si=3672025434_4] data[vv=3&amp;amp;va=8.217.1.1003&amp;amp;ap=012cb464-3e06-4454-ada1-db0ec2db871a&amp;amp;an=MySafaricom&amp;amp;ai=com.safaricom.mysafaricom&amp;amp;vn=1.8.0-beta-rc01&amp;amp;vb=10816&amp;amp;vi=3672025434&amp;amp;sn=4&amp;amp;ss=0&amp;amp;rm=1850&amp;amp;cp=ARMv7+rev+4+%28v7l%29&amp;amp;os=Android+10&amp;amp;mf=HMD+Global&amp;amp;md=Nokia+2.4&amp;amp;rj=g&amp;amp;ul=en_GB&amp;amp;sw=720&amp;amp;sh=1600&amp;amp;sd=280&amp;amp;pt=0&amp;amp;so=p&amp;amp;bl=100&amp;amp;fm=723&amp;amp;cr=SAF+FOR+YOU&amp;amp;ct=w&amp;amp;np=802.11x&amp;amp;tt=maandroid&amp;amp;dl=2&amp;amp;cl=2&amp;amp;vs=2&amp;amp;fv=pl&amp;amp;tv=1625&lt;/PRE&gt;
&lt;P&gt;or if there is a web request that is tagged by the android agent via&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;MT_&amp;lt;visitorID&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Mobile Sessions are split:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;On app termination.&lt;/LI&gt;
&lt;LI&gt;On 30 minutes of inactivity.&lt;/LI&gt;
&lt;LI&gt;After 6 hours of duration.&lt;/LI&gt;
&lt;LI&gt;On more than 200 user actions.&lt;BR /&gt;&lt;BR /&gt;The inactivity timeout (10 min) is controlled by the Agent. When the app foregrounds it checks if the inactivity timeout was reached and creates a new session or continues the existing one (if the app was not purged from memory by the mobile OS when in the background). Session timeout is, also, enforced on the cluster if not done on a mobile device (~35 min by visit store).&lt;/LI&gt;
&lt;/UL&gt;
&lt;/DIV&gt;</description>
    <pubDate>Mon, 26 Jan 2026 12:20:46 GMT</pubDate>
    <dc:creator>yngwie_lucero</dc:creator>
    <dc:date>2026-01-26T12:20:46Z</dc:date>
    <item>
      <title>Resolve User Tagging Issues for Android and iOS in Dynatrace</title>
      <link>https://community.dynatrace.com/t5/Troubleshooting/Resolve-User-Tagging-Issues-for-Android-and-iOS-in-Dynatrace/ta-p/199952</link>
      <description>&lt;DIV class="lia-message-template-content-zone"&gt;
&lt;P&gt;&lt;EM&gt;Summary:&amp;nbsp;This article explains common reasons why user tagging may fail in mobile applications. It outlines configuration steps, SDK considerations, and platform‑specific tagging behaviors.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;How to tag a user in a session&amp;nbsp;&lt;/H2&gt;
&lt;P&gt;A session gets tagged when SDK API method is called.&lt;/P&gt;
&lt;PRE&gt;Dynatrace.identifyUser("john.doe@example.com");&lt;/PRE&gt;
&lt;P&gt;for both Android and iOS.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;H2&gt;Session is not being tagged?&lt;/H2&gt;
&lt;P&gt;Review the logs.&lt;/P&gt;
&lt;P&gt;From the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Application =&amp;gt; Mobile app settings&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;=&amp;gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Instrumentation settings.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;If opt-in mode is enabled&lt;/P&gt;
&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mceclip0.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/8847iA32714FBAA8A0D39/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mceclip0.png" alt="mceclip0.png" /&gt;&lt;/span&gt;
&lt;P&gt;Make sure that, for iOS, in the plist&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;DTXUserOptIn&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;is set to true or, for Android, in the configuration file that&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;userOptIn&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;set to true&lt;/P&gt;
&lt;P&gt;From Logs&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;iOS&lt;/STRONG&gt;: DTXUserOptIn , value: 1,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Android&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;:&amp;nbsp;userOptIn=true&lt;/P&gt;
&lt;P&gt;Confirm that the application code has the privacy notice added so users can set their preferences. Example&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://dt-url.net/bq5m0pnm" target="_blank" rel="noopener"&gt;here&lt;/A&gt;.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;H3&gt;iOS&lt;/H3&gt;
&lt;PRE&gt;import Dynatrace&lt;BR /&gt;&lt;BR /&gt;// Privacy settings configured below are only provided&lt;BR /&gt;// to allow a quick start with capturing monitoring data.&lt;BR /&gt;// This has to be requested from the user&lt;BR /&gt;// (e.g. in a privacy settings screen) and the user decision&lt;BR /&gt;// has to be applied similar to this example.&lt;BR /&gt;let privacyConfig = Dynatrace.userPrivacyOptions()&lt;BR /&gt;privacyConfig.dataCollectionLevel = .userBehavior&lt;BR /&gt;privacyConfig.crashReportingOptedIn = true&lt;BR /&gt;privacyConfig.crashReplayOptedIn = true&lt;BR /&gt;Dynatrace.applyUserPrivacyOptions(privacyConfig) { (Bool) in&lt;BR /&gt;    // callback after privacy changed&lt;BR /&gt;}&lt;/PRE&gt;
&lt;H3&gt;Android&lt;/H3&gt;
&lt;PRE&gt;// Privacy settings configured below are only provided&lt;BR /&gt;// to allow a quick start with capturing monitoring data.&lt;BR /&gt;// This has to be requested from the user&lt;BR /&gt;// (e.g. in a privacy settings screen) and the user decision&lt;BR /&gt;// has to be applied similar to this example.&lt;BR /&gt;Dynatrace.applyUserPrivacyOptions(UserPrivacyOptions.builder()&lt;BR /&gt;.withDataCollectionLevel(DataCollectionLevel.USER_BEHAVIOR)&lt;BR /&gt;.withCrashReportingOptedIn(true)&lt;BR /&gt;.build());&lt;/PRE&gt;
&lt;P&gt;These parts of code can be found in&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Application =&amp;gt; Mobile app settings&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;=&amp;gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Instrumentation wizard&amp;nbsp;&lt;/STRONG&gt;for each platform.&lt;/P&gt;
&lt;H3&gt;DataCollectionLevel meanings&lt;/H3&gt;
&lt;UL&gt;
&lt;LI&gt;OFF (the agent does not capture data.)&lt;BR /&gt;from logs will be referenced to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;iOS&lt;/STRONG&gt;:&amp;nbsp; dataCollectionLevel:0,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Android&lt;/STRONG&gt;: dataCollectionLevel=OFF&lt;/LI&gt;
&lt;LI&gt;PERFORMANCE (the agent only captures anonymous performance data.)&lt;BR /&gt;from logs will be referenced to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;iOS&lt;/STRONG&gt;:&amp;nbsp; dataCollectionLevel:1,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Android&lt;/STRONG&gt;: dataCollectionLevel=PERFORMANCE&lt;/LI&gt;
&lt;LI&gt;USER_BEHAVIOR (he agent captures performance and user data.)&lt;BR /&gt;from logs will be referenced to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;iOS&lt;/STRONG&gt;:&amp;nbsp; dataCollectionLevel:2,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Android&lt;/STRONG&gt;: dataCollectionLevel=USER_BEHAVIOR&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;In this situation, USER_BEHAVIOR is the only status in which the user will be tagged.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&amp;nbsp;IOS&lt;/P&gt;
&lt;P&gt;Search in the xcode console logs for the following, Here "&lt;STRONG&gt;Kazuya"&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;name is tagged.&lt;/P&gt;
&lt;PRE&gt;CREATED IDENTIFY_USER EVENT: &amp;lt;DTXMeasurement 0x7fcd89521410: visitorId=7868376413403 sessionId=12 sessionSequence=0 name=&lt;STRONG&gt;Kazuya&lt;/STRONG&gt;&lt;SPAN&gt; startTimestamp=2021-08-19 14:13:56 +0000 customValue=0 duration=0.000000 sent=0 connectionType=w networkProtocol=802.11x batteryStrengthPercent=-2 freeMemoryPercent=0 activeMemoryPercent=42 inactiveMemoryPercent=42 wiredMemoryPercent=9 portraitOrientation=1 currentTag=-1 enclosingTag=0 customValueDouble=0.000000 eventType=60 self.eventTypeString=IdentifyUser lifecycleSequence0=18 lifecycleSequence1=0 lifecycleSequence2=0 lifecycleSequence3=0 threadId=1 bytesReceived=0 bytesSent=0 &amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Android&lt;/P&gt;
&lt;P&gt;In this example, the application user is tagged with "&lt;STRONG&gt;Ace Ventura&lt;/STRONG&gt;" and the corresponding log entry can be found in Logcat (either in Android Studio or with the adb logcat command-line tool)&lt;/P&gt;
&lt;PRE&gt;2021-08-19 11:41:59.818 10455-10455/com.dynatrace.mobilelab D/dtxAgentCore&lt;/PRE&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="100%"&gt;
&lt;P&gt;NOTE:&lt;BR /&gt;Changing the data collection level will generate a new user session. Meaning whenever the value changes the current session will end and a new one is created.&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;Some sessions are anonymous?&lt;/H2&gt;
&lt;P&gt;So if we are sure that the Dynatrace.identifyUser is being called and sometimes users are not tagged.&lt;/P&gt;
&lt;P&gt;We have to confirm that this line of code "&lt;STRONG&gt;Dynatrace.identifyUser&lt;/STRONG&gt;" is being called.&lt;/P&gt;
&lt;P&gt;An easy way to do that is to print in the log a custom message&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Example:&lt;/STRONG&gt;&lt;/P&gt;
&lt;PRE&gt;print("***WILL START TAGGING***")&lt;BR /&gt;Dynatrace.identifyUser("john.doe@example.com");&lt;BR /&gt;print("***Tagged the user***")&lt;/PRE&gt;
&lt;P&gt;If you don't see the printed parts in the logs, then identifyUser was never called.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Also, make sure that the passed variable to identify the user is not&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;null&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;or&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;empty&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;(simply by printing its value to the logs.)&lt;/P&gt;
&lt;P&gt;If you pass a null or empty string to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Dynatrace.identifyUser("");&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;the sessions won't be tagged.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;H2&gt;Tracking a session from logs to Dynatrace?&lt;/H2&gt;
&lt;P&gt;From iOS logs:&lt;/P&gt;
&lt;P&gt;Here the visitor ID is&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;14054083387977&lt;/STRONG&gt;&lt;/P&gt;
&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sessionID.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/8848i3E0210DC0DD7BCE2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sessionID.png" alt="sessionID.png" /&gt;&lt;/span&gt;
&lt;P&gt;From the logs search for visitorID: &amp;lt;visitorID&amp;gt;&lt;/P&gt;
&lt;PRE&gt;&lt;STRONG&gt;&lt;SPAN&gt;2021-08-23 14:29:40.045093+0200 DynaPods[7304:249306] &lt;span class="lia-unicode-emoji" title=":upwards_button:"&gt;🔼&lt;/span&gt; FINE&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;span class="lia-unicode-emoji" title=":satellite_antenna:"&gt;📡&lt;/span&gt; Communication&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;[DTXCommunicationsManager.m:1118-12803-2] sendMetrics for visitorId: 14054083387977 sessionId: 151, number of metrics to send: 12&lt;/STRONG&gt;&lt;/PRE&gt;
&lt;P&gt;From Android logs:&lt;/P&gt;
&lt;P&gt;Here the visitor's session ID is&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;3672025434&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;From the logs at the beacon search for vi=&amp;lt;visitorID&amp;gt;&lt;/P&gt;
&lt;PRE&gt;#12712.aPOST url[https://bf62926nek.bf.dynatrace.com/mbeacon?type=m&amp;amp;srvid=3&amp;amp;app=012cb464-3e06-4454-ada1-db0ec2db871a&amp;amp;va=8.217.1.1003&amp;amp;tt=maandroid&amp;amp;pt=0&amp;amp;resp=json&amp;amp;cts=1625491826087&amp;amp;si=3672025434_4] data[vv=3&amp;amp;va=8.217.1.1003&amp;amp;ap=012cb464-3e06-4454-ada1-db0ec2db871a&amp;amp;an=MySafaricom&amp;amp;ai=com.safaricom.mysafaricom&amp;amp;vn=1.8.0-beta-rc01&amp;amp;vb=10816&amp;amp;vi=3672025434&amp;amp;sn=4&amp;amp;ss=0&amp;amp;rm=1850&amp;amp;cp=ARMv7+rev+4+%28v7l%29&amp;amp;os=Android+10&amp;amp;mf=HMD+Global&amp;amp;md=Nokia+2.4&amp;amp;rj=g&amp;amp;ul=en_GB&amp;amp;sw=720&amp;amp;sh=1600&amp;amp;sd=280&amp;amp;pt=0&amp;amp;so=p&amp;amp;bl=100&amp;amp;fm=723&amp;amp;cr=SAF+FOR+YOU&amp;amp;ct=w&amp;amp;np=802.11x&amp;amp;tt=maandroid&amp;amp;dl=2&amp;amp;cl=2&amp;amp;vs=2&amp;amp;fv=pl&amp;amp;tv=1625&lt;/PRE&gt;
&lt;P&gt;or if there is a web request that is tagged by the android agent via&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;MT_&amp;lt;visitorID&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Mobile Sessions are split:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;On app termination.&lt;/LI&gt;
&lt;LI&gt;On 30 minutes of inactivity.&lt;/LI&gt;
&lt;LI&gt;After 6 hours of duration.&lt;/LI&gt;
&lt;LI&gt;On more than 200 user actions.&lt;BR /&gt;&lt;BR /&gt;The inactivity timeout (10 min) is controlled by the Agent. When the app foregrounds it checks if the inactivity timeout was reached and creates a new session or continues the existing one (if the app was not purged from memory by the mobile OS when in the background). Session timeout is, also, enforced on the cluster if not done on a mobile device (~35 min by visit store).&lt;/LI&gt;
&lt;/UL&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 26 Jan 2026 12:20:46 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Troubleshooting/Resolve-User-Tagging-Issues-for-Android-and-iOS-in-Dynatrace/ta-p/199952</guid>
      <dc:creator>yngwie_lucero</dc:creator>
      <dc:date>2026-01-26T12:20:46Z</dc:date>
    </item>
    <item>
      <title>Re: Android and iOS: User tagging issues</title>
      <link>https://community.dynatrace.com/t5/Troubleshooting/Resolve-User-Tagging-Issues-for-Android-and-iOS-in-Dynatrace/tac-p/202039#M111</link>
      <description>&lt;P&gt;Great Write up&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/24673"&gt;@yngwie_lucero&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jan 2023 15:11:23 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Troubleshooting/Resolve-User-Tagging-Issues-for-Android-and-iOS-in-Dynatrace/tac-p/202039#M111</guid>
      <dc:creator>ChadTurner</dc:creator>
      <dc:date>2023-01-10T15:11:23Z</dc:date>
    </item>
  </channel>
</rss>

