Allowing WordPress user roles to view the Koko Analytics dashboard?
The plugin comes with two custom capabilities, which by default are only added to the user with the administrator role:
- view_koko_analytics for viewing the analytics dashboard.
- manage_koko_analytics for accessing and updating the plugin settings.
By granting these capabilities to other WordPress user roles, you can grant them access to either the dashboard or the dashboard and the settings page respectively.
Adding capabilities to a user role
You can either do this via code or use a plugin like User Role Editor for adding capabilities to a certain WordPress user role.
If using the User Role Editor plugin, take the following steps:
- Install and activate the plugin.
- Go to Users > User Role Editor.
- Select the desired user role at the top of the page.
- Ensure the view_koko_analytics capability checkbox is selected.
![](https://www.kokoanalytics.com/wp-content/uploads/2023/09/out-3-1024x498.webp)
Hit the Update button on the right side of the screen and the selected capabilities will be added to the selected user role. That role will now be able to view (or manage, depending on what you selected) the Koko Analytics dashboard page.
You can now remove the User Role Editor plugin again, if you’re done editing capabilities. The capabilities itself are stored in your database and thus are retained even if you deactivate the role editor plugin.