A javascript to record client side activities and report to server