Fixed bug where callback function was not being called in javascript tracker