{"id":4546,"date":"2020-08-03T11:16:01","date_gmt":"2020-08-03T08:16:01","guid":{"rendered":"https:\/\/trackingchef.com\/?p=4546"},"modified":"2020-12-30T12:18:40","modified_gmt":"2020-12-30T09:18:40","slug":"excluding-wordpress-preview-traffic-in-google-analytics","status":"publish","type":"post","link":"https:\/\/trackingchef.com\/google-analytics\/excluding-wordpress-preview-traffic-in-google-analytics\/","title":{"rendered":"Excluding WordPress preview traffic in Google Analytics"},"content":{"rendered":"\n
A common issue with Google Analytics is internal traffic crowding your reports.<\/p>\n\n\n\n
The standard way to exclude such traffic from your reporting is by creating a filter to exclude any traffic from known IPs (see here how<\/a>). While this tactic is great, in times such as COVID-19, with many of the team working from home, managing the IP exclusions is difficult.<\/p>\n\n\n\n One quick way to solve this (to some extent) is by excluding known URLs from reporting to Google Analytics. If you’re using WordPress (like I am), you might want to exclude the Preview pages of your posts.<\/p>\n\n\n\n To achieve this we will need to create a simple ‘Custom Filter’.<\/p>\n\n\n\n If you’re using Elementor<\/a>, you can also exclude it’s preview mode by using the value \\?(p=.|elementor-preview=|.<\/em>preview=true)<\/em> in your exclusion rule. You can also verify your filter before saving to examine how the filter would have impacted your past seven days data.<\/p>\n","protected":false},"excerpt":{"rendered":" A common issue with Google Analytics is internal traffic crowding your reports. The standard way to exclude such traffic from your reporting is by creating a filter to exclude any traffic from known IPs (see here how). While this tactic is great, in times such as COVID-19, with many of the team working from home, […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[43],"class_list":["post-4546","post","type-post","status-publish","format-standard","hentry","category-google-analytics","tag-elementor"],"_links":{"self":[{"href":"https:\/\/trackingchef.com\/wp-json\/wp\/v2\/posts\/4546","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/trackingchef.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/trackingchef.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/trackingchef.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/trackingchef.com\/wp-json\/wp\/v2\/comments?post=4546"}],"version-history":[{"count":3,"href":"https:\/\/trackingchef.com\/wp-json\/wp\/v2\/posts\/4546\/revisions"}],"predecessor-version":[{"id":4859,"href":"https:\/\/trackingchef.com\/wp-json\/wp\/v2\/posts\/4546\/revisions\/4859"}],"wp:attachment":[{"href":"https:\/\/trackingchef.com\/wp-json\/wp\/v2\/media?parent=4546"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/trackingchef.com\/wp-json\/wp\/v2\/categories?post=4546"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/trackingchef.com\/wp-json\/wp\/v2\/tags?post=4546"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}
\\?(p=.*|preview=true)<\/em><\/li><\/figure><\/div>\n\n\n\n
(shoutout to Mark Alves<\/a> for correcting a typo here)<\/p>\n\n\n\n