Javascript client side activity tracker