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

UserID: Need a way to exclude the logon page from the page the userid comes from

dave_deleo
Inactive

We are finding we get a lot of anonymous tags because the value is being picked up from the logon page where the real name is not available. We would like to exclude this page so a true ID can be picked up rather than the anonymous value. Would someone know if this is possible. As 99% of the visits are coming in as anonymous.

 

6 REPLIES 6

pahofmann
DynaMight Guru
DynaMight Guru

If you are seeing a lot of anonymous visits, you probably have picked a spot for your User Tag that not all users of the application visit in every session.

You should take the User Tag from a place that a high percentage of users visits every session, or something that is always set after login, e.g. a Javascript vaiable.


Dynatrace Certified Master - Dynatrace Partner - 360Performance.net

thomas_wetzel
Visitor

David D is asking about my application. The User Tag appears in the header of every page of our site except the login page, because we obviously don't know the username yet.


dave_deleo
Inactive

Thanks Patrick for your insight! Appreciate it. What Thom is running into is that he has a User Tag in the header of every page except for the login page. And yet Dynatrace insists on picking up the Anonymous of that login page, rather than once logged in using the User Tag from an other page that would have the ID in it. So I was looking to understand why this was, and a creative way to solve it for example if there was a way to exclude the login page.

Thanks,

David


Okay I get your problem now. There is no way to exclude certain pages from user tagging.

If there is no other way to define the user tag, you would have to either create an RFE or open a support case.


Dynatrace Certified Master - Dynatrace Partner - 360Performance.net

brian_wilson
Dynatrace Advisor
Dynatrace Advisor

Optionally, you can go a cleaner route and use the dtrum function and pass the value in via JS. Here's an example of some JS code you can use with our DTRUM adk where it will only pass the username when the value is not the default. The DTRUM adk is already baked into the RUM agent, so you only need to add the function to your page. In the example below, the default value for user-accout.title is 'Login / Register'. What this does is evaluate the value, and if it does not contain the word Login, it passes the user name.


<script type="text/javascript" >
window.addEventListener("load", function(){
var username = $('.user-account').attr('title');
if (username.indexOf('Login')== -1){
username = username.replace('User: ','');
dtrum.identifyUser(username);
}
});
</script>

dave_deleo
Inactive

Thanks Patrick and Brian for your insight. This idea from Brian looks like it can have a lot of potential. I'll pass it to Thom if he hasn't seen it yet. Thanks again! really appreciate it!

David


Featured Posts