JS API for trackTiming and setCustomDimension