local host
“localhost” refers to the local device making a request. LocalHost is used as a kind of staging area for displaying pages and running scripts on your own computer without having to worry of live website.
If a developer or team of developer are using localhost to test and develop website pages then you will get traffic from localhost in your google analytics. It is because those pages too contain the Google analytics script on them. This kind of traffic you can be seen your referral sources. It will affect your not only the traffic but other metrics too like bounce rate, time on site and many other metrics.
This you can exclude the traffic by filtering this type of traffic in Google analytics.
Filter traffic that is coming through localhost or other locally hosted sites, some of the traffic sources listed below
- localhost:3000
- localhost
- localhost/education/
Step by step process to exclude localhost traffic from Google Analytics
- Google Analytics Admin > Filters
- New filter, Name it "Exclude Localhost" or whatever you want
- Filter type > Predefined > Exclude
- Select source & destination > Traffic to the hostname
- Select expression > that begins with > localhost
- Verify the filter - if you had any traffic to speak of, it will show up here.
- Save