added triggering of tracking in javascript