17 May 2018 05:16 AM - last edited on 30 Sep 2022 01:17 PM by MaciejNeumann
Hi Team,
I'm trying to apply user tagging on one of our application which is getting monitored under dynaTrace SAAS
The tag I'm getting in user session is like this, Sirname, Name ( alias ) | Logout but according to regex applied \bEmpId" value="([^"]*) in cleaning rule it supposed to give me only "alias".
The CSS selector result is (I checked it via browser),
<div class="middle-header-content">
Surname, Name ( Alias ) <span>|</span> <a href="Logout.htm" class="logout" data-step="9" data-intro="Click here to Logout"></a>
<a href="Logout.htm" data-step="9" data-intro="Click here to Logout"><img src="images/custom/Logout.png" style=" vertical-align: middle; margin-top: -6px;" alt="logout" title="logout">Logout</a>
<input type="hidden" name="empName" id="empName" value="Sirname, Name ( alias ) ">
<input type="hidden" name="emailAdd" id="emailAdd" value="name.sirname@xyz.com">
<input type="hidden" name="mobileNo" id="mobileNo" value="4712683461">
<input type="hidden" name="repManagerFullName" id="repManagerFullName" value="">
<input type="hidden" name="EmpId" id="EmpId" value="alias">
<input type="hidden" name="Gender" id="Gender" value="GM">
</div>
I don't know why it is showing such abnormal result. Please help.
BR,
AK
Solved! Go to Solution.
18 May 2018 07:28 AM
Tried your HTML code, this CSS selector works for me in Dynatrace (if you need the EmpID as user tag):
#EmpId@value
Actually, I don't see any reasons to use regex or cleanup rules in your case.
18 May 2018 09:52 AM
Thanks Julius..It worked perfectly fine. No need of writing regex too.
But just to have more information,
What was wrong with my configuration. I have selected appropriate CSS selector, applied correct regex, then why it was showing inappropriate results?
This will help me understand user tagging configuration better as I'm new to dynatrace SAAS.
BR.
AK
18 May 2018 11:46 AM
Always try new settings in private browser window or with cookies cleared. I guess your session was evaluated as existing one, since cookies have been present and you did not call dtrum.endSession().
18 May 2018 07:57 AM
And you you want the "Sirname, Name" from your example as the user tag, you should use this selector:
#empName@value
With the cleanup rule:
(.*) \(.*