The analysis starts by evaluating events that can start sequences and end the session, that is, sequence events with an entry state of Not Started and the Stop Session Event special event. For each match, the Archiver runs the actions defined (if any) for the event. Typically, for a sequence event, this means starting a sequence, but it can also set the sequence status, set custom fields, and run scripts. If this hit matches an event that ends the session, the
Stop Session flag is set as well as
Stop Sequence flags for all active sequences within the session.
When the Stop Sequence flag is set for one or more sequences, the Archiver iterates through the list. For each stopped sequence, it sets the sequence analyzer status, sets storage policies and updates metrics based on the sequence analyzer status, and writes the sequence data to the database.
When the Stop Session flag is set, the Archiver evaluates session analyzers. It sets a final analyzer status for each analyzer and runs the actions associated with that status. When the session analyzers are resolved, the Archiver determines the final session status and runs the actions associated with that status. After the session is resolved, the Archiver writes session details and any updated session data to the database.