Support » Plugin: Lara's Google Analytics » See stats for user not admin

  • Resolved protesilao

    (@protesilao)


    Like admin user on my dasheboard I see the google stast but is it possible to see the google stats for a user with not admin role?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Amr M. Ibrahim

    (@amribrahim)

    Hello,

    I’m working on an update to allow a more flexible roles. I’m not sure about the release time, but hopefully it’ll not take long.

    For now, you can allow non-admins to view the widget, but that will require manual edits to the plugin source code.

    Thanks,
    Amr

    Thread Starter protesilao

    (@protesilao)

    Ok,
    I’m a developper, so, if you say me wath is the manual edit to do on the source code, I can try.
    (mail: protesilao@inwind.it)

    Let me know
    thanks

    • This reply was modified 4 years, 7 months ago by protesilao.
    Plugin Author Amr M. Ibrahim

    (@amribrahim)

    Done .. Email sent 🙂

    Thanks,
    Amr

    Thread Starter protesilao

    (@protesilao)

    Ok!

    Insert this option on the next plugin update!
    Thanks

    • This reply was modified 4 years, 7 months ago by protesilao.

    Hello Amr,

    I’m looking for the same solution, could you send me the code to add to the plugin, please? [ redacted, support is not offered via email, Skype, IM etc. only in the forums ]

    Do you know when the fix may be added to the general release?

    Many thanks.

    Plugin Author Amr M. Ibrahim

    (@amribrahim)

    Hello @foots,

    To enable the widget for non-admin users, you’ll need to edit “lara-google-analytics.php”, find :

    if ( 'index.php' != $hook || !current_user_can('manage_options')) {

    And replace the “manage_options” capability to any of the capabilities listed on :

    Roles and Capabilities

    So, for example, if you changed it to “read”, then everyone will be able to see the widget, even “Subscribers”.

    I would advise to disable the admin permissions for the widget as follows :

    Edit the same file and remove “lrgawidget_perm_admin” from the following permissions array :

    
     $globalWidgetPermissions = array("lrgawidget_perm_admin",
                                         "lrgawidget_perm_sessions",
                                         "lrgawidget_perm_promo");

    Currently, I don’t have an ETA on the next release, as it’s taking more time that I anticipated .. but I’m working on it 🙂

    I hope it’s clear now, and if not, please let me know

    Thanks,

    Amr

    Hello Amr,

    Thank you very much for the code, love the dashboard you’ve made, by far the best out there.

    Again thanks for your help, it’s much appreciated.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘See stats for user not admin’ is closed to new replies.