Skip to content
Blog

FiveM player retention: see who comes back and who stopped

Measure FiveM player retention: new and returning players, day 1, 7 and 30 retention, weekly cohorts and peak hours, with SQL or FiveDock’s Growth tab.

By Termi

4 min read
  • Players
  • Retention
  • Analytics
On this page

A FiveM server with 80 players at peak can look healthy while it loses most of its new players after one evening. The player count only shows who is online. Retention shows whether the people who found you last week are still playing, and it usually tells you about a problem weeks before the evening peak starts to drop.

What to measure

  • New and returning players per day. A steady count made of fresh faces every day means the server keeps nobody.
  • Retention after 1, 7 and 30 days. Of the players who joined for the first time, how many played again that many days later or after.
  • Weekly cohorts. Players grouped by the week they first joined, and the share of each group that played in every later week. A cohort that drops faster than the others points at something that changed that week.
  • First-day length. New players who leave within 10 minutes and never return usually got stuck in the queue, the character creator or the whitelist.
  • Peak hours. When your players are actually online, so restarts and events land at the right time.
  • Regulars who stopped. Someone who played four days a week for a month and then vanished is worth a message.

Track it yourself

All of this comes from one fact: which player played on which day. A table with one row per player per day is enough:

player_days.sql
CREATE TABLE player_days (
  license VARCHAR(64) NOT NULL,
  day DATE NOT NULL,
  PRIMARY KEY (license, day)
);

Fill it from a server script when a player joins. This uses oxmysql and the player’s Rockstar license as the ID:

server.lua
AddEventHandler('playerJoining', function()
  local license = GetPlayerIdentifierByType(source, 'license')
  if not license then return end
  MySQL.insert('INSERT IGNORE INTO player_days (license, day) VALUES (?, UTC_DATE())', { license })
end)

A player who stays online past midnight UTC is counted on the day they joined only, which is close enough for retention. Then day 7 retention for new players of the last 90 days is one query on MySQL or MariaDB:

retention.sql
SELECT
  COUNT(*) AS new_players,
  SUM(last_day >= first_day + INTERVAL 7 DAY) AS back_after_7_days
FROM (
  SELECT license, MIN(day) AS first_day, MAX(day) AS last_day
  FROM player_days
  GROUP BY license
) AS players
WHERE first_day BETWEEN UTC_DATE() - INTERVAL 90 DAY
                    AND UTC_DATE() - INTERVAL 7 DAY;

Change the 7 to 1 or 30 for the other two numbers. Divide back_after_7_days by new_players and you have the share.

Leave out the last 7 days from the new players. Someone who joined yesterday can’t have come back after a week yet, and counting them makes retention look worse than it is.

The Growth tab in FiveDock

FiveDock builds the same table from the joins and drops its agent already records for the Black Box, and keeps it for 400 days, longer than the logs. Open a server and pick the Growth tab next to Roster and Console.

  • Free shows new and returning players per day for the last 30 days.
  • City adds retention after 1, 7 and 30 days, weekly cohorts, how long new players’ first day lasted and how many came back, and a peak hours chart in your time zone.
  • Metro and Enterprise name the regulars who stopped coming (four or more days in five weeks, then nothing for 7 to 30 days) and put them in the weekly digest, next to the resources that changed on the server just before they left.

That last list is the useful one when a new script broke something for a group of players who never opened a ticket. See it on the pricing page.

Common questions

What is good retention for a FiveM server?

There is no shared benchmark for FiveM. Compare your server with itself: the same week last month, or the cohort before a big update. A cohort that falls off faster than the ones before it is the signal to look at.

Does this work on a whitelisted server?

Yes, and the first-day numbers matter even more there. A player who passed the whitelist and then left within 10 minutes usually hit a problem with the character creator or the starting area.

Which identifier should I count players by?

The Rockstar license is on every player and doesn’t change with a new Discord or Steam account. Characters are not players: one license with three characters is still one person.

All articles