Support » Plugin: Statify » Show widget based on user role?

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

    (@patrickrobrecht)

    Hi Johannes,

    what exactly do you mean by “widget based on user roles”?

    Statify does not know which user viewed the content as this is not stored in the database. Just the date, target URL and (optional) referrer URL are saved.

    It is technically possible to analyze the views of the content (posts or pages) created by a specific user or users with a specific role. Currently Statify does not offer an UI for that and we do not have any plans to add such a feature.

    You may install Statify – Extended Evaluation (authored by me and planned to be integrated into Statify in one of the next releases) to get additional statistics out of the data saved by Statify. With this plugin you can group views per target/referrer URL or time period, but not per user or user role.

    As any data is stored in the database you may create any evaluation stats on your own (queries directly on the database or your own script).

    I hope this answered your question. If not, feel free to ask for details.

    Kind regards
    Patrick

    Plugin Support Torsten Landsiedel

    (@zodiac1978)

    Hi @fumow

    do you mean the dashboard widget? Then you can find the solution in our documentation (this was the reason why the original poster has marked the thread as resolved: “Sorry. I reread the FAQ and found it there”):
    https://statify.pluginkollektiv.org/documentation/hooks/#user_can_see_stats

    If you need this for WooCommerce Shop manager, you should look for the capabilities which are bundled with those roles, so you know for what to check for:
    https://docs.woocommerce.com/document/roles-capabilities/

    All the best,
    Torsten

    Thread Starter Johannes

    (@fumow)

    Hi Patrick,

    Thank you for your quick answer! I’m sorry, I will try to formulate this better.

    I am referring to the Statify widget or “box” that can be found on the dashboard in the backend. This box shows the latest page views. Currently this box is only visible to me when I am logged in as an admin. If I login to my website as a shop manager, it is not visible anymore.

    I was wondering if these analytics can be made visible for users who have the role shop manager? I would greatly appreciate if you could give me an idea of how I could make this possible.

    Thanks,
    Johannes

    Thread Starter Johannes

    (@fumow)

    Hi Torsten,

    Thank you, I will have a look at these links!

    Best regards,
    Johannes

    Hi Torsten,
    thank you for
    add_filter( 'statify__user_can_see_stats', '__return_true' );

    This works fine. 🙂

    Is it also possible to display the Statify menu for editors?

    Regards,
    Dirk

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Show widget based on user role?’ is closed to new replies.