# Discourse Gamification

**URL:** https://meta.discourse.org/t/discourse-gamification/225916
**Category:** Plugin
**Tags:** official, gamification, included-in-core
**Created:** [May 2, 2022, 7:14pm UTC](https://meta.discourse.org/t/discourse-gamification/225916 "2022-05-02T19:14:25Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![Discourse](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/discourse/32/148734_2.png) [@Discourse](https://meta.discourse.org/u/Discourse)
#### Post date: [May 2, 2022, 7:14pm UTC](https://meta.discourse.org/t/discourse-gamification/225916/1 "2022-05-02T19:14:25Z")

</div>

| | | |
| --- | --- | --- |
| :discourse2: | **Summary** | **Discourse Gamification** adds customizable scoring (karma, kudos, points) and leaderboards to your instance. |
| 📖 | **Install Guide** | **This plugin is bundled with Discourse core**. There is no need to install the plugin separately. |
| 🧪 | **Demo** | [Leaderboard](https://meta.discourse.org/leaderboard/1) |

> [@](#):
>
> :discourse2: As this is an #official plugin maintained by the Discourse team, #Support, #Contribute > Bug, #Contribute > UX, and #Contribute > Feature requests can be made in the respective categories here on Meta, and tagged with the appropriate plugin tag. Click on a link below to get one started. 👍
> 
> [❓&nbsp; **Support**](https://meta.discourse.org/new-topic?category_id=6&body=%3E%20Before%20asking,%20did%20you%20search%20first%3F%20Press%20%F0%9F%94%8D%20at%20the%20upper%20right%20to%20search.&tags=gamification "Ask for support on configuring and using Discourse Gamification") [🐛&nbsp; **Bug**](https://meta.discourse.org/new-topic?category_id=1&tags=gamification "A bug report means something is broken, preventing normal/typical use of the plugin") [👀&nbsp; **UX**](https://meta.discourse.org/new-topic?category_id=9&tags=gamification "Discussion about the user interface of Discourse Gamification, and how features are presented (including language and UI elements)") [💡&nbsp; **Feature**](https://meta.discourse.org/new-topic?category_id=2&tags=gamification "Discussion about how existing Discourse Gamification features can be improved or enhanced, and how proposed new features could work")

 ![image](https://global.discourse-cdn.com/meta/original/4X/6/a/0/6a0ba940d7912795e41787feb5ab6dc5e84fe3ea.png)

### Features

While Discourse ships, out of the box, with gamification features (badges, trust levels) some communities want to take it to another level. That’s where [GitHub - discourse/discourse-gamification · GitHub](https://github.com/discourse/discourse-gamification) comes in.

This plugin allows admins to easily create and tweak community scoring contests, where points are awarded by participating in the community.

Points are automatically updated every hour for events of the day, and we re-calculate scores from the last 10 days once a day.

#### Cheers

Users are awarded “cheers” by performing certain actions on the community. Each user cheer score appear on their user card, user profile and can be enabled on the user directory.

 ![user card example with cheers](https://global.discourse-cdn.com/meta/original/4X/a/7/b/a7bfe2f5d0061f38d44fae9e00211637e8e22c70.jpeg)

 ![user profile example with cheers](https://global.discourse-cdn.com/meta/original/4X/f/8/3/f83ee054e22bd8d04ed8bb596b7769903596dd6b.jpeg)

 ![user directory example with cheers](https://global.discourse-cdn.com/meta/original/4X/5/f/a/5fa5cbac6b82262791f2ba985037de243bb1af02.png)

Like the plugin but the name cheers isn’t the best for your community? You can rename it to anything using [Customize all text in Discourse](https://meta.discourse.org/t/customize-all-text-in-discourse/36092).

#### Leaderboards

 ![image](https://global.discourse-cdn.com/meta/original/4X/1/d/4/1d4db97176d4ae8cbe74a7c34084926bf37f1a79.png)

Admins can create multiple leaderboards, and each one can have a custom:

- start date
- end date
- Competing users
- Leaderboard privacy

By default, we ship with a default leaderboard at `/leaderboard` that will list all users from the first day where scores started to be awarded.

You can see a demo of it at [Discourse Meta](https://meta.discourse.org/leaderboard/1)

#### Scorables

Currently, the following events award cheers:

- Daily visits
- Flags accepted
- Likes given
- Likes received
- Posts created
- Posts read
- Solutions accepted (requires [Discourse Solved (Accepted answer plugin)](https://meta.discourse.org/t/discourse-solved-accepted-answer-plugin/30155))
- Time read
- Topics created
- User invites accepted

See [roadmap](https://meta.discourse.org/t/discourse-gamification/225916#roadmap-10) for upcoming scorables.

### Score backfill

You can run a backfill to calculate the historical scores through the UI using the ‘Recalculate Scores’ button on your `/admin/plugins/gamification` page:

 ![recalculate scores - button](https://global.discourse-cdn.com/meta/original/4X/c/9/4/c94346f279c73a6a7d73fb90c4a40afd5426dda3.png)

This can also be used to recalculate the leaderboard if you make any changes to your scorables or eligible scoring categories. You can generate a rescore up to 5 times a day, and can select a range of time frames (or set a custom one):

 ![select timeframe](https://global.discourse-cdn.com/meta/original/4X/5/d/0/5d0566c206e584d49d721c27d8aac5947e1666be.png) ![timefarne options](https://global.discourse-cdn.com/meta/original/4X/4/d/e/4de7a40d1cc88217654798a402a359a61adbd64b.png)

### Configuration

Global customizations are:

- each action score multiplier
- Restrict categories where points can be earned
- enable and disable the plugin

Those plugin-level settings live at `/admin/site_settings/category/plugins?filter=plugin%3Adiscourse-gamification`.

To create, delete and update leaderboards, admins can visit `/admin/plugins/gamification`.

### Use as widget

This can also be displayed as a widget in a smaller format, inside the [Right Sidebar Blocks theme component](https://meta.discourse.org/t/right-sidebar-blocks/231067). More info to be found there.

### Badges based on score

You can have automatic badges based on the gamification score using [Enable Badge SQL](https://meta.discourse.org/t/enable-badge-sql/47894)

Here is an example badge when a user has over 9000 cheers:

```sql
SELECT user_id, current_timestamp AS granted_at 
FROM gamification_scores
WHERE (:backfill OR user_id IN (:user_ids))
GROUP BY 1
HAVING SUM(score) > 9000

```

### Changelog

- 2022-05-02T03:00:00Z - Public Release
- 2022-05-10T05:00:00Z - Update roadmap with recent changes

### Roadmap

(roughly ordered)

- Make leaderboard respect `prioritize usernames in ux` being disabled

- Use higher resolutions avatars in leaderboard podium

- Add custom per-badge scoring

- Add per-reaction score awarding (requires [Discourse Reactions](https://meta.discourse.org/t/discourse-reactions-beyond-likes/183261))

- Add chat-events scoring (requires [Discourse Chat](https://meta.discourse.org/t/discourse-chat/230881))

- Add poll events scoring (created poll, voted in poll)

- Add media events scoring (posted image, posted video, posted onebox)

Implemented:

- ~~Fix i18n table title in custom score column on user directory~~
- ~~Ignore staged users~~
- ~~Ignore anonymized users (email match `@anonymized.invalid`)~~
- ~~Style leaderboard edit form~~
- ~~Leaderboard “you” link needs a larger offset to accommodate floating header..~~
- ~~Fix highlight of own user on the leaderboard not working if own user position is \> 100~~
- ~~Add i18n thousands separator to user card / profile cheer score~~
- ~~Add time period filters to leaderboards~~
- ~~Add default time period filter to leaderboard settings~~
- ~~Add `excluded_groups_ids` to leaderboard settings~~
- ~~Allow admins to award/remove arbitrary points to users to allow integration with out-of-Discourse scorable events~~
- ~~Make scores click link to leaderboard (both in user profile and user card)~~

> :discourse2: Hosted by us? This plugin is available on our Business and Enterprise plans [Gamification | Discourse - Civilized Discussion](https://discourse.org/plugins/gamification.html)

> Last edited by @tobiaseigen 2025-07-16T21:11:22Z
> 
> > **Check document**
> >
> > Perform check on document:

---

_[View the full topic](https://meta.discourse.org/t/discourse-gamification/225916)._
