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

AppMon Useful CSS Selector patterns

Dynatrace Advisor
Dynatrace Advisor

This page is meant to share CSS Selector patterns and measure regex examples for use in AppMon 6.3.

If you're not already familiar with this feature, AppMon 6.3+ provides the means to capture additional data from the browser via the UEM JavaScript agent. This is especially helpful in CORS deployments, or in cases where the desired data is not passed in a request parameter/header, etc.

This first example is way to capture username from the Demandware SiteGenesis store. Because Demandware implmentations are currently CORS UEM only, we cannot capture Username in the traditional means via AppMon. The Use of CSS Selector allows us to capture this information.

Here is the code snippet from the page

<a class="user-account" href="" title="User: Brian Wilson”> 

IN this case, I set the CSS Selector Capture Expression to


this returns "User: Brian Wilson"

To use this in user tagging for UEM, I now need to create a Page Actions - Metadata measure from this. I'll want to use a transform regex to remove "User: ". Also, note, in this case, the username, when a user is not logged in, is set to "User: Login / Register". Because of this, we'll have to construct a regex to ignore patterns matching "Login / Register" or all visits will be tagged with this value.

The transform regex to accomplish both of these goals is:

User: (?!Login \/  Register$)(.*)

Please share your useful CSS Selector examples.


Dynatrace Advisor
Dynatrace Advisor

Java script
variable in the web page.


var OTvar = eval( "({\"currentUser\":{\"birthday\":null,\"email\":\"\",\"firstName\":\"Gordie\",\"ID\":132285662,\"lastName\":\"Howe\",\"login\":\"domain\\\\devapps-howe1\"},\"customView\":{\"searchMessage\":\"Loading
search form...\"},\"appname\":{\"cgiPath\":\"\\/fe\\/llisapi.dll\",\"name\":\"Content
Server (servername)\",\"supportPath\":\"\\/img\\/\"},\"node\":{\"childCount\":19,\"createDate\":\"2016-02-22
20:45:37\",\"name\":\"Enterprise\",\"parentID\":-1,\"type\":141}})" );


Below is the java script variable meta tag syntax that was used.