Update JS code for tracking.