Google analytics not showing up on dashboard

Hello,

I'm trying to get GA to show up on the Dashboard but it's not working. I logged in and put the code, but still nothing. I'm admin and my client has a custom role. I selected admin as a role and put her role as custom as well. Not sure if that's the right way to do it.

Thanks for your support,

Best regards,

Paul

  • Nastia

    Hello Paul ,

    I hope all is well!

    The Statistics can be found in Dashboard > Home, please see the screenshot:

    If you just set up the Analytics the stats will be shown the next day, please wait 24 hours and check back again.

    If the Statistics section is missing from your site, please grant access from WPMU DEV > Support so I can have a closer look?

    Please see the detailed instructions on the link below:
    https://premium.wpmudev.org/manuals/wpmu-dev-dashboard-enabling-staff-login/

    Let me know when you do!

    Cheers,
    Nastia

  • Nastia

    Hello Paul , I trust you are doing well!

    I've tested the plugin in one of mine single WordPress installation and can't replicate this issue.

    Thank you for granting access to your site. Based on the analytics settings the site on Google Analytics is registered with www, while your current site doesn't load with http://www.domain.com.

    Would you please try removing the WWW from Google Analytics > Admin > View Settings website's URL?

    After this refresh your settings on your site Settings > Google Analytics, by selecting the right Google Analytics profile.

    Let me know how it went!

    Kind regards,
    Nastia

  • Patrick

    Hey there Paul

    I think the box you're referring to is the one shown in the attached screenshot, correct?

    If so, you must enter a custom capability assigned to the role in that box, not the custom role itself. In other words, you can either select a minimum role from the available roles in the dropdown, or enter a custom capability associated with any role in that box.

    I'm assuming that, as admin, your role's capabilities are higher than the custom role "WebAdmin". So, if that custom role appears in the dropdown, you need only select that role. If the custom role does not appear in the dropdown, then enter in the box any capability that custom role has that no other role below it has.

  • Paul

    Hello,

    Yes the box I'm referring to is the one in the screenshot. I would think that your plugin would pickup custom roles, since it is almost natural for every WP website to have custom roles. Actually to sit there and look at capabilities that it has that no one else has causes a very bad user experience. Do I really need to go through all the capabilities for role so I can get this to work with a few clicks?

    Can you guys please look into a fix for this? And please do not refer me to the jobs and experts or anything like this. I know how to get there :slight_smile:

    I'm really hoping this plugin can easily pick up custom roles and present them there, Why not be able to select a few roles? :wink:

    That would be awesome as a standard option for the plugin.

    Best regards,

    Paul

  • Sajid

    Hello Paul,
    Hope you are doing good today :slight_smile:

    As you know there is no way at the moment to select multiple user roles in the settings. You can only restrict with capability or minimum user roles.

    If you really need this feature right now then you have to edit the class-google-analytics-async-dashboard.php file located at ../plugins/google-analytics-async/google-analytics-async-files/.

    Open this file, find the following code (four instances).

    current_user_can($this->required_capability)

    and replace it with following one.

    ( current_user_can($this->required_capability) || current_user_can('Your_Custom_User_Role') )

    make sure you replace Your_Custom_User_Role text with actual user role here. Save changes and refresh the page.

    But before doing this (or any other code edits), make sure you take full backup of your website first.

    Also, since, we are making changes in the core files directly. So keep this change safe somewhere so you could apply it again after updating the plugin.

    That's all we could do quickly at the moment without sending you to jobs board :wink:

    Take care and have a nice day :slight_smile:

    Best Regards,
    Sajid - WPMU DEV Support

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.