Example: Browsing Without Redirects

Consider the following hypothetical scenario in which the user does not encounter a redirect:

  1. User points his or her browser to www.google.com, and types, “discount airline tickets” into the search field, and then clicks the Search button.
  2. The browser displays the search results including a link to your site, https://www.example.com/. After displaying the search results, the browser’s address bar displays the search terms that the user entered in the search field ( https://www.google.com/search?hl=en&ie=UTF-8&q=discount+airline+tickets). Notice that the search terms are included in the URL query string parameters that follow https://www.google.com/search?.
  3. The user clicks the link to your hypothetical site https://www.example.com/. When the user clicks this link and lands on the example.com website, Analytics uses JavaScript to collect the referring URL ( https://www.google.com/search?hl=en&ie=UTF-8&q=discount+airline+tickets) as well as the current URL ( https://www.example.com/).
  4. Analytics reports the information collected during this interaction in various reports, such as Referring Domains, Search Engines, and Search Keywords.

Example: Browsing With Redirects

Redirects can cause the browser to blank out the true referring URL. Consider the following scenario:

  1. User points his or her browser to https://www.google.com, and types, discount airline tickets into the search field, and then clicks the Search button.
  2. The browser window’s address bar displays the search terms that the user typed into the search field https://www.google.com/search?hl=en&ie=UTF-8&q=discount+airline+tickets. Notice that the search terms are included in the URL query string parameters that follow https://www.google.com/search?. The browser also displays a page that contains the search results including a link to one of your domain names: https://www.flytohawaiiforfree.com/. This vanity domain is configured to redirect the user to https://www.example.com/.
  3. The user clicks on the link https://www.flytohawaiiforfree.com/ and is redirected by the server to your main site, https://www.example.com. When the redirection occurs, the data that is important to Analytics data collection is lost because the browser clears the referring URL. Thus, the original search information used in the Analytics reports (for example, Referring Domains, Search Engines, Search Keywords) is lost.