- I have installed the WPMU Google Analytics plugin

Hello - I have installed the WPMU Google Analytics plugin on a few of my clients sites. If they go under the WordPress menu and select "Settings" > "Google Analytics", they can choose all of the analytics from my other clients that are also loaded into my Google Analytics account. How do I stop this? Thanks!

  • Tyler Postle

    Hey Peter,

    Hope you're doing well today and thanks for your question!

    I can see how this would be a privacy issue. I'm going to flag this as a feature request :slight_smile:

    In the meantime, you have a couple options. Do you stay as an admin on the site?

    You could use the User Role Editor plugin and create a new custom admin role for your clients and remove access from the Google Analytics settings with the Admin menu editor plugin.

    Then they can't access that page :slight_smile:

    Or, another option is we remove it with some CSS:

    #google-analytics-reports-settings {
    display: none;
    }

    This would remove just that one setting. You would need to add that code into our Ultimate Branding Admin CSS module or you could also use this plugin here if you aren't already using our Ultimate Branding plugin: https://wordpress.org/plugins/add-admin-css/

    Keep in mind, your client can still access that code and remove it but in many cases I don't think they would ever think to do that.

    Last option which is probably the best one far as not having to add other plugins and hiding it from the client, is to add the custom CSS into your functions.php file of your theme:

    add_action('admin_head', 'hide_analytics_settings');
    
    function hide_analytics_settings() {
      echo '<style>
        #google-analytics-reports-settings {
    display: none;
    }
      </style>';
    }

    Hope this helps Peter! If you need any further assistance with this just let us know!

    All the best,
    Tyler

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.