Move analytics to after history state modification.