refactored the turbolinks workaround for google analytics.