> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.drimify.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Player leaderboard

|| **The leaderboard feature is an add-on.**

It allows participants to see where they rank relative to other users:

* During the game experience, if the leaderboard is displayed via the share link or separate integration code
* At the end of the experience, if the leaderboard is activated, it will be available through a button on the final screen

# Configuring the leaderboard

You can configure the leaderboard in the **settings** creation step. You can manage different elements of the table:

* **Participant display:** the way the player's name is displayed in the table: full name, abbreviated name, unique identifier, user name, anonymous, custom format or based on a file you provide in JSON format

* **Maximum number of entries:** how many entries and lines in the table are to be displayed in the ranking between 5 and 100.

* **Score aggregation:** in the event that a participant plays several times, you choose the score aggregation method: based on the unique identifier, email address, user name, or phone number (or not to aggregate the scores)

###### Leaderboard timeframe

The **Leaderboard Timeframe** setting allows you to define the period of time for which player scores and results are displayed. By selecting a specific timeframe, you can highlight performance based on daily, weekly, monthly, or fully customised periods.

###### Available options:

* **All Time** – Displays all results since the leaderboard was first activated.
* **Current Day** – Shows scores only from today.
* **Previous Day** – Shows scores from yesterday.
* **Current Week** – Displays results from the ongoing calendar week.
* **Previous Week** – Displays results from the last calendar week.
* **Current Month** – Displays results from the ongoing calendar month.
* **Previous Month** – Displays results from the last calendar month.
* **Current Quarter** – Displays results from the ongoing calendar quarter.
* **Previous Quarter** – Displays results from the last calendar quarter.
* **Current Year** – Displays results from the ongoing calendar year.
* **Previous Year** – Displays results from the last calendar year.
* **Custom Dates** – Lets you manually select a start and end date to define the leaderboard timeframe.
* **Relative Period** – Allows you to set a rolling period (for example, the last 7 days, last 30 days, etc.), independent of fixed calendar dates.

# Filter the Leaderboard by Date (Query String Parameters)

It is possible to display the leaderboard for a specific date range by adding query string parameters to your game URL.
## Available Parameters

You can use the following parameters:
* `leaderboardStart`
* `leaderboardEnd`

These allow you to define a custom start and end date for the leaderboard results displayed.

## Example

```
https://yourgameurl.com?leaderboardStart=2024-01-01&leaderboardEnd=2024-01-31
```

In this example, the leaderboard will only display results between **January 1, 2024** and **January 31, 2024**.

## Important Notes

* Dates must be formatted as: `YYYY-MM-DD`
* Both parameters can be used together to define a specific period
* If no parameters are provided, the default leaderboard configuration will apply
* These parameters must be added to the end of your game URL


Various additional display options:

* Display time
* The number of entries
* Do not display leaderboard button on end screen
* A button below the leaderboard to return to the start of the app
* The leaderboard can also have its own deactivation date, which will be different from that of the application.

### What does it consist of?

At the top of the table is the number of participants (if applicable), then the leaderboard visible to participants, in column order, goes:

* The participant's position in the ranking
* Their user name (anonymous, full name, abbreviated name, unique identifier, etc.)
* Their score
* Time (if activated)

|| Note that in the event of a tie on score, time taken is the most common tie-breaker.

### What does a leaderboard look like?

Take a look at [an example of a leaderboard in production](https://apps.drimify.com/3gpfk4kA/?l=1).

![Example of a leaderboard](https://storage.crisp.chat/users/helpdesk/website/b5930908db9b0800/screenshot-77_92skub.png)

# How often is the leaderboard updated?

The leaderboard is updated automatically and in real time after each new entry.

# Where can I find the link to share the leaderboard and the integration code?

A unique **URL** for the leaderboard is available in the **publish** creation step of your game or interactive module, and can be found in the **direct link** section.

You can embed the leaderboard on a specific page of your website, or distribute it via a button in a newsletter. You can also display the leaderboard on a separate screen to keep track of scores in real time.

The code for embedding the leaderboard is available just below, also in the **publish** creation step, in the **HTML iframe embed code** section.

![URL and embed code for the leaderboard](https://storage.crisp.chat/users/helpdesk/website/b5930908db9b0800/screenshot-78_1lyy6sc.png)