Self Referrals can cause data integrity issues in Google Analytics.
When you get self referral data in your reports, it means the referrers (i.e. sources) that shows up in your Google Analytics reports have been inaccurately assigned.
Self referrals can usually be caused by one of the scenarios.
Consider the case below.
To resolve this issue, you have set up URL direction from Page-A to Page-B. When your users visit Page-A, they will automatically be taken to Page-B. You can set up this redirect with a few methods.
|Server-side 301||Okay. http referrer header is preserved.|
|Server-side 302||Okay. http referrer header is preserved.|
|Client-side Redirect||Problem. http referrer header is not preserved.|
You can always use the Chrome browser’s built-in Developer Tool to verify if a redirect has been set up on the server-side as a 301 (or 302) redirect.
This line confirms it is a server-side redirect.
Status Code 301 Moved Permanently (from cache)
If you do not see the status code being reported as 301 or 302, then it is a client-side redirect.
On Page-A, you have this code in the section that performs a client-side redirect in the web browser.
<head> <title>Page-A</title> <meta http-equiv="refresh" content="0;URL='http://m.example.com/Page-B'" /> </head>
In practical when taking your users automatically from an old page to a new page, you should always only use server-side 301 (or 302) redirect. Server-side 301 (or 302) redirect preserves the referrer information which is good practice for web analytics.
Consider this scenario in which you have two pages on your website.
A user lands on Page-A. While on page-A, this user clicks a link that takes him / her to Page-B.
This source referrer information recorded by Google Analytics is incorrect.
For good practice, you should always ensure installing your Google Analytics tracking code on all your web pages.
Content on Gordon Choi’s Analytics Book is licensed under the CC Attribution-Noncommercial 4.0 International license.