How to Prevent Google Analytics from Tracking WordPress Page Views

  1. Sign in to Google Analytics and click Admin in the top navigation.
  2. Make sure the two drop-downs on the left are set to the appropriate Account and Property for your site.
  3. In the View dropdown, select Create new view. Give it a meaningful name like “Filter testing,” and set your timezone settings as necessary.
  4. Finally, click Create View.

Once you’ve got your new view created, return to the Admin screen and ensure that your test view is selected in the far right column. Now we’ll create the filter to remove preview pages:

  1. Click Filters in the View column, and then click the +NEW FILTER button.
  2. Give your filter a meaningful name like “Exclude Preview Traffic.”
  3. For Filter Type, select the Custom filter radio button.
  4. Leave the next radio button on Exclude, which should be the default choice.
  5. In the Filter Field drop-down menu, select Request URI.
  6. In the Filter Pattern text field, enter preview=true
    (The reason we are entering this text is that it is included in the address of every single WordPress preview page!)
  7. Click Save.
Call Now Button