Show Menu
TOPICS×

Sessionize

If you are working with data collected from website traffic, you can use the Sessionize transformation to determine how sessions are defined.
The transformation takes as its input a timestamp and a tracking ID and outputs a session number for each log entry. The session number is "1" for the first session with a given tracking ID, "2" for the second session with the same tracking ID, and so on. The output can be used directly as a session key because it has a unique value for each session.
To work, the Sessionize transformation requires that the data is ordered in time and grouped by the tracking ID in your source data. Therefore, Sessionize works only when defined in the Transformation.cfg file or in a Transformation Dataset Include file.
Parameter Description Default
Name Descriptive name of the transformation. You can enter any name here.
Comments Optional. Notes about the transformation.
Condition The conditions under which this transformation is applied.
Input Timestamp The field containing the values of the timestamp to be used. x-timestamp
Input Tracking ID
The field containing the values of the tracking ID to be used. The value must be a 64-bit (16 digit) or smaller hexadecimal number or a decimal integers of 16 digits or less.
Note: If you wish to use a field other than x-trackingid for the tracking ID, you need to hash the field first. See Hash .
x-trackingid
Maximum Session Duration
The longest length of session before a new session is started. (This keeps web pages that have auto content refreshing from creating sessions that are arbitrarily long.) If the Timeout Condition is satisfied and the referrer of a click is set to one of the entries in the Internal Domains parameter, Maximum Session Duration is used to define the end of a session. No session may be longer than the specified Maximum Session Duration regardless of how many clicks it contains. The recommended value is 48 hours. For more information about the Maximum Session Duration and Internal Domains parameters, see Configuration Settings for Web Data . 48 hours
Output Session Number The field in which the session number is stored. This field has a unique value for each session for each visitor.
Session Timeout
The amount of time that needs to pass between log entries of a given visitor to determine the end of one session and the start of a new session (that is, the typical timeout used to define a user session). The recommended value of this parameter is 30 minutes. If the Timeout Condition is not satisfied and the referrer of a click is not set to one of the referrers in the Internal Domains parameter, Session Timeout is used to define the session.
If the Timeout Condition is satisfied and cs(referrer-domain) for a log entry is in the list of internal domains, then Maximum Session Duration determines whether the current log entry is part of an existing session or the start of a new session.
For more information about the Session Timeout parameter, see Configuration Settings for Web Data .
30 minutes
Timeout Condition The condition that must be satisfied for a log entry to be considered the start of a new session. Note that the amount of time that passes between the log entry and the previous log entry must be at least the value of the Session Timeout parameter.
A new session begins when any one of the following situations occurs:
  • The tracking ID changes.
  • The time since the last log entry is at least equal to the value of the Session Timeout parameter and the Timeout Condition is satisfied.
  • The time since the first log entry of the last session exceeds the value of the Maximum Session Duration parameter.
If you have already defined Maximum Session Duration and Session Timeout as parameters in the Session Parameters.cfg file, do not enter values for them in the configuration. You can reference the parameters by typing $(parameter name) as shown in the following example. For more information about these parameters, see Configuration Settings for Web Data .
The Sessionize transformation in this example takes as its input the x-timestamp and x-trackingid fields and records the session number for each log entry in the x-session-key field. The transformation's Timeout Condition is based on a Neither condition: If the cs(referrer-domain) field for a log entry matches a member of the Internal Domains parameter, the condition evaluates to false. Note the references to the Internal Domains and Session Timeout parameters.
For information about the NeitherCondition, see Conditions . For information about the Internal Domains and Session Timeout parameters, see Configuration Settings for Web Data .