Title: Cannot Exclude Administrators
Last modified: August 30, 2016

---

# Cannot Exclude Administrators

 *  Resolved [lsilver](https://wordpress.org/support/users/lsilver/)
 * (@lsilver)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/cannot-exclude-administrators/)
 * I’m trying to exclude visitors with a visitor type of “administrator”. It’s not
   working.
 * In GTM, I created a user-defined variable called “Visitor Type” using the Data
   Layer Variable type, with the name of visitorType and Data Layer Version of Version
   2.
 * I then created a Trigger which I used as an Exclusion in the Tag with the Event
   Type of Page View, Trigger Type of Page View (I also tried DOM) and Fire On of{{
   the variable created above}} equals administrator (I also tried contains).
 * I also tried it for the logged-in state and had the same result (didn’t work).
 * Is there anything I’m doing wrong?
 * Thanks
 * [https://wordpress.org/plugins/duracelltomi-google-tag-manager/](https://wordpress.org/plugins/duracelltomi-google-tag-manager/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [lsilver](https://wordpress.org/support/users/lsilver/)
 * (@lsilver)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/cannot-exclude-administrators/#post-6459444)
 * Oh, I did add a Custom Dimension to Google Analytics as well as GTM referencing
   the variable.
 * Thanks
 *  Plugin Author [Thomas Geiger](https://wordpress.org/support/users/duracelltomi/)
 * (@duracelltomi)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/cannot-exclude-administrators/#post-6459581)
 * Hi,
 * My blocking rule that I use is built up using those settings:
    [http://www.awesomescreenshot.com/image/508167/ad00a51bfe38b44396fc4fa6db2e986b](http://www.awesomescreenshot.com/image/508167/ad00a51bfe38b44396fc4fa6db2e986b)
 * That works for me on every site.
    I usually add the “Debug mode” variable as 
   well since in most cases I am logged in to the site while working on a GTM container
   which means I have to see every tag firing.
 * Thomas
 *  Thread Starter [lsilver](https://wordpress.org/support/users/lsilver/)
 * (@lsilver)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/cannot-exclude-administrators/#post-6459607)
 * Thanks for the quick reply. I was able to debug and found a conflict with the
   Autoptimizer plugin. I added the various scripts for your plugin to be excluded
   from being optimized by that plugin and everything is working as expected.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Cannot Exclude Administrators’ is closed to new replies.

 * ![](https://ps.w.org/duracelltomi-google-tag-manager/assets/icon-256x256.png?
   rev=1708451)
 * [GTM4WP - A Google Tag Manager (GTM) plugin for WordPress](https://wordpress.org/plugins/duracelltomi-google-tag-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/duracelltomi-google-tag-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/duracelltomi-google-tag-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/duracelltomi-google-tag-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/duracelltomi-google-tag-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/duracelltomi-google-tag-manager/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [lsilver](https://wordpress.org/support/users/lsilver/)
 * Last activity: [10 years, 9 months ago](https://wordpress.org/support/topic/cannot-exclude-administrators/#post-6459607)
 * Status: resolved