node-analytics.js
function socketResponse(socket){

        // session updates from the client

        // Trivial not-bot check: socket connects;
        //   Could / should be improved to having done action on page

        if(socket.session.is_bot)
            Update.session(socket.session, { $set: { is_bot: false }});

        if(!socket.session.resolution)
            socket.on('resolution', _socket.resolution.bind(socket));

        // request updates
        socket.on('click', _socket.click.bind(socket));
        socket.on('reach', _socket.reach.bind(socket));
        socket.on('pause', _socket.pause.bind(socket));

        // session timer
        socket.on('blur', _socket.blur.bind(socket));
        socket.on('focus', _socket.focus.bind(socket));

        // Disconnection
        socket.on('disconnect', _socket.disconnect.bind(socket));
    }
function socketResponse(socket){

        // session updates from the client

        // Trivial not-bot check: socket connects;
        //   Could / should be improved to having done action on page

        if(socket.session.is_bot)
            Update.session(socket.session, { $set: { is_bot: false }});

        if(!socket.session.resolution)
            socket.on('resolution', _socket.resolution.bind(socket));

        // request updates
        socket.on('click', _socket.click.bind(socket));
        socket.on('reach', _socket.reach.bind(socket));
        socket.on('pause', _socket.pause.bind(socket));

        // session timer
        socket.on('blur', _socket.blur.bind(socket));
        socket.on('focus', _socket.focus.bind(socket));

        // Disconnection
        socket.on('disconnect', _socket.disconnect.bind(socket));
    }
function socketResponse ( socket ) { // session updates from the client // Trivial not-bot check: socket connects; //   Could / should be improved to having done action on page if ( socket . session . is_bot ) Update . session ( socket . session , { $set : { is_bot : false } } ) ; if ( ! socket . session . resolution ) socket . on ( 'resolution' , _socket . resolution . bind ( socket ) ) ; // request updates socket . on ( 'click' , _socket . click . bind ( socket ) ) ; socket . on ( 'reach' , _socket . reach . bind ( socket ) ) ; socket . on ( 'pause' , _socket . pause . bind ( socket ) ) ; // session timer socket . on ( 'blur' , _socket . blur . bind ( socket ) ) ; socket . on ( 'focus' , _socket . focus . bind ( socket ) ) ; // Disconnection socket . on ( 'disconnect' , _socket . disconnect . bind ( socket ) ) ; }
=============
=============