Google Analytics with redirect meta http-equiv = "REFRESH"

Can I use Google Analytics on pages that use the redirect method <meta http-equiv="REFRESH" content="0;url={url}">

?

My guess is that the redirect on this type of page will happen before js has the ability to run, and therefore analytics won't work on it.

+3


source to share


1 answer


Yes, if you want to track these pages, you need to first turn off Google Analytics tracking, redirect.

I would recommend:



  • using traditional ga.js syntax in async syntax
  • Wait approximately 150ms after the tracking has been triggered before redirecting (using setTimeout () in Javascript instead of meta tag)

Use the Google Chrome Google Analytics Debugger Extension to check how it's done

+2


source







All Articles