Getting started
JavaScript API
REST API (BETA)
Webhooks (BETA)
Recording start conditions
Using newPageView
method you can specify your own conditions as a trigger for a recording.
Example condition
{type: "event", name: "MouseClick", operator: "contain", key:"path", value: ".add-cart"}
This condition will be fulfilled when user click on element where "path" contain ".add-cart" value.
Example use
__ls("newPageView", {conditions: [{type: "event", name: "MouseClick", operator: "contain", key:"path", value: ".add-cart"},]});
Types
Name | Description |
---|---|
event | Use to specify condition based on user interaction (event). |
Operator types
Name | Description | Condition |
---|---|---|
start | starts from | base.indexOf(value) == 0 |
contain | contain | base.indexOf(value) > -1 |
end | ends with | base.indexOf(value) == base.length - value.length |
eq | equal to | base == value |
neq | not equal to | base !== value |
gt | greater than | base > value |
gte | greater than or equal | base >= value |
lt | lower than | base < value |
lte | lower than or equal | base <= value |
Operators' condtions are case sensitive.
Event
Types
Name | Description |
---|---|
MouseClick | mouse click |
RageClick | rage click |
ErrorClick | error click |
Scroll | scoll inside any element |
WindowScroll | scoll main window |
MouseMove | mouse move |
TouchMove | mobile touch move |
Keys
Name | Description | Example |
---|---|---|
path | Full DOM path to element | body > #header > .link.add-cart[href="/cart"] |
el | Element identificator | .link.add-cart[href="/cart"] |
txt | Text content of element | Add to cart |
Default conditions
If conditions are not specified, by default newPageView
use conditions below for starting new pageView
:
[{ type: "event", name: ["MouseMove", "TouchMove", "Scroll", "WindowScroll"] }]
Recording starts when one of events (MouseMove, TouchMove, Scroll, WindowScroll) occurs.