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,

  1. click on the Admin link located at the top of Google Analytics,
  2. then choose the Account/Property/View that you want to set your filter on.
  3. after you have done that, choose View Settings” from View, and click on button “Copy View”.
  4. rename your new View. E.g. report excluding previews

Google Analytics duplicating a view

Click on images to enlarge. Hit ESC to exit.

Identifying the Problem

To see how much preview pages are affecting you, follow steps below

  1. google analytics behavior overviewclick on “Reporting” from the top navigation bar
  2. after that click Behavior > Overview located on the left side of the screen
  3. on the overview page, Google Analytics will show you your most popular pages.
  4. 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

remove previews from google analytics reports

How to Filter Away the Preview Page Counts

  1. click on Admin located on the top navigation bar
  2. ensure that you have chosen the correct Account/Property to add a Filter
  3. click on “All Filters” under Account, follow by “Add Filter”google analytics adding new filter
  4. enter the Filter Name you want
  5. Filter Type = Custom
  6. choose the radio button “Exclude”, Filter Field as “Request URI”
  7. in Filter Pattern, type in “preview=true”
  8. choose the “Views” that you want the filter to be applied to
  9. 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:

  1. do a preview of your post
  2. choose a View/Report that shows all your pageviews including the preview counts
  3. refresh your Google Analytics page, and it should show you an active user, and the respective page title
  4. then switch to your View/Report that has filter applied,
  5. and if everything is done correctly, you shouldn’t be seeing any active user anymore.google analytics active user pages

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”

google analytics testing tracking code

FOLLOW

lincoln

Lincoln is a fan of Apple products, loves red wine and traveling. He blogs on internet marketing, social media, wordpress tips & guides, and using technology to maximize efficiency. Follow him on Twitter or Facebook for regular updates.
FOLLOW

Leave a Reply

Your email address will not be published. Required fields are marked *