# Restrict moderator access to only the stats panel on the admin dashboard?

**URL:** https://meta.discourse.org/t/restrict-moderator-access-to-only-the-stats-panel-on-the-admin-dashboard/146468
**Category:** Feature
**Tags:** moderation, dashboard-reports
**Created:** [1 april 2020 om 18:34 UTC](https://meta.discourse.org/t/restrict-moderator-access-to-only-the-stats-panel-on-the-admin-dashboard/146468 "2020-04-01T18:34:22Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![jidetheblogger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jidetheblogger/32/73213_2.png) [@jidetheblogger](https://meta.discourse.org/u/jidetheblogger)
#### Post date: [1 april 2020 om 18:34 UTC](https://meta.discourse.org/t/restrict-moderator-access-to-only-the-stats-panel-on-the-admin-dashboard/146468/1 "2020-04-01T18:34:22Z")

</div>

I would like to know if it would be possible to make moderators have access to **stats only** when they access the admin dashboard.

I don’t want some moderators to have access to the “users”, “logs” and “plugins” tab.

---

<div class="post-metadata">

### Author: ![ondrej](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ondrej/32/198804_2.png) [@ondrej](https://meta.discourse.org/u/ondrej)
#### Post date: [1 april 2020 om 20:07 UTC](https://meta.discourse.org/t/restrict-moderator-access-to-only-the-stats-panel-on-the-admin-dashboard/146468/2 "2020-04-01T20:07:29Z")

</div>

No, not possible. And I don’t understand why you want that. I know it is April 1st but… Surely you trust your own moderators to view logs and the actual user list they are meant to be moderating.

---

<div class="post-metadata">

### Author: ![jidetheblogger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jidetheblogger/32/73213_2.png) [@jidetheblogger](https://meta.discourse.org/u/jidetheblogger)
#### Post date: [2 april 2020 om 16:13 UTC](https://meta.discourse.org/t/restrict-moderator-access-to-only-the-stats-panel-on-the-admin-dashboard/146468/3 "2020-04-02T16:13:07Z")

</div>

lol. has nothing to do with April 1 though. Just asking to see if one can edit capabilities just as we do on WordPress.

Just thinking of having staff that can be posting and track pageviews to see how the site is performing. Nothing else.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2 april 2020 om 16:14 UTC](https://meta.discourse.org/t/restrict-moderator-access-to-only-the-stats-panel-on-the-admin-dashboard/146468/4 "2020-04-02T16:14:46Z")

</div>

Have them visit the /about page if they need basic stats.

---

<div class="post-metadata">

### Author: ![jidetheblogger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jidetheblogger/32/73213_2.png) [@jidetheblogger](https://meta.discourse.org/u/jidetheblogger)
#### Post date: [27 april 2020 om 12:58 UTC](https://meta.discourse.org/t/restrict-moderator-access-to-only-the-stats-panel-on-the-admin-dashboard/146468/5 "2020-04-27T12:58:44Z")

</div>

No pageviews stats displayed at : [https://forum.netdivo.com/about](https://forum.netdivo.com/about)

---

<div class="post-metadata">

### Author: ![Thomas\_G](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thomas_g/32/200158_2.png) [@Thomas\_G](https://meta.discourse.org/u/Thomas_G)
#### Post date: [27 april 2020 om 13:29 UTC](https://meta.discourse.org/t/restrict-moderator-access-to-only-the-stats-panel-on-the-admin-dashboard/146468/6 "2020-04-27T13:29:31Z")

</div>

It seems that you have edited manually the content in the `About` page. You might have deleted the generated stats. Not 100% sure though, as I don’t remember exactly if you have the ability to delete them. @ondrejj can you confirm?

---

<div class="post-metadata">

### Author: ![marianord](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/marianord/32/90502_2.png) [@marianord](https://meta.discourse.org/u/marianord)
#### Post date: [27 april 2020 om 15:40 UTC](https://meta.discourse.org/t/restrict-moderator-access-to-only-the-stats-panel-on-the-admin-dashboard/146468/7 "2020-04-27T15:40:44Z")

</div>

I found an use case that might be interesting for this, maybe not a moderator but an user with access to the great analytics that Discourse already generates.

Imagine a forum that uses some kind of marketing campaigns, yes Analytics is good, maybe Matomo or any other, but having the analytics built in give a more precise metric and there’s no need to run another tool for the _same_ result.

So, having some kind of role that is able to access the admin dashboard and the metrics would be great to communities that use marketing or run campaigns to promote theirself.

---

<div class="post-metadata">

### Author: ![mbauman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mbauman/32/139835_2.png) [@mbauman](https://meta.discourse.org/u/mbauman)
#### Post date: [27 april 2020 om 17:11 UTC](https://meta.discourse.org/t/restrict-moderator-access-to-only-the-stats-panel-on-the-admin-dashboard/146468/8 "2020-04-27T17:11:43Z")

</div>

For what it’s worth, we’d also greatly appreciate this capability. We’ve wanted to give direct access to admin reports to non-moderators for grant-writing and/or marketing purposes. By and large, they just want stats like `signups`, `posts`, `likes`, `page_view_total_reqs` and `topics` from `/admin/reports/X`.

The ability to hand off an API key with _just_ this report access (and no other admin capabilities) would be awesome. We’d probably want the handful of reports that expose private info turned off (like `user_notes`, `user_flagging_ratio`, and `staff_logins`), but all other admin reports are entirely summary stats and don’t require admin-level (or even moderator-level) trust to view IMO.

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [27 april 2020 om 17:37 UTC](https://meta.discourse.org/t/restrict-moderator-access-to-only-the-stats-panel-on-the-admin-dashboard/146468/9 "2020-04-27T17:37:20Z")

</div>

You can add [data explorer](https://meta.discourse.org/t/32566?silent=true) query rights to arbitrary groups, which can cover any reporting needs.

---

<div class="post-metadata">

### Author: ![mbauman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mbauman/32/139835_2.png) [@mbauman](https://meta.discourse.org/u/mbauman)
#### Post date: [27 april 2020 om 17:42 UTC](https://meta.discourse.org/t/restrict-moderator-access-to-only-the-stats-panel-on-the-admin-dashboard/146468/10 "2020-04-27T17:42:22Z")

</div>

The [data explorer](https://meta.discourse.org/t/32566?silent=true) requires a **significantly** higher threshold of trust as you can use it to see _all_ private user data the system contains, including emails, private messages, mod actions, and more.

Edit: oh, I see, you can just whitelist individual queries, not rights to the entire UI.

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [27 april 2020 om 17:43 UTC](https://meta.discourse.org/t/restrict-moderator-access-to-only-the-stats-panel-on-the-admin-dashboard/146468/11 "2020-04-27T17:43:49Z")

</div>

No it doesn’t.

Group permission allows the specified group to only “execute” previously created queries.

---

<div class="post-metadata">

### Author: ![mbauman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mbauman/32/139835_2.png) [@mbauman](https://meta.discourse.org/u/mbauman)
#### Post date: [27 april 2020 om 18:02 UTC](https://meta.discourse.org/t/restrict-moderator-access-to-only-the-stats-panel-on-the-admin-dashboard/146468/12 "2020-04-27T18:02:00Z")

</div>

Ah, cool! Is there a playground where our users can play around and build queries? The [Data Explorer](https://meta.discourse.org/t/32566?silent=true) UI is really helpful in navigating the table structure.

---

<div class="post-metadata">

### Author: ![mbauman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mbauman/32/139835_2.png) [@mbauman](https://meta.discourse.org/u/mbauman)
#### Post date: [4 mei 2020 om 03:08 UTC](https://meta.discourse.org/t/restrict-moderator-access-to-only-the-stats-panel-on-the-admin-dashboard/146468/13 "2020-05-04T03:08:08Z")

</div>

Is it possible to get a shared [Data Explorer](https://meta.discourse.org/t/32566?silent=true) query export programmatically? Doing the naive thing — accessing `https://discourse.example.com/g/group/reports/123.json` — doesn’t work like it does for the official reports page. Instead of actually doing the query it just returns _the raw SQL itself_.

Edit: ah, it’s [Run Data Explorer queries with the Discourse API](https://meta.discourse.org/t/how-to-run-data-explorer-queries-with-the-discourse-api/120063)

---

<div class="post-metadata">

### Author: ![jidetheblogger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jidetheblogger/32/73213_2.png) [@jidetheblogger](https://meta.discourse.org/u/jidetheblogger)
#### Post date: [11 mei 2020 om 10:30 UTC](https://meta.discourse.org/t/restrict-moderator-access-to-only-the-stats-panel-on-the-admin-dashboard/146468/14 "2020-05-11T10:30:00Z")

</div>

I am still so much interested in this feature. A staff/author that can just post to the forum but also have access to STATS only.

We hire writers but still want them to see STATS only so they can see if their contribution is helping the forum grow or not.

JetPack makes this easy for WordPress users and I believe it’s doable here too.

---

<div class="post-metadata">

### Author: ![mbauman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mbauman/32/139835_2.png) [@mbauman](https://meta.discourse.org/u/mbauman)
#### Post date: [11 mei 2020 om 16:16 UTC](https://meta.discourse.org/t/restrict-moderator-access-to-only-the-stats-panel-on-the-admin-dashboard/146468/15 "2020-05-11T16:16:49Z")

</div>

I do think the [Data Explorer](https://meta.discourse.org/t/32566?silent=true) plugin can do exactly what you want here, but it unfortunately requires some SQL know-how to set up the queries. Once you have the queries you want you can make them available to any group of users as you prefer.

[https://meta.discourse.org/t/what-cool-data-explorer-queries-have-you-come-up-with/43516/279](https://meta.discourse.org/t/what-cool-data-explorer-queries-have-you-come-up-with/43516/279)

---

<div class="post-metadata">

### Author: ![jidetheblogger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jidetheblogger/32/73213_2.png) [@jidetheblogger](https://meta.discourse.org/u/jidetheblogger)
#### Post date: [14 mei 2020 om 07:12 UTC](https://meta.discourse.org/t/restrict-moderator-access-to-only-the-stats-panel-on-the-admin-dashboard/146468/16 "2020-05-14T07:12:36Z")

</div>

Thanks. If it can, then I think it will be easier for discourse to implement the feature for those of us that can’t really make use of the [data explorer](https://meta.discourse.org/t/32566?silent=true) option. Just my two cents..

---

<div class="post-metadata">

### Author: ![SouperC](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/souperc/32/62875_2.png) [@SouperC](https://meta.discourse.org/u/SouperC)
#### Post date: [8 april 2021 om 13:30 UTC](https://meta.discourse.org/t/restrict-moderator-access-to-only-the-stats-panel-on-the-admin-dashboard/146468/17 "2021-04-08T13:30:10Z")

</div>

I’m surprised that there hasn’t been more interest in this. I understand many being guarded on stats, but I’d love to grant our moderators access to the stats page.

---

<div class="post-metadata">

### Author: ![jrgong](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@jrgong](https://meta.discourse.org/u/jrgong)
#### Post date: [23 januari 2024 om 14:15 UTC](https://meta.discourse.org/t/restrict-moderator-access-to-only-the-stats-panel-on-the-admin-dashboard/146468/18 "2024-01-23T14:15:59Z")

</div>

I wonder if anyone found some workaround here…I am still looking the most convenient way to give mods access to reports

---

<div class="post-metadata">

### Author: ![isaac](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/isaac/32/235758_2.png) [@isaac](https://meta.discourse.org/u/isaac)
#### Post date: [24 januari 2024 om 16:49 UTC](https://meta.discourse.org/t/restrict-moderator-access-to-only-the-stats-panel-on-the-admin-dashboard/146468/22 "2024-01-24T16:49:58Z")

</div>

With [data-explorer](https://meta.discourse.org/t/discourse-data-explorer/32566#allow-moderators-or-custom-groups-to-run-a-query-5) you could create a query that would make any data you desire available for moderators or a custom group.

> [@Discourse Data Explorer](https://meta.discourse.org/t/discourse-data-explorer/32566/1):
>
> ### Allow moderators or custom groups to run a query
> 
> You can add groups (including moderators) to a query to grant them access to it:
> 
> ![image](https://global.discourse-cdn.com/meta/original/3X/9/9/99e25b75d0eb607264535469b2d653ab6e3ba315.png)
> 
> After saving, you can find it from the Groups page for that particular group on the **Reports** tab:
> 
> ![image](https://global.discourse-cdn.com/meta/original/3X/2/0/20f0212e011ee5ff7b8e5dacaffd284a61c7651d.png)
> 
> Click any query to open it and then the Run button to see the results.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [24 januari 2024 om 17:17 UTC](https://meta.discourse.org/t/restrict-moderator-access-to-only-the-stats-panel-on-the-admin-dashboard/146468/23 "2024-01-24T17:17:38Z")

</div>

We also now have the SQL for many of the dashboard reports here on meta (#dashboard-sql) so you can easily replicate them in [data explorer](https://meta.discourse.org/t/32566?silent=true) and allow access to a specific group without needing to grant full moderator status. 👍

Using this in combination with the category moderator feature would allow you to give certain users some moderator abilities _and_ access to statistics without giving them access to the other moderator areas.
