Search code examples
drupaldrupal-6google-analytics

Which redirect status should be used to preserve Google Analytics page views data?


I would like to set up a redirect so that when user requests: http://www.fareham.ac.uk/chequers they are redirected to the long URL: http://www.fareham.ac.uk/the-college/campus-facilities/chequers-restaurant

I've installed the Path redirect module, which offers the following redirect status options:

  • 300 Multiple Choices
  • 301 Moved Permanently
  • 302 Found
  • 303 See Other
  • 304 Not Modified
  • 305 Use Proxy
  • 307 Temporary Redirect

Which option should I use to achieve desired effect AND ensure that GA page views data is based on long URL not short URL.

I want to provide visitors with a short URL for convenience, but I don't want to mess up the page views statistics.


Solution

  • You should use 301 redirects for this sort of use case.