Hello, people!
Tell me how you can store user actions on the site in the database (clicks, movement with a mouse, wheel and time of these actions and / or time between these events)

I have a website, and I want every (5-10 minutes, session time) Ajax to send everything the user has done on the site, how to prepare, in what form to send to the server and how to store?

THANK!

p / s: Google analytics or web viewers do not offer

  • one
    Clicks still didn’t go anywhere, but> moving the mouse, using the wheel IMHO is a bullshit ... - Palmervan

2 answers 2

Create an array

var myEvents=[]; 

to hang up on document handlers of the "necessary" events through addEventListener || attachEvent

 function(e){myEvents.push(e);} 

and then send JSON.stringify (myEvents) to the server

    Yuzay WebVizor from Yandex!

    less hemorrhoids, more relaxation you will get.

    Do not suffer from garbage TC.

    • For such webVizor you can rate the site on some mywot.com. drop. Say - spy site .. and then his position in the issue will fall. - Drakonoved