To measure the distance between the beginning or end of a session and an event, you must add an event condition that is always triggered on the first or last hit of the session.
To create a distance event from start to a specific event or from a specific event to the end of session:
- If you do not have a beginning of session/end of session event, create the event that marks the beginning of the session.
- Set the trigger for the event to be
First Hit of Session
orEnd of Session
. - Set the condition for the event to be an attribute that is always present. For example, you can use the system attribute
Session GUID
, which is assigned a value on the first hit of every valid session by the Canister. - Save the event draft.
- Run it through the Event Tester.
- Commit the changes.
- Set the trigger for the event to be
- Create the distance event.
- Specify whether you are measuring distance as time or pages.
- If you are measuring the distance from the start of session, add your Start of Session event first. If you are measuring the distance between your event and the end of session, add your event first.
- Add the other event:
- Distance from start of session: your event
- Distance from event to end of session: End of Session event.
- Specify the other properties of the distance event as needed.
- Save the event draft.
- Run it through the Event Tester.
- Commit the changes.
Defining conditions
- If the lower bound of the distance is set to
0
, then the events can occur on the same hit. - You must specify exactly two event conditions to complete a valid evaluation for a distance event.
- In the Condition step, select one of the following options:
Distance between events is between the following number of seconds
The distance between the listed events is measured to be between the specified range of seconds.
Distance between events is between the following number of hits
The distance between the listed events is measured to be between the specified range of hits.
- When either selection is made, you must then populate the range within which the triggered events must occur. The range is inclusive, meaning that the end values are included in determining whether the distance between events is between the acceptable range.
- For time events: Enter a number (in seconds) in each textbox between 0.001 and 10000. For example, values of
0.25
and2
means the time between the events must be greater than or equal to 0.25 seconds but less than or equal to 2 seconds to trigger the event. - For hit events: Enter positive integers in each textbox 1 - 2048. For example, values of
3
and8
mean the number of hits between the events must be either 3, 4, 5, 6, 7, or 8 hits to trigger the event.
- For time events: Enter a number (in seconds) in each textbox between 0.001 and 10000. For example, values of
Defining the value
- From the Value Type drop-down in the Event Summary, select
Distance
. - In the Value step, you must specify the distance value to record. From the second drop-down, select the distance instance to record.
- For distance events defined in a trigger other than
End of Session
, you can select onlyLast
. - For distance events defined in the
End of Session
trigger, you can select one of the following.
Distance Instance Description First
First recorded instance in the session where the distance between the two events falls inside the specified range ( a =< distance =< b
).Last
Last recorded instance in the session where the distance between the two events falls inside the specified range ( a =< distance =< b
).Min
Minimum distance between two events in the session that falls inside the specified range ( a =< distance =< b
).Max
Maximum distance between two events in the session that falls inside the specified range ( a =< distance =< b
).This recorded value is then applied to the tracked event occurrences, as specified in the drop-down.
- For distance events defined in a trigger other than
- The recorded value is treated as
Numeric
when the event value type Distance is selected.