Improving tracking of the current URL