How session attributes are populated

Session attributes are populated by the output values of events. Whenever the populating event is triggered in the session, the event value can be written to a specified session attribute.

  • A user-created session attribute may be populated by the output of multiple events.
  • Session attribute assignments are managed through the More Options step of the event definition. When the event is triggered, the detected value for the event can populate any of the defined session attributes. See Manage Events - Events tab.

That variable and its value are added to the session object, which means it becomes part of the session data. As soon as the variable is created, it is part of the session, regardless of whether the session is active or completed.

When the session attribute gets populated is determined by the trigger for the populating event. Events can be triggered in the following points of a session:

  • First Hit of Session - when the session begins
  • Every Hit - when the hit loads
  • After Every Hit - when the hit is unloaded
  • Last Hit - the last hit of the session
  • End of Session - when the session closes

For example, suppose Event A is triggered on the First Hit of the Session and populates Session Attribute A. When the first hit occurs in an active session, the session attribute and its current value are added to the session object.

  • Session attributes are updated at the end of each trigger. They are available at the beginning of the next trigger. For example, if a session attribute is defined to trigger on After Every Hit, then it is set at the conclusion of evaluation of each hit, and the new value is available for the next hit, until the value is set again.
  • In EventEngineScripting, session variables are accessed as a property of the session object ($S). See EES reference - attribute reference.

When a search template is configured to include a session attribute as a field, users can search for the existence of the session attribute in all active sessions. The value of the variable may subsequently change.

  • Other events that are triggered later in the session can overwrite the value in the session attribute. For example, suppose Event B is triggered on Hit 12 as an After Every Hit and changes the value of Session Attribute A. This variable value is now present in the session object. The original value is no longer available, and searches for it do not return the affected session.
  • End of Session events can be configured to write the final value of the session attribute. This final value is carried forward when the session is moved from the Short Term Canister (active sessions) to the Long Term Canister, where completed sessions are indexed and stored.
  • For completed session searches, session attributes are stored in the [CanisterSummary] section of the request, where they are automatically indexed. See "Configuring the Indexing" in the Unica Discover Configuration Manual.

Session attributes populated by system

In the Session Attributes tab, some of the listed attributes are identified as Populated by System. These attributes are defined within the Discover Canister and cannot be edited or viewed through the Portal interface. These attributes are provided by Discover and do not count against the 64 session attributes available for your use.