Move analytics pageview increment function to be defined globally.