Segment to Exclude Staff

I’d like to create a segment that excludes our own staff visiting the website. On Google Analytics I’ve done this with a combination of IP addresses and page-based parameters, i.e. anyone who visits a page with, for example, /admin anywhere in the url would be excluded. I found this was better at filtering out staff who accessed the site while working from home. Our CRM is hosted on our website so there’s quite a lot of traffic to filter. Does anyone have examples of how I might do this on Piwik? The parameters look like they’re slightly different so would appreciate any guidance on where to start, or if I need to approach it a different way any advice would be great to have.

Hi! If you want to stick to the page URL filter, my recommendation would be setting up a session-scope custom dimension. This one would be set to 1 (or true) once a page including “admin” in the URL is visited. Then you could use this dimension to create a segment that filters our internal traffic.

Hey Kuba,

Thanks for your advice on this - I tried setting this up and tried it a couple of ways but I’m not sure I’m doing it right. When I applied the page url contains condition with multiple different ‘contains’ it seemed to cut everyone out, not just back end users. Also tried ‘does not match regex’ with the following: “^.(/admin|/crm|/user|/interaction-manager|/companies|/node|/bot-traffic.icu|/event-dashboard|/search/delegate/|/user|/search).$”

That was based on help from ChatGPT so might be total nonsense. Any advice for how I can set it up? Thanks for your help so far :slight_smile:

Richard.

Hi @RiVentiv,

My recommendation would be to create a custom session dimension (not event dimension) and set it’s value to true once someone visits the /admin page. So here are the suggested steps:

  1. Create a Custom Session Dimension (with name e.g. “stuff member”).
  2. In tag manager create a custom dimension tag.
  3. Select the Session dimension you’ve created and set dimension value to “true”.
  4. Create a Page View trigger with event condition being “Page URL contains /admin”
  5. Select the new trigger as a trigger for the tag from step 2.

Now you can use the custom session dimension in reports to exclude data from stuff members. Here is how:

  1. Create a new segment and select the “stuff member” dimension created in step 1 (previous set of steps).
  2. Condition for this dimension should be “is not true”

If you set it to “is true” then you’ll have a segment showing data only from stuff members in case you’d need to have this option too.

Best,
Oliwer