Move js code to send ping request to ECMS