Google Analytics by MonsterInsights
[resolved] [Plugin: Google Analytics for WordPress] Problem and solution with multisite network enabled site (4 posts)

  1. kotsis
    Posted 4 years ago #

    Hello there, i would like to inform you about a problem we had with the google analytics plugin and how we solved it. Perhaps you will decide to make the change also.

    We are using your plugin in a network mulitsite enabled wordpress. The users are all created automatically.
    Since our users can only add other existing users to their blogs, but they can not edit them, they don't have the 'edit_users' capability!
    So while they can enable the 'google analytics for wordpress' plugin, when they try to go to the options page they get the message
    that they don't have permission.

    We solved the problem by editing the file yst_plugin_tools.php at line 19

    from - var $accesslvl = 'edit_users';
    to + var $accesslvl = 'activate_plugins';

    With the activate_plugins capability we still make sure that the logged in is an administrator and we can now access the options page without the permission error.

    Thank you.


  2. yowzer
    Posted 4 years ago #

    This is a pretty trivial issue to fix. The problem is you have to know the right search terms to find the solution. Unfortunately, I found the same issue and fix only after a few hours of digging through plugin code.

    I used:
    $accesslvl = 'manage_options';

  3. amichetti
    Posted 4 years ago #

    kotsis - thank you so much for posting this! I was wondering why the plugin wasn't working. We are also on multisite and I am not an experienced developer so I rarely edit php unless I know exactly what to look for. Really appreciate it!

  4. projectspoint
    Posted 4 years ago #

    let's hope that get's rectified in a future update! thanks to the above for saving me a bit of time!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Google Analytics by MonsterInsights
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic