Search code examples
http-redirectlaravelseobounce

Does Laravel redirect affect bounce rate?


I'm using this statement to redirect the landing page to another page.

Route::get('/', ['as' => 'home', function() {
  Redirect::to('/'.$lang.'/someotherpage');
}

Google Analytics states Bounce Rate as below:

Bounce Rate is the percentage of single-page visits (i.e. visits in which the person left your site from the entrance page without interacting with the page).

So will using the redirect on my landing page affect the bounce rate?


Solution

  • No it shouldn't affect the bounce rate. Redirect::to() generates a 302 redirect response and the browser reacts directly to it. Google Analytics is JavaScript based and will never run and therefore not see or track the redirect.

    This might be different for JavaScript redirects. Although I don't know that for sure.