If you’re running Node on Windows (who isn’t? [don’t answer that]), updating Node.js & NPM to the latest version is a little different than on Linux or OSX. In some ways, it’s easier than you might think.
To update these, the easiest way I have found is to download the latest version of Node.js (NPM is included) from the Node site here. Choose 32bit or 64bit (depending on your setup) and install.
Now if you run “node -v” or “npm -v” you’ll see you have the latest and greatest.
Below are the steps I use to create a new segment in Google Analytics. You can use this segment instead of the “All Sessions” default.
1. Add a new segment:
2. Give it a name:
(I called mine “Real Traffic”, since I’m attempting to keep only actual user visit data).
3. Go to the “advanced” area to start adding:
4. Let’s add the first rule to remove data with blank hostnames:
Make sure Sessions and Include is set, then select Hostname and Matches Regex. We’re including multiple domains (your domain and others you want to include (like webcache.googleusercontent.com). Be sure to add your domain to this list! Note: the “|.*” is RegEx for and + starts with.
5. Second and last rule:
Now the second rule has 2 conditions and is removing the other part of the bad / spam data using referral sources. This is where the action happens and starts to really clean the bad fake traffic. Make sure to set Sessions to Exclude, and use “and” in between the two parts of the condition.
That should be it. Save your segment and see if it makes a difference. I prefer this method over filters since it doesn’t remove any data.
In some of my test sites, I’m finding 96% of the traffic is fake (below is a comparison).
For reference, here are the sites I’ve found so far to be junk and I’m excluding:
Edit 7/15 - 2 more additions to add:
Edit 8/3 - another awesome referrer: