Filter Out Admin Users from Google Tag Manager Script

Does anyone know a way to filter out Admin user activity from being counted in Google Analytics (through Google Tag Manager)? Thanks for your help.

1 Like

Here’s how you can achieve this:

  1. Create a Theme Component
  • Add a custom theme component to push an isAdmin flag to the dataLayer
  1. Configure Google Tag Manager
  • In GTM, create a new Data Layer Variable:
    • Name: isAdmin
    • Data Layer Variable Name: isAdmin
  • In your pageview or analytics tags, add a trigger condition so the tag fires only when isAdmin is not true.
  1. Result:
  • Admin user page views will not show up in GA reports as long as the trigger condition excludes them.

Guides

Thank you so much! Much gratitude!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.