Excluding logged-in users from the Burst tracking script is a good way to make your data more clean. By excluding logged-in users you avoid polluting your data with visits from yourself or from your company. By default Burst only excludes administrators from tracking. We’ve done this because on some websites logged-in users data is valuable aswell, for example a Woocommerce shop or a membership site. If you want to exclude additional roles from tracking, follow the steps below.

How it works

Over on Github you can find an example snippet you can use in your own custom theme/plugin or as a mu-plugin. Don’t know how to install a MU Plugin? Follow this guide to add filters with MU Plugins.

To choose which roles you want to exclude you need to change the following variable:
$add_roles = array ( ‘subscriber’, ‘contributor’, ‘author’, ‘editor’ ) – Choose the user roles you want to exclude here. The administrator role is already excluded. 

Hessel de Jong

Hessel de Jong

Hessel is the Developer & Co-Owner of Burst Statistics

Table of Contents