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

This product reached the end of support date on March 31, 2021.

Configurating visit tag for a user before login


I have a web application that allows anonymous user access as well as a login. The problem I'm running into is when a user first visits the site (no cookies saving the login) then the method I'm using to capture the user returns "anonymous". When they login, that value is then the proper username. The visit gets tagged as "anonymous" instead of the username. I can't modify the measure to filter out "anonymous" because that is what users who use the site that don't login with have. I'm not sure how to configure the visit tag to allow anonymous users as well as picking up the username after they log in. Does anyone know how to do this? I'm using Dynatrace 6.5 with an ASP.NET web application, if that makes a difference.



Dynatrace Leader
Dynatrace Leader

Greg, Can you clarify whether you're using the same mechanism to capture the 'Anonymous' string as well as to capture the real username string "Jones"? Or are these being captured differently?

Have you explored the usage of multiple Visit tags and specifying the real username tag as Primary? This assumes "anonymous" can be capture some other way differently than the real username.

But keep in mind the following as specified in the doc:

The tag is set only once per visit, so once a valid tag value is determined, it does not change with the re-occurrence of the measure.

Doc page:

The method for an anonymous user and a logged in user is the same. I don't know of a way to capture an anonymous vs logged in user using different methods. Before the login happens, we don't know if the user is going to log in or not.

Dynatrace Leader
Dynatrace Leader

I don't know if this would work, but here's an idea.

Capture the "anonymous" user at a stage in the process where they will be anonymous (before login or first page, etc). Then capture the username (non-anonymous) from the login page itself, but store it in a different measure. Then set both of these measures as Visit Tags, but set the Login page version as the Primary.



If the same method get invoked for both "anonymous" and "logged" User.Assuming that method is known to us and instrumented that method already.We can follow below steps.

1) Find that method in purepath, right click create measure -> select Web request- Return value(assuming username be the return value)/methods - return value -> give measure name as "anonymous user" -> give condition equals the return value "anonymous"

2) Find that method in purepath, right click create measure -> select Web request- Return value(assuming username be the return value)methods - return value-> give measure name as "Real user" ->give condition not equals the return value "anonymous"

@1 captures only anonymous user

@2 captures only real users.

Now based on your requirement you can configure @1 which gives the anonymous user without login


Soorya Mohan