Web events and sessions
Web events and sessions are used in Loymax Smart Communications to process customer actions on an online store website or in a mobile application.
Contents:
Web events
A web event is an action performed by a customer on a website or in a mobile application. In Loymax Smart Communications, web events are objects stored in the database that can be used for building segments, as well as in campaigns and mass messaging.
Web events are linked to an event source (for example, one of several websites or a mobile application).
Along with information about the web event, its context can be saved—data from the object associated with the event. For example, along with the Product added to container event, the Product object is saved, i.e., the values of all fields of the product added to the container.
Methods for receiving web event information
Loymax Smart Communications can receive information about web events in three ways, described below. Regardless of the transmission method, Loymax Smart Communications creates an object with the same set of attributes (fields) and available actions.
JS tracker
The JS tracker includes a set of preconfigured web events (such as website authorization or product viewing) and also allows configuring custom user events (for example, a customer giving a product a low rating).
Mobile SDK
The event method of the Mobile SDK allows transmitting arbitrary web events related to customer activity in a mobile application to Loymax Smart Communications. The set of supported events is configured during integration.
REST API
The Partner's master system can transmit information about web events to Loymax Smart Communications via REST API calls (using Web_event methods).
Sessions
A session is a sequence of customer actions on a website or in a mobile application (i.e., a sequence of web events). The session identifier is a mandatory attribute of a web event and allows linking it to a customer.
If the customer identifier field is not filled in any event within a session (for example, a customer browses products on the website without logging in), the session will be anonymous. Anonymous sessions are stored in the Loymax Smart Communications database for 60 days.
An anonymous session can be linked to a customer (de-anonymized) in two ways:
- An authorization or registration event for the customer occurred within the session.
- A web event within the session served as a campaign trigger, and the customer clicked a link in a message sent as part of that campaign.
The logic for handling sessions differs depending on the method used to transmit web events to Loymax Smart Communications.
Working with sessions via JS tracker
When a new session starts, the JS tracker creates and sends a cookie file to the customer. Subsequent customer actions are linked to the session via this cookie. The cookie lifetime is 1 hour, with automatic renewal after each new action.
If the cookie expires and the customer performs a new action, the JS tracker creates a new cookie file and starts a new session.
Session de-anonymization occurs automatically if the website is configured to process the authorization and registration event (user_login) via the JS tracker.
Working with sessions via Mobile SDK and REST API
When working via the Mobile SDK and/or REST API, the logic for grouping events into sessions must be implemented on the Partner's side.
The session identifier field (session_id) is mandatory for the event method of the Mobile SDK and for the Web_event method of the REST API. Based on the received session_id value, Loymax Smart Communications either creates a new session or links the web event to an existing session.
Session de-anonymization occurs as soon as a web event with a filled customer identifier field is transmitted to Loymax Smart Communications.