cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Configuring User Tag on Dynatrace Managed

jj_woon
Participant

Hi all,

I would like to configure user tag on dynatrace managed.

The thing I want to capture is the email address used for login on this page https://www.whalet.com.my/cashless/Login/Login.asp...

I have gone through the document https://help.dynatrace.com/user-experience-monitor...

However, I could not understand the document very well.

Appreciate if someone could help me.

Regards,

JJ

5 REPLIES 5

Julius_Loman
DynaMight Legend
DynaMight Legend

There are actually two different options to accomplish this. First is described in the URL and it's just a matter of configuration in Dynatrace UI. When you open the application settings, you can specify the user tag. With this option you can specify username based on four different options (Cookie name, Meta tag, Javascript variable or CSS selector) - all is done by the ruxitagent javascript code and you don't have to change anything in the page source code.


Second approach is to call the Javascript function (you supply the user name as the parameter):

dtrum.identifyUser()

With this approach you will need to modify the page source code to call this function.

I recommend to try the first option if possible. Use the second option only if the username cannot be obtained by on the the four methods above.

Please be aware that there is some user tag persistence across sessions the the UI. I'd recommend to clear your cookies when testing the user tag definition, since your sessions might have the AnonymousXXXXX tag even if your user tag definition is correct. (Happened to me few times). The usertag will correctly assigned for new sessions.

Certified Dynatrace Master | Alanata a.s., Slovakia, Dynatrace Master Partner

AlexanderSommer
Dynatrace Champion
Dynatrace Champion

Hi,
As Julius has already mentioned, you can try to identify users by capturing values by looking at cookies, meta-tags, global JS variables or CSS selectors.
While this sounds the better approach, as you don't need to touch the html source, it might not work for every application and it might break if for example the CSS selector id is changed. Using the JavaScript API function "dtrum.identifyUser("my.email@email.com")" is the most flexible way.
Please look at the global settings - web and mobile monitoring - custom user actions and download the documentation and samples for our JavaScript API if you want to use the JavaScript API.
Keep in mind that only finished user session (timeout is 30 minutes after the last user action) are visible in the UI. For testing, you can end a user session by entering the following line in the console of your browser: dtrum.endSession();
After this call it last about 2,3 minutes till you see your user session within the UI.

Hi Alex,

Thanks for answering, and emailing me. I have replied you through email, regarding my issue. Appreciate your reply.

Regards.

Hi Alexander,

can you please provide the exact code block that must be added to identify the user? Also an example/code block for the endSession() usage would be great

I suppose it should also include a check that the dtrum library is there, right?

We want to pass this information to the development team.

Thank you,

Dimitris


Just download the JavaScript API samples and API docs from your tenant. This includes examples of user tagging as well as endSession and many other API usage situations.

It's available from your tenant in Settings -> Web & mobile monitoring -> Custom user actions.

You should definitely check if the dtrum object is available, so no error is thrown in case monitoring is disabled or the dynatrace script failed to load for some reason.


Certified Dynatrace Master | Alanata a.s., Slovakia, Dynatrace Master Partner

Featured Posts