Move the analytics pageview tracking code to before the router is constructed