Loymax, 2026

Wiki source code of Web events and sessions


Show last authors
1 (% class="lead" %)
2 Web events and sessions are used in Loymax Smart Communications to process customer actions on an online store website or in a mobile application.
3
4 (% class="box" %)
5 (((
6 **Contents:**
7
8 {{toc depth="3" start="2"/}}
9 )))
10
11 == **Web events** ==
12
13 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.
14
15 Web events are linked to an [[event source>>doc:Main.Smart_Communications.SMC_Use.Settings_SC.Event_sources.WebHome]] (for example, one of several websites or a mobile application).
16
17 Along with information about the web event, its [[context>>doc:Main.Smart_Communications.SMC_Use.Events.WebHome||anchor="H41A43E43D44243543A44144244143E43144B442438439"]] 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>>doc:Main.Smart_Communications.SMC_Use.Settings_SC.Data_field.WebHome]] of the product added to the container.
18
19 {{info}}
20 The object stored in the web event context is static—its attributes retain the values they had at the time of the event. For example, if you display a product price from the web event context in a message text, the customer will see the price at the time of the event, not at the time the message is sent.
21
22 This logic underpins the operation of certain triggers, such as [[Price changed for viewed product>>doc:Main.Smart_Communications.SMC_Use.Campaigns.Triggers.WebHome||anchor="H41843743C43543D43843B43044144C44643543D43043D43043F44043E44143C43E44244043543D43D44B43944243E432430440"]].
23 {{/info}}
24
25 === **Methods for receiving web event information** ===
26
27 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>>doc:Main.Smart_Communications.SMC_Use.Settings_SC.Data_field.WebHome]]) and available actions.
28
29 ==== **JS tracker** ====
30
31 The [[JS tracker>>doc:Main.Integration.Integration_of_SC.JS_tracker.WebHome]] 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).
32
33 ==== **Mobile SDK** ====
34
35 The event method of the [[Mobile SDK>>doc:Main.Integration.Integration_of_SC.MobileSDK.WebHome]] 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.
36
37 ==== **REST API** ====
38
39 The Partner's master system can transmit information about web events to Loymax Smart Communications via [[REST API>>doc:Main.Integration.Integration_of_SC.Data_communiction.SmC_API.WebHome]] calls (using [[Web_event>>doc:Main.Integration.Integration_of_SC.Data_communiction.SmC_API.SmC_API_methods.Web_event.WebHome]] methods).
40
41 == **Sessions** ==
42
43 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.
44
45 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.
46
47 An anonymous session can be linked to a customer (de-anonymized) in two ways:
48
49 * An [[authorization or registration>>doc:Main.Integration.Integration_of_SC.JS_tracker.WebHome||anchor="H41043244243E44043843743044643844F43844043543343844144244043044643844F"]] event for the customer occurred within the session.
50 * 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.
51
52 The logic for handling sessions differs depending on the method used to transmit web events to Loymax Smart Communications.
53
54 === Working with sessions via JS tracker ===
55
56 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.
57
58 If the cookie expires and the customer performs a new action, the JS tracker creates a new cookie file and starts a new session.
59
60 Session de-anonymization occurs automatically if the website is configured to process the [[authorization and registration>>doc:Main.Integration.Integration_of_SC.JS_tracker.WebHome||anchor="H41043244243E44043843743044643844F43844043543343844144244043044643844F"]] event (##user_login##) via the JS tracker.
61
62 === Working with sessions via Mobile SDK and REST API ===
63
64 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.
65
66 The session identifier field (##session_id##) is mandatory for the [[event>>doc:Main.Integration.Integration_of_SC.MobileSDK.WebHome||anchor="event"]] method of the Mobile SDK and for the [[Web_event>>doc:Main.Integration.Integration_of_SC.Data_communiction.SmC_API.SmC_API_methods.Web_event.WebHome]] 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.
67
68 Session de-anonymization occurs as soon as a web event with a filled customer identifier field is transmitted to Loymax Smart Communications.
69
70 {{info}}
71 It is recommended to adhere to the following principles when forming sessions:
72
73 * ensure uniqueness of session identifiers;
74 * start a new session if more than 1–2 hours have passed since the customer's last action.
75 {{/info}}
76
77 (% class="box" %)
78 (((
79 **See also:**
80
81 * [[E-commerce>>doc:Main.Smart_Communications.SMC_Use.E-Commerce.WebHome]]
82 * [[Integration with e-commerce systems>>doc:Main.Integration.Integration_of_SC.Ecom_integration.WebHome]]
83 * [[JS tracker>>doc:Main.Integration.Integration_of_SC.JS_tracker.WebHome]]
84 * [[Mobile SDK>>doc:Main.Integration.Integration_of_SC.MobileSDK.WebHome]]
85 )))