In order to obtain an accurate analysis of any website, we first need to remove or filter data that are incorrect or not applicable. Typically all of us will do a preview of an article that we write to ensure that it looks good, formatted property, before we publish the post. However if this previews are counted as page views by Google Analytics, then it will skew will reports and analysis. In this step-by-step guide, we show you how to remove preview counts from your Google Analytics report.
Ensure you have an Unfiltered Master View
First and foremost, before we start creating Filters, you need to have at least one master view that is unfiltered, the reason is because if your filter goes wrong, you can still fall back to your metrics that is original and complete. If you have already done that, let’s go to the next section.
To duplicate your master view,
- click on the Admin link located at the top of Google Analytics,
- then choose the Account/Property/View that you want to set your filter on.
- after you have done that, choose “View Settings” from View, and click on button “Copy View”.
- rename your new View. E.g. report excluding previews
Click on images to enlarge. Hit ESC to exit.
Identifying the Problem
To see how much preview pages are affecting you, follow steps below
- click on “Reporting” from the top navigation bar
- after that click Behavior > Overview located on the left side of the screen
- on the overview page, Google Analytics will show you your most popular pages.
- for website owners on WordPress, you will see something similar to item #10 of the screenshot below. The preview pages are appearing as “preview=true“, and is identified by Google Analytics as part of the total pageviews. This is not exactly correct, since these views are self-generated by the blog owner. So now we have to create a filter to remove any pages that contain the text string “preview=true” so that Google Analytics will not pick it up again. In this example, preview pages have been attributed 2.64% of the total page views.
*if you are using another CMS platform other than WordPress, the text string is likely to be different, but steps written here can still be applied
How to Filter Away the Preview Page Counts
- click on Admin located on the top navigation bar
- ensure that you have chosen the correct Account/Property to add a Filter
- click on “All Filters” under Account, follow by “Add Filter”
- enter the Filter Name you want
- Filter Type = Custom
- choose the radio button “Exclude”, Filter Field as “Request URI”
- in Filter Pattern, type in “preview=true”
- choose the “Views” that you want the filter to be applied to
- click save & you are done
Testing your Filter
To find whether your filter is working, go to the Reporting section in Google Analytics, then go to Real-Time > Content which is located at the left-side. Next:
- do a preview of your post
- choose a View/Report that shows all your pageviews including the preview counts
- refresh your Google Analytics page, and it should show you an active user, and the respective page title
- then switch to your View/Report that has filter applied,
- and if everything is done correctly, you shouldn’t be seeing any active user anymore.
Bonus tip: if you are not sure that Google Analytics is setup property on your website, you can do a test by going to Property > Tracking Info > Tracking Code, then click on the button “Send Test Traffic”
Latest posts by lincoln (see all)
- Twitter Search Operators for Geeks – Change the Way You Search - April 21, 2016
- How to Auto Publish from Instagram to WordPress Using Instagrate - April 19, 2016
- 20 Best Ways to Use Twitter Advanced Search to Find Leads - April 17, 2016