Adding multiple conditions

It is common for customers to want to know the count of real visitor sessions. While this event was filtered out the sessions that are reported as bots, some sessions may be so short as to not be interesting. In this example, we define the arbitrary limit of 5 hits in the session as the baseline for determining if the session is interesting and from a real visitor to the web application.

In the Basic mode definition, the All of the following conditions must be met value was selected from the drop-down. This selection defines a logical AND.

Note: Since the event is configured to fire on each hit, the new session attribute (Hit Count Running Total is compared to the fixed value 5. If the condition is defined to be greater than our equal to 5, then the event fires for all remaining hits of the session as soon as the fifth hit was detected.

And conditions in Advanced mode

The Advanced mode for the conditions now looks like the following:

if (!($S.IsBot) && $S.NumberOfHits == 5)

The && is a JavaScript operator for a logical AND. Both conditions must be true for the Value and Report steps to run.

Or conditions in Advanced mode

The Advanced mode for the condition now looks like this:

if (!($S.IsBot) || $S.NumberOfHits == 5)

The || is a JavaScript operator for a logical OR. Either condition must be true for the Value and Report steps to run.