Click event count on page using jquery
$ ( document ). click ( function ( e ) { if ( e . currentTarget . activeElement . attributes [ 0 ]) { var idClicked = e . currentTarget . activeElement . attributes [ 0 ]. value ; } if ( e . currentTarget . activeElement . attributes [ 1 ]) { var idClicked1 = e . currentTarget . activeElement . attributes [ 1 ]. value ; } if ( idClicked == 'loginbutton' || idClicked1 == 'loginModal' || idClicked1 == 'close' ) { } else { var auth_token = $ . session . get ( "auth_token" ); var user_id = $ . session . get ( "user_id" ); var pathname = window . location . pathname ; var patharray = pathname . split ( "/" ); var pageurl = patharray [ patharray . length - 1 ]; if (!( auth_token && user_id ) && pageurl != "re