• Resolved cangevendi

    (@cangevendi)


    Is there a way to not track any event when the administrator is login?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Torben Lundsgaard

    (@torbenlundsgaard)

    Yes and no. There is not an option in the UI to disable tracking because it can be problematic with som full page cache solitiouns. I know that other GTM plugins have this feature but there are situations where it will cause more problems than it is solwing.

    I will note this as a feature request and see if i can find an acceptable solution.

    You can disble tracking yourself using PHP. GTM Kit has a filter hook gtmkit_container_active which can be set to true/false and you can use this filter with is_admin()

    Thread Starter cangevendi

    (@cangevendi)

    Hello,

    Thanks for your reply, I try to filter out using data layer variable userRole = administrator from GTM.

    The only problem with that is, for ‘Google Tag’, the earliest i can filter out by userRole and still cover the whole website is load_delayed_js as you can see from the screenshot. With built-in variable, It’s not until ‘DOM Ready’ will the userRole data layer is there.

    I heard that it’s generally not recommended to load ‘Google Analytics: GA4 Event’ before ‘Google Tag’ since it may results in inaccuracy. Is that true ?

    But, for the time being, putting ‘Google Tag’ in load_delayed_js is what i do.

    Plugin Author Torben Lundsgaard

    (@torbenlundsgaard)

    @cangevendi User role exclusion is included in version 1.23 that was released today

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.