Recording conditions
Using newPageView
method you can specify your own conditions as a trigger for a recording like:
1 import ls from "@livesession/browser";2 3 ls.newPageView({4 conditions: [5 {6 type: "event",7 name: "MouseClick",8 operator: "contain",9 key: "path",10 value: ".add-cart",11 },12 ],13 });
above condition will be fulfilled when user click on element where path to DOM element contain .add-cart
value.