JS Tracker (Customer Journey Tracking)
The JS tracker monitors user actions on a website and sends the collected data to the Operavix system for further analysis.
Installing the Tracker
To install the tracker:
- Create a script with the New events trigger block.
- If needed, specify the web application name in the block parameters so it appears in the embeddable code.
- Copy the snippet and insert it into the page code. When the website loads, the snippet will start loading the tracker script according to the snippet’s parameters.
Tracker parameters are configured within the snippet:
app— web application name (domain is used by default)serverUrl— analytics collection server addressuuid— tracker data identifierbufferLifetime— time interval in milliseconds between sending accumulated eventsbufferLimit— maximum number of events that can be stored in the bufferbufferMaxSize— maximum memory size in bytes; when reached, the buffer is clearederrorSendTimeout— interval between retry attempts to send events to the server if the previous attempt failedfilterFn— predicate for excluding unnecessary eventsinterceptors— custom configurations for automatic collection of custom events
Tracker Operation
The tracker stores events in a buffer and sends them to the server when one of the following conditions is met:
- Time expires (parameter
bufferLifetime, default:Infinity) - Event limit is reached (parameter
bufferLimit, default:1)
After sending events, the buffer is cleared and the timer restarts. If the buffer reaches its maximum size (parameter bufferMaxSize, default: 1 MB), it is also cleared, and the data stored in it is lost.
If events occur before the tracker finishes loading, the snippet intercepts them and temporarily stores them for later transfer to the tracker. In case of a transmission failure, the tracker initiates retry attempts either on every new event or at predefined time intervals. The server accepts requests, accumulates them, and triggers an automation script for subsequent processing of the collected information.
The New events block returns data about events, users, web pages, advertising tags (UTM), screen, and browser settings. Location data and general request information are not collected on the website side.
To process events collected by the New events tracker, add additional automation blocks to the script—for example, to automatically load data into a table.
For detailed information about tracker operation, see the JS Tracker section. For a detailed description of blocks for working with the collected data, refer to the Editing a Script section.
Was the article helpful?