Skip to main content

Set up stat cycle configuration - Weekly leaderboard - (Unity module)

Last updated on June 11, 2024

Configure weekly stats cycle

You will now configure a statistics (stats) cycle in the AccelByte Gaming Services (AGS) Admin Portal. A stats cycle is a period of time to store your stats (e.g. weekly, monthly). You will need it to display your weekly periodic leaderboard.

  1. Log in to the AGS Admin Portal and go to your game namespace dashboard.

  2. Go to Progression & Inventory > Statistics > Cycles and click Add Cycle.

  3. On the pop-up window that appears, create your statistics cycle using the configuration below. Once done, click Add.

    • Cycle Name: the name of your statistics cycle. Set it to unity-weekly.
    • Cycle Description: the description of your statistics cycle. Set it to Unity Weekly Statistics Cycle.
    • Start Date: the date when this cycle starts. Set it to the current date.
    • End Date: the date when this cycle ends. Leave it empty, as this will make the cycle valid forever.
    • Cycle Type: the type of the statistics cycle. Set it to Weekly.
    • Reset Day: the day when the cycle should reset. Set it to Monday, so it resets every Monday.
    • Reset Time: the time when the cycle should reset. Set it to 00:00, so it resets at the beginning of the day.
  4. Click View next to the cycle you just created to enter its details, as you will need to add your stats to be managed by your new cycle.

  5. Scroll down until you see the Statcode List table. This table is the list of the statistics that are managed by the statistics cycle. Click Stat Code to add your statistics to the list.

  6. On the pop-up that appears, add all the statistics you created in Stat tracking and display. Once done, click Add.

Configure weekly periodic leaderboard

You will now create a weekly periodic leaderboard by using the statistics cycle you created.

  1. Log in to the AGS Admin Portal and go to your game namespace dashboard.

  2. Go to Engagement > Leaderboard. There, you will the leaderboards you created. To make a weekly periodic leaderboard, you need to bind the statistics cycle to the leaderboard.

  3. Locate the Cycle(s) attribute and click on the Pencil icon.

  4. On the pop-up that appears, add your statistics cycle you created earlier and hit the Update button.

  5. Now, repeat the steps above to bind the statistics cycle for all other leaderboards.

Reset periodic leaderboard

Your periodic leaderboard will reset based on the cycle configuration defined in your statistics cycle, but you can also manually reset them by following these steps.

  1. Log in to the AGS Admin Portal and go to your game namespace dashboard.

  2. Go to Engagement > Leaderboard and open the targeted leaderboard details by clicking View next to it.

  3. Modify the leaderboard cycle by clicking on the Pencil icon next to the Cycle(s) attribute.

  4. On the pop-up that appears, delete the desired statistics cycle from the leaderboard by clicking on the X icon. Then, click Update.