question

Sten S. avatar image
Sten S. asked ·

Dynatrace User Tagging with CSS Selector

Hi,

I want to tag users based on information in the web page. I don't want to extract the username, but the type of user (which is also marked). However, doing it this way, the rule also extracts the value when a user is not logged in. The CSS Selector I use:

#login-account > ul > li:nth-child(2)

Due to this being the case, visits are double tagged. First as 'not logged in, please register' and after the login as 'usertypeX'. I also see actions that only logged in users can perform in a visit that's marked as 'not logged in, please register'. So that's why I want to change the CSS Selector to something hardcoded as:
- usertype1
- usertype2

The Regex clean up rule does not do the trick for me here. Is there anything else I can use?
I have seen that the page contains the value I want to extract under CSS Selector: #text (within the aforementioned list of #login-account). But when using this one, I can't get the tagging to work properly.

Can someone help me with this?

Kind regards,

Sten

uemtags and metadatauser tagging
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

1 Answer

Sebastian K. avatar image
Sebastian K. answered ·

This is issue with this feature that there is no option for marking some value as the one that should not be considered. Only what you can check is if there are any changes in css path more border selector you are using between sign in and not signed in states. If not, you may have to ask to add extra class for signed in user. Best option may be some exlude rule on user tag definition, we have such issues as well.

Sebastian

2 comments Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Hi Sebastian,

Thanks for your answer! It's unfortunate, but it heals the pain knowing I'm not the only one ;)
Then I just have to wait until this feature is enhanced and in the meantime I'll try to see if there are any differences in the CSS-path. Thanks for the tip!

Regards,

Sten

0 Likes 0 · ·

We have the same issues for cookies or javascript variables in this context. They are sometimes present with default values evenr for not signed in users. In such cases, we have single group of visits for example with tag 0 (all not signed in users) and some part of them with proper tag after sign in. In such cases, sometimes we needed to ask client for some changes on theri frontends for us which is not very good actually.

You can as well extract user tag from request attributes (server side arguments) but because of Adaptive Load Control on server side, you may have missing purepaths on user actions, so in general no information about this argument as well.

Sebastian

1 Like 1 · ·