Recording counts from last hit

Now record the number of hits in the session. For this event, we change the conditions to be the following:

  • Change the drop-down to perform a logical AND (All conditions must be met). Essentially fire only on the last hit and it is not a Bot and if the hit count is greater than 5.
  • The Last Hit trigger ensures that this event fires once only.
  • Since this event is now configured to fire only on the last hit of the session, the condition to test hit count must be changed to greater than or equal to 5 hits, instead of equals 5 hits. Else, it fires only when the Hit Count Running Total is five hits exactly.

For the value, write the hit number for the last hit as a numeric value for the event.

For simplicity's sake, remove the report group that was added second, just leaving the default fact. The Advanced mode for this event looks like this:

This event writes the current value of the hit attribute Hit Number in Session whose internal name is $H.HitNumber. You could use other values, such as the session attribute Hit Count Running Total. However, the hit attribute was chosen to show other objects that are used as values.