Tagging and metrics in Discourse


(Anna Flessner) #1

@Hawk , that would be great.

  • Tagging and bringing in users with specific expertise into project comments and forum threads

Regarding tagging users based on expertise, skill etc. - I’ve read through this post Tagging your audience for segmentation

I have just added the staff notes plugin and am excited to test it out. I’m not the only staff member in our forum so it should be a good way to share information on users in addition to helping with tagging.

  • Creating a metrics dashboard

This I could use some more help on - as of right now I’ve been using the admin dashboard in discourse to gather information. Is the data explorer plugin worth using? This something that needs to be built up - what would you say are the most important metrics for a getting started point ?


Tracking the Lifecyle of Community Members
Introduce yourself (or at least just say hi)
(Sarah Hawk) #2

Definitely. It’s the only way you’ll be able to search across your staff notes.

Here’s the query that you’ll need:

WITH psr AS (
 SELECT regexp_matches(plugin_store_rows.key, '[0-9]+') AS psr_key_value
   , plugin_store_rows.plugin_name AS psr_plugin_name
   , plugin_store_rows.value AS psr_value
 FROM plugin_store_rows
)
SELECT users.id 
 , users.username
 , users.email
FROM users 
JOIN psr
ON
 users.id = CAST (array_to_string(psr.psr_key_value, '') AS int)
WHERE 
  psr.psr_plugin_name LIKE 'staff_notes'
AND  
  psr.psr_value LIKE '%[staff_note_goes_here]%'

The most powerful use of Data Explorer that I’ve discovered is for finding out what people are reading (so I can help target the right resources and send them their way). For that I use this query (courtesy of @mcwumbly):

-- [params]
-- integer :user = 1
-- integer :since_days_ago = 7

with topic_timing as (
  select user_id, topic_id, sum(msecs) / 1000 as seconds
  from post_timings
  where user_id = :user
  group by user_id, topic_id
)
SELECT tv.topic_id,
    tv.user_id,
    tv.viewed_at,
    tt.seconds
from topic_views tv
left join topic_timing tt
on tv.topic_id = tt.topic_id
and tv.user_id = tt.user_id
where tv.user_id = :user
and viewed_at + :since_days_ago > CURRENT_TIMESTAMP
order by seconds desc 

These are the things that I measure and where I source the info:

  1. new (not return) visitors to the entire site (Google Analytics)
  • new registrations to the community for the period (I download all members from /admin/users/list/new and dump them into a spreadsheet which I then sort by created_at to pull out the members for that period only)
  • newcomer to registration conversion rate (2. divided by 1.)
  • new members that made a contribution (I re-sort the above spreadsheet by post_count)

  • % new members that made a contribution (4. divided by 2.)
  • Active members (I get this from platform community-analytics.com but you could get it from /users if you sort by Replies)
  • Total members (this is really just a vanity metric but you can get it from the Discourse dashboard)
  • Total posts less mine (Total comes from the Dashboard, mine comes from /users)

Does that help?


(Alessio Fattorini) #3

http://discoursemetrics.com and https://community-analytics.com help you to avoid doing it manually.


(Anna Flessner) #4

@HAWK, yes this super helpful! Thank you!

Measuring activity in our community is slightly tricky since we have a dedicated forum as well as a platform for creating simulation projects. When a project is created - it also creates a topic in the “project category” in our forum (which is basically hidden) and the reason we’ve done this is to allow users to comment on projects using the discourse editor.

So in my mind we have two areas of engagement, one being in the forum and the other being the creation and commenting on public projects

My idea is I guess is to measure both active members in the forum and active members who are creating and commenting on public projects.

So forum activity + public project activity = “Total community activity”

@ale_fattorini, I’ve tried joining discoursemetrics.com (it’s in beta phase right?) - haven’t heard back from them yet. Community-analytics is a great resource!


(Sarah Hawk) #5

Sounds like a solid strategy.

Let’s call @DiscourseMetrics into this convo then!


(Anna Flessner) #6

Thanks @HAWK!


(Jørgen) #7

Hi @aflessner, glad to see you got set up with DiscourseMetrics. Sorry about the delay before your invitation arrived :slight_smile:

Thanks for the heads up, @HAWK :slight_smile:


(Anna Flessner) #8

@HAWK, @ale_fattorini

First time trying to use the Data Explorer and I’m running into an error, am I making a rookie mistake?


(Sarah Hawk) #9

Hey @aflessner
That’s an easy one to fix. :slight_smile:

Remove the first line (SELECT 1). That is the placeholder/prompt text for writing a new query.


(Anna Flessner) #10

@HAWK, ooops - I figured it would be something simple :wink: Thanks for the help


(Sarah Hawk) #11

Any time. :slight_smile: