# Data & reporting

**URL:** https://meta.discourse.org/c/community-building/data-reporting/148.md?page=9

[Latest](https://meta.discourse.org/latest.md) · [Categories](https://meta.discourse.org/categories.md) · [Tags](https://meta.discourse.org/tags.md)

**Page:** 10

---

## [Most DM channels created (interval)](https://meta.discourse.org/t/most-dm-channels-created-interval/277363)

<div class="topic-metadata">

**Author:** [@JammyDodger](https://meta.discourse.org/u/JammyDodger)\
**Replies:** 0\
**Last updated:** [August 31, 2023, 2:38pm UTC](https://meta.discourse.org/t/most-dm-channels-created-interval/277363 "2023-08-31T14:38:58Z")

</div>

A list of how many Personal Chats someone has started within the given timeframe. -- \[params\] -- string :interval = 1 WEEK WITH first\_message AS ( SELECT MIN(cm.id) AS id FROM chat\_messages cm WHERE cm.chat\_chan…

---

## [Most Direct Messages (interval)](https://meta.discourse.org/t/most-direct-messages-interval/277362)

<div class="topic-metadata">

**Author:** [@JammyDodger](https://meta.discourse.org/u/JammyDodger)\
**Replies:** 0\
**Last updated:** [August 31, 2023, 2:37pm UTC](https://meta.discourse.org/t/most-direct-messages-interval/277362 "2023-08-31T14:37:59Z")

</div>

A top ten list of users who have sent the most messages in the given timeframe. -- \[params\] -- string :interval = 1 WEEK SELECT user\_id, COUNT(\*) FROM chat\_messages WHERE created\_at::date \> CURRENT\_DATE - INT…

---

## [Grant Badge when user visits link](https://meta.discourse.org/t/grant-badge-when-user-visits-link/276700)

<div class="topic-metadata">

**Author:** [@Sami\_Syed](https://meta.discourse.org/u/Sami_Syed)\
**Replies:** 26\
**Last updated:** [August 30, 2023, 4:30pm UTC](https://meta.discourse.org/t/grant-badge-when-user-visits-link/276700 "2023-08-30T16:30:08Z")

</div>

How can I automatically grant a badge when the user visits a link within the discourse forum? ex: https://myforum.example.com?special\_access=true

---

## [The default badge queries](https://meta.discourse.org/t/the-default-badge-queries/276812)

<div class="topic-metadata">

**Author:** [@JammyDodger](https://meta.discourse.org/u/JammyDodger)\
**Replies:** 1\
**Last updated:** [August 27, 2023, 2:08pm UTC](https://meta.discourse.org/t/the-default-badge-queries/276812 "2023-08-27T14:08:35Z")

</div>

This is a reference guide for the SQL queries of the default badges, and their trigger information (where available). Core Badges :2nd\_place\_medal: Anniversary (This one has some extra backend magic in to choose the d…

---

## [Custom 'Scribe' badge](https://meta.discourse.org/t/custom-scribe-badge/276814)

<div class="topic-metadata">

**Author:** [@JammyDodger](https://meta.discourse.org/u/JammyDodger)\
**Replies:** 0\
**Last updated:** [August 27, 2023, 9:26am UTC](https://meta.discourse.org/t/custom-scribe-badge/276814 "2023-08-27T09:26:42Z")

</div>

The Scribe badge is a custom badge on meta as a little extra kudos for creating a guide in our documentation category. :memo: SELECT p.user\_id, MIN(p.created\_at) granted\_at, MIN(p.id) post\_id FROM badge\_posts p JOIN top…

---

## [Badge for posts with Likes from a specific group](https://meta.discourse.org/t/badge-for-posts-with-likes-from-a-specific-group/276728)

<div class="topic-metadata">

**Author:** [@fefrei](https://meta.discourse.org/u/fefrei)\
**Replies:** 22\
**Last updated:** [August 27, 2023, 5:09am UTC](https://meta.discourse.org/t/badge-for-posts-with-likes-from-a-specific-group/276728 "2023-08-27T05:09:40Z")

</div>

As already mentioned here: Grant a badge to everyone having posted at least \<POST\_COUNT\> posts in the category \<CATEGORY\_NAME\> that have received at least \<LIKE\_COUNT\> likes by users in the group \<TEAM\_NAME\>. Similar to…

---

## [What is the 'backfill\`?](https://meta.discourse.org/t/what-is-the-backfill/276788)

<div class="topic-metadata">

**Author:** [@Lilly](https://meta.discourse.org/u/Lilly)\
**Replies:** 3\
**Last updated:** [August 26, 2023, 10:03pm UTC](https://meta.discourse.org/t/what-is-the-backfill/276788 "2023-08-26T22:03:35Z")

</div>

I’m not fully grasping the backfill condition so I am going get Lola Bot to explain. :grin:

---

## [Categories and their Subcategories using OR](https://meta.discourse.org/t/categories-and-their-subcategories-using-or/276583)

<div class="topic-metadata">

**Author:** [@JammyDodger](https://meta.discourse.org/u/JammyDodger)\
**Replies:** 0\
**Last updated:** [August 25, 2023, 8:37am UTC](https://meta.discourse.org/t/categories-and-their-subcategories-using-or/276583 "2023-08-25T08:37:03Z")

</div>

Sometimes you want to find information about topics that are in certain categories, plus all the topics in those categories’ subcategories too. You can add the category\_id of each subcategory to your query, but this can …

---

## [Adding a date parameter](https://meta.discourse.org/t/adding-a-date-parameter/276158)

<div class="topic-metadata">

**Author:** [@JammyDodger](https://meta.discourse.org/u/JammyDodger)\
**Replies:** 2\
**Last updated:** [August 22, 2023, 1:10pm UTC](https://meta.discourse.org/t/adding-a-date-parameter/276158 "2023-08-22T13:10:09Z")

</div>

Often you will want to pull out data for a specific time period. You can do this by hard-coding in your time period into the query itself, but to make your report more future-proof you can add a date parameter: This qu…

---

## [Common Discourse data tips](https://meta.discourse.org/t/common-discourse-data-tips/276148)

<div class="topic-metadata">

**Author:** [@JammyDodger](https://meta.discourse.org/u/JammyDodger)\
**Replies:** 3\
**Last updated:** [August 22, 2023, 11:39am UTC](https://meta.discourse.org/t/common-discourse-data-tips/276148 "2023-08-22T11:39:00Z")

</div>

This is a good example of a couple of Discourse data quirks that can help you get more accurate results when building your queries. As most posts and topics are ‘soft-deleted’ when you delete them this means they will s…

---

## [Using VALUES or CASE to make your results more readable](https://meta.discourse.org/t/using-values-or-case-to-make-your-results-more-readable/276153)

<div class="topic-metadata">

**Author:** [@JammyDodger](https://meta.discourse.org/u/JammyDodger)\
**Replies:** 0\
**Last updated:** [August 22, 2023, 8:48am UTC](https://meta.discourse.org/t/using-values-or-case-to-make-your-results-more-readable/276153 "2023-08-22T08:48:14Z")

</div>

Sometimes when building a query with the data explorer you’ll find codes are used in the results rather than their textual equivalents. The field often has a key in the data explorer tree, but these don’t tend to be as u…

---

## [Useful links from the administration panel](https://meta.discourse.org/t/useful-links-from-the-administration-panel/276087)

<div class="topic-metadata">

**Author:** [@undasein](https://meta.discourse.org/u/undasein)\
**Replies:** 0\
**Last updated:** [August 21, 2023, 7:38pm UTC](https://meta.discourse.org/t/useful-links-from-the-administration-panel/276087 "2023-08-21T19:38:26Z")

</div>

I would like to know what links or sections admins usually use every time they log into the admin panel. Do you have a routine?

---

## [What unit on user\_visits.time\_read?](https://meta.discourse.org/t/what-unit-on-user-visits-time-read/238908)

<div class="topic-metadata">

**Author:** [@ganncamp](https://meta.discourse.org/u/ganncamp)\
**Replies:** 3\
**Last updated:** [August 17, 2023, 5:09am UTC](https://meta.discourse.org/t/what-unit-on-user-visits-time-read/238908 "2023-08-17T05:09:31Z")

</div>

It’s not obvious to me what the unit is on the read\_time column in the user\_visits table. I want to think it’s minutes, but looking at my data… I don’t really believe any one person has spent 224 minutes reading in my co…

---

## [Question about Community Health Statistics](https://meta.discourse.org/t/question-about-community-health-statistics/275377)

<div class="topic-metadata">

**Author:** [@LxmasWasntHere](https://meta.discourse.org/u/LxmasWasntHere)\
**Replies:** 1\
**Last updated:** [August 16, 2023, 12:48pm UTC](https://meta.discourse.org/t/question-about-community-health-statistics/275377 "2023-08-16T12:48:31Z")

</div>

I’ve been a admin lately on a forum and i got into the admin pages. I saw these “Anonymous Users” and “Crawlers” on our community health statics. I don’t know what these “Anonymous users” and “Crawlers” mean. Anyone kn…

---

## [Chat usage reports endpoint](https://meta.discourse.org/t/chat-usage-reports-endpoint/274973)

<div class="topic-metadata">

**Author:** [@hiddenseal](https://meta.discourse.org/u/hiddenseal)\
**Replies:** 1\
**Last updated:** [August 14, 2023, 6:45am UTC](https://meta.discourse.org/t/chat-usage-reports-endpoint/274973 "2023-08-14T06:45:51Z")

</div>

Is there an endpoint for reports related to chat activity? I’m interested in the number of messages sent in total, the number of messages per channel, and maybe even the number of reactions in total/each channel. I don’…

---

## [Report on # of emails sent doesn't show data older than 3 months](https://meta.discourse.org/t/report-on-of-emails-sent-doesnt-show-data-older-than-3-months/274972)

<div class="topic-metadata">

**Author:** [@hiddenseal](https://meta.discourse.org/u/hiddenseal)\
**Replies:** 2\
**Last updated:** [August 13, 2023, 10:38pm UTC](https://meta.discourse.org/t/report-on-of-emails-sent-doesnt-show-data-older-than-3-months/274972 "2023-08-13T22:38:04Z")

</div>

Is it supposed to be that “emails” report doesn’t show the data older than 3 months? Even if you ask for: /admin/reports/emails?end\_date=2023-08-13&start\_date=2021-01-01.json It gives you data only starting from May 15…

---

## [How are pageviews counted?](https://meta.discourse.org/t/how-are-pageviews-counted/269141)

<div class="topic-metadata">

**Author:** [@AryaM](https://meta.discourse.org/u/AryaM)\
**Replies:** 3\
**Last updated:** [August 3, 2023, 6:44pm UTC](https://meta.discourse.org/t/how-are-pageviews-counted/269141 "2023-08-03T18:44:17Z")

</div>

I am not sure if the number of pageviews are correct. The number of engaged users is actually quite less since I am not using the platform for a while. 250k pagesviews doesn’t make sense as number of users engaged daily…

---

## [How does Meta handle the bug reporter badge?](https://meta.discourse.org/t/how-does-meta-handle-the-bug-reporter-badge/273650)

<div class="topic-metadata">

**Author:** [@jordan-violet](https://meta.discourse.org/u/jordan-violet)\
**Replies:** 3\
**Last updated:** [August 2, 2023, 2:08pm UTC](https://meta.discourse.org/t/how-does-meta-handle-the-bug-reporter-badge/273650 "2023-08-02T14:08:30Z")

</div>

I know it happens when someone from Discourse likes the bug topic posted in Contribute \> Bug. Do ya’ll use a webservice for this and just listen for the first like on a new post, and just check to make sure it’s not like…

---

## [Search Logs - How to get a complete list for a given date range?](https://meta.discourse.org/t/search-logs-how-to-get-a-complete-list-for-a-given-date-range/272825)

<div class="topic-metadata">

**Author:** [@krystal](https://meta.discourse.org/u/krystal)\
**Replies:** 6\
**Last updated:** [August 1, 2023, 3:03pm UTC](https://meta.discourse.org/t/search-logs-how-to-get-a-complete-list-for-a-given-date-range/272825 "2023-08-01T15:03:20Z")

</div>

Is there a way to get a complete list of searches for a given date range, instead of just the top 100?

---

## [Web Crawlers](https://meta.discourse.org/t/web-crawlers/271767)

<div class="topic-metadata">

**Author:** [@anon65426961](https://meta.discourse.org/u/anon65426961)\
**Replies:** 11\
**Last updated:** [July 31, 2023, 7:57pm UTC](https://meta.discourse.org/t/web-crawlers/271767 "2023-07-31T19:57:34Z")

</div>

Heard on annother thread @simon mention that there is a setting to stop/smash crawlers, can’t find this setting how to do this does anyone know where this is and how it works? Had an unusual spike of 48 crawlers at my s…

---

## [User posts export as csv or text](https://meta.discourse.org/t/user-posts-export-as-csv-or-text/273232)

<div class="topic-metadata">

**Author:** [@kynic](https://meta.discourse.org/u/kynic)\
**Replies:** 5\
**Last updated:** [July 31, 2023, 12:20pm UTC](https://meta.discourse.org/t/user-posts-export-as-csv-or-text/273232 "2023-07-31T12:20:06Z")

</div>

Hi all, I want to export a user’s posts as a text/CSV file do anyone know how I can achieve this with data explorer or any other way?

---

## [Documentation of the entire database](https://meta.discourse.org/t/documentation-of-the-entire-database/272402)

<div class="topic-metadata">

**Author:** [@abhishek.agarwal1](https://meta.discourse.org/u/abhishek.agarwal1)\
**Replies:** 5\
**Last updated:** [July 24, 2023, 9:37am UTC](https://meta.discourse.org/t/documentation-of-the-entire-database/272402 "2023-07-24T09:37:00Z")

</div>

Hi, I’ve recently started performing analytics on the Community feature of our product. In the plugins, I can see the codes and the list of tables, which expands to the column name and type. However, there are many colum…

---

## [Data explorer query for events?](https://meta.discourse.org/t/data-explorer-query-for-events/272536)

<div class="topic-metadata">

**Author:** [@jordan-violet](https://meta.discourse.org/u/jordan-violet)\
**Replies:** 4\
**Last updated:** [July 23, 2023, 6:42pm UTC](https://meta.discourse.org/t/data-explorer-query-for-events/272536 "2023-07-23T18:42:34Z")

</div>

I have tried querying something as simple as this, to start: SELECT \* FROM discourse\_post\_event\_invitees WHERE post\_id = :post\_id Unfortunately I’m getting 0 results back for a post that I know has 15 users marked as G…

---

## [Unique visitors statistics](https://meta.discourse.org/t/unique-visitors-statistics/272387)

<div class="topic-metadata">

**Author:** [@Jonathan5](https://meta.discourse.org/u/Jonathan5)\
**Replies:** 1\
**Last updated:** [July 21, 2023, 12:31pm UTC](https://meta.discourse.org/t/unique-visitors-statistics/272387 "2023-07-21T12:31:31Z")

</div>

Continuing the discussion from Is there any Discourse based community who reached 100k daily visits?: This quotation is from a 2018 topic. Has anything changed since then? What I’d like really is “x unique visitors per…

---

## [What email addresses are configured?](https://meta.discourse.org/t/what-email-addresses-are-configured/272301)

<div class="topic-metadata">

**Author:** [@hellekin](https://meta.discourse.org/u/hellekin)\
**Replies:** 5\
**Last updated:** [July 21, 2023, 9:01am UTC](https://meta.discourse.org/t/what-email-addresses-are-configured/272301 "2023-07-21T09:01:57Z")

</div>

When you use email\_in functionality, you should keep track of what emails are configured and associated with a category or a group. This data-explorer query will show you a list of category slug or group name and associa…

---

## [Data Explorer query for topics N+ days old, that are unsolved](https://meta.discourse.org/t/data-explorer-query-for-topics-n-days-old-that-are-unsolved/272020)

<div class="topic-metadata">

**Author:** [@jordan-violet](https://meta.discourse.org/u/jordan-violet)\
**Replies:** 2\
**Last updated:** [July 19, 2023, 8:47am UTC](https://meta.discourse.org/t/data-explorer-query-for-topics-n-days-old-that-are-unsolved/272020 "2023-07-19T08:47:51Z")

</div>

I am trying to create a data explorer query that returns a list of topics, where: The topic is unsolved The topic is 7+ days old from the current date ran

---

## [Google Tag Manager (gtm) script blocked by CSP](https://meta.discourse.org/t/google-tag-manager-gtm-script-blocked-by-csp/270210)

<div class="topic-metadata">

**Author:** [@tyf](https://meta.discourse.org/u/tyf)\
**Replies:** 4\
**Last updated:** [July 3, 2023, 8:49pm UTC](https://meta.discourse.org/t/google-tag-manager-gtm-script-blocked-by-csp/270210 "2023-07-03T20:49:34Z")

</div>

Hi there! I’m having a hard time figuring out why our GTM script is being blocked by our CSP: Here’s the script: \<!-- Google Tag Manager --\> \<script\>(function(w,d,s,l,i){w\[l\]=w\[l\]||\[\];w\[l\].push({'gtm.start': new Da…

---

## [Displaying Average Response Time](https://meta.discourse.org/t/displaying-average-response-time/131265)

<div class="topic-metadata">

**Author:** [@Léo](https://meta.discourse.org/u/L%C3%A9o)\
**Replies:** 1\
**Last updated:** [October 21, 2019, 1:42am UTC](https://meta.discourse.org/t/displaying-average-response-time/131265 "2019-10-21T01:42:20Z")

</div>

Hi guys, newbie here, but very excited to start developing. A couple things to preface: when I say newbie, I mean that I have programmed before but I don’t know Ruby, Javascript, or SQL. I’m working on remedying that, bu…

---

## ["Googletagmanager.com" is still showing in uMatrix and uBlock plugins why? / how to remove?](https://meta.discourse.org/t/googletagmanager-com-is-still-showing-in-umatrix-and-ublock-plugins-why-how-to-remove/269880)

<div class="topic-metadata">

**Author:** [@agemo](https://meta.discourse.org/u/agemo)\
**Replies:** 5\
**Last updated:** [June 30, 2023, 12:52pm UTC](https://meta.discourse.org/t/googletagmanager-com-is-still-showing-in-umatrix-and-ublock-plugins-why-how-to-remove/269880 "2023-06-30T12:52:59Z")

</div>

No analytics are installed on the discourse but uBlock and uMatrix in Firefox is still seeing and reporting two instances of googletagmanager.com What’s going on here is it placeholder code?

---

## [Can I create a dashboard for a specific group inside the community?](https://meta.discourse.org/t/can-i-create-a-dashboard-for-a-specific-group-inside-the-community/269900)

<div class="topic-metadata">

**Author:** [@Tom\_Fridman](https://meta.discourse.org/u/Tom_Fridman)\
**Replies:** 3\
**Last updated:** [June 28, 2023, 1:27pm UTC](https://meta.discourse.org/t/can-i-create-a-dashboard-for-a-specific-group-inside-the-community/269900 "2023-06-28T13:27:01Z")

</div>

Sorry if it’s a bit irrelevant, I’m new to Discourse and trying to see if I can create a dashboard to review only 1 private group in the community.

[Previous page](https://meta.discourse.org/c/community-building/data-reporting/148.md?page=8)

[Next page](https://meta.discourse.org/c/community-building/data-reporting/148.md?page=10)
