# Discourse Narrative Bot Data Explorer Queries 🤖

**URL:** https://meta.discourse.org/t/discourse-narrative-bot-data-explorer-queries/63060
**Category:** Data & reporting
**Tags:** discobot, sql-query
**Created:** [May 20, 2017, 11:54am UTC](https://meta.discourse.org/t/discourse-narrative-bot-data-explorer-queries/63060 "2017-05-20T11:54:49Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [May 20, 2017, 11:54am UTC](https://meta.discourse.org/t/discourse-narrative-bot-data-explorer-queries/63060/1 "2017-05-20T11:54:49Z")

</div>

In the interest of tracking user interaction with `@discobot`, here are are some [data explorer](https://meta.discourse.org/t/32566?silent=true) queries.

If anyone can think of a way to actually show a percentage progress through the track that would be awesome! But as far as I can see there’s no info about the sequence of `states` in the database ☹

To use these queries, download the one you want, and import into the [Data Explorer Plugin](https://meta.discourse.org/t/data-explorer-plugin/32566)

# All User Interactions

[all-narrative-bot-interactions.dcquery.json](https://global.discourse-cdn.com/meta/original/3X/a/a/aa6d76441110c03082da08c7cf30102366044b5d.json) (1.6 KB)

Shows a list of all users that have interacted with `@discobot` in the last year (configurable) and shows their current state in the track:

 ![](https://global.discourse-cdn.com/meta/original/3X/0/c/0c1a09a7f864c3b17efcae8adb8fdccac4b7b0bc.png)

# Summary of Interactions

[narrative-bot-summary.dcquery.json](https://global.discourse-cdn.com/meta/original/3X/4/f/4f2f83ce7a6c6257ba7fa837f61ba038880a7b97.json) (1.6 KB)

Shows all interactions with discobot in the last year (configurable), grouped by `current_state`. This can be used to see which `state` users got stuck on. Results will look something like this:

 ![](https://global.discourse-cdn.com/meta/original/3X/6/c/6c4e95ed8407ea88dfda7300ca2148992cd42330.png)

* * *
I've made this post a wiki, so others can add any `@discobot` related queries they come up with

---

<div class="post-metadata">

### Author: ![mcwumbly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcwumbly/32/103861_2.png) [@mcwumbly](https://meta.discourse.org/u/mcwumbly)
#### Post date: [May 20, 2017, 12:28pm UTC](https://meta.discourse.org/t/discourse-narrative-bot-data-explorer-queries/63060/2 "2017-05-20T12:28:15Z")

</div>

> [@david](#):
>
> If anyone can think of a way to actually show a percentage progress through the track that would be awesome! But as far as I can see there’s no info about the sequence of states in the database ☹

Can you summarize the number of completed steps and divide that by the total number of steps?

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [May 20, 2017, 12:29pm UTC](https://meta.discourse.org/t/discourse-narrative-bot-data-explorer-queries/63060/3 "2017-05-20T12:29:17Z")

</div>

As far as I can tell, previously completed steps aren’t stored. All we’ve got is a string describing the “current state”. And that string has no info about the position of that state in the track

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [May 20, 2017, 1:35pm UTC](https://meta.discourse.org/t/discourse-narrative-bot-data-explorer-queries/63060/4 "2017-05-20T13:35:13Z")

</div>

I’ve added another query (see first post) which groups by current\_step. I’m thinking this might be useful to show which step of the track users get stuck on. I don’t have many new users on my community since introducing discobot, but I’d be interested to see what data other people get! 🙂
