Exclude a URL in Google Analytics
Don't let internal and bogus URLs spoil your Google Analytics reports. This tutorial will show you how to easily filter them out.
So you're looking at your Google Analytics and you notice that some pages just seem to get a lot of hits that you don't want. In my case, this was the preview page for our Ghost Blog stories. This is particularly frustrating when you have a new blog and want to measure the reach of new content but these pages seems to dominate the top of reports.
In this article, I'll show you how to customize your global filter so that you can remove these entries from your reports allowing you to track a sensible metric of users and page views.
1. Go to your Google Analytics Admin
You can find this screen by clicking on the cog in the bottom left of the UI.
2. Select filters
You'll find this under the View column about mid way down.
3. Add a filter to the view
In our case, we want to create an Ignore Ghost Blog Preview filter by setting the following options:
- Exclude
- traffic to the subdirectories
- that begin with
- Subdirectory: /p/
4. Verify your filter
Click the Verify this filter link to make sure it picks up the correct URLs. In our case it shows that the preview page hits are not present after the filter is applied.
Once you save your changes, it can take up to 24 hours for your reports to be updated.