Support » Plugin: Koko Analytics » Analytics is Zero for Editor

  • Resolved catuyen

    (@catuyen)


    Hi

    I’ve installed User Role Editor and add a capability view_koko_analytics allows Editor to view the analytics.

    But all analytics is ZERO.

    How can let Editor view the Analytics such as the Administrator views?

    Thank you
    Uyen

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support Lap

    (@lapzor)

    A few months ago another user shared this code that you can try:

    function fs_koko() {
    	$role = get_role('editor');
    	$role->add_cap('view_koko_analytics', true);
    }
    add_action('init', 'fs_koko', 12);

    You can add it via a plugin like
    https://wordpress.org/plugins/code-snippets/

    Hope that helps. If you have any questions, please let me know!

    Thread Starter catuyen

    (@catuyen)

    Thank you for your reply.

    I added the snippet above into the functions.php file but still shows nothing with the Editor user.

    Plugin Support Lap

    (@lapzor)

    Thread Starter catuyen

    (@catuyen)

    Thank you for your update.

    However, I guess the code is outdated and it didn’t work.

    Plugin Support Lap

    (@lapzor)

    I’ve just tested that code on my own setup and it works for me.
    It shows Analytics to the editor.

    When you view Analytics from Admin it’s non-zero, or is it zero there as well?

    Thread Starter catuyen

    (@catuyen)

    Admin view none-zero

    But Editor is zero analytics.

    PHP 8.0

    Thanks

    Plugin Support Lap

    (@lapzor)

    In my case it shows the analytics normally when im editor:
    https://i.imgur.com/ogLdQt0.png

    What I mean to ask is, is this problem really related to the editor role, or is it a general problem in your setup, even for the Administrator role?

    Thread Starter catuyen

    (@catuyen)

    It only happens in the Editor role.

    Plugin Support Lap

    (@lapzor)

    Since it works for me on my own test setup it’s difficult to debug this further via the WordPress forum.

    Please send me a link to this thread on support @ kokoanalytics.com

    Thanks.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Analytics is Zero for Editor’ is closed to new replies.