• Resolved simon-r

    (@simon-r-1)


    I need an option to generate stats for users that are logged in. It would be perfect if I could set which roles are tracked. I. e. “track unregistered visitors and everyone up to editor”. Would this be possible?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Patrick Robrecht

    (@patrickrobrecht)

    Yes, this is possible using the statify_skip_tracking hook in your theme’s function.php as follows

    add_filter(
        'statify_skip_tracking',
        function() {
            if ( 1 == 1 ) {
                return true;
            }
    
            return false;
        }
    );

    You have to change the (1=1) condition in the method above such that it returns true for the users you don’t want to track.

    Thread Starter simon-r

    (@simon-r-1)

    Wow, this is great news, thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Generate Stats for logged in users’ is closed to new replies.