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
- 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
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:
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:
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:
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.
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.