Support » Plugin: Statify » Logged in users

  • Resolved Fernanda


    hello there. is there a way to not track page views if it’s coming from a logged in user? thanks.

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


    Hello Fernanda,

    if you haven’t changed the default behavior (using the hook statify__skip_tracking), Statify will not track views by logged in users (cp. Statify, FAQ section, 1st question).


    Plugin Support Stefan Kalscheuer


    Edit: Oops, I read over the word โ€œnotโ€œ…
    Answer below solves the opposite, track uathenticated users ๐Ÿ˜‰


    Yes, adding something simple like
    return is_logged_in() ? true : null;
    but be aware that this skips all following default filters is a user is logged in. Consider picking some additional filters from the highlighted lines:

    Assuming authenticated users are usually no spam bots or crawlers, a simple error and feed exclusion might do the job here:

        function() {
            if ( is_logged_in() ) {
                // Track logged in users, excluding feed, preview, error and search (skip otherwise)
                return !is_feed() && !is_preview() && !is_404() && !is_search();
            // Continue regular processing.
            return null;
    • This reply was modified 4 years, 2 months ago by Stefan Kalscheuer. Reason: Answered wrong question
    Thread Starter Fernanda


    Perfect, thanks for the quick replies. I guess the plug-in comes with the settings I need as default. ๐Ÿ˜‰

    thank you for your work and this nice plug-in.



Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Logged in users’ is closed to new replies.