fix nav tracking, refactor js logic #746

fixes nav tracking in #746