Use player drop-off data to find where players leave or get stuck, then fix the one leak that costs you the most players.
Your game is live. The front page is getting clicks, are joining — and then something is eating them between minute one and minute five. You have no bug report, no angry comment, just a hunch. Funnel analysis turns the hunch into a number: a list of the stages every passes through, a count at each stage, and the drop between them. The biggest drop is not a feeling — it's the place your game is losing people.
Write down what a does, in order, from the moment they join to the moment they close the tab. For a clicker that is roughly: joined → first coin → first upgrade → first shop buy → came back tomorrow. That ordered list is your funnel, and the count of who never reach stage n+1 is the drop-off at stage n.
One rule decides whether a stage is worth counting: it must be something the server already decided happened. "The server awarded a first coin" is a fact. "The clicked the button" is a claim — and a client that reports its own progress is a claim anyone can fake. Stage names come from the code you already wrote.
You're picking the stages for a clicker's funnel. Which list is one you can actually act on?
The whole funnel is two . counts holds how many reached each stage; seen holds which stages a given already reached, so a who clicks the coin button fifty times still counts as one first coin. Without that second your funnel measures enthusiasm, not .
local counts = {
joined = 0,
firstCoin = 0,
firstUpgrade = 0,
shopBought = 0,
}
local seen = {} -- stage -> true, keyed by player
local function mark(player, stage)
local reached = seen[player] or {} -- empty the first time
if reached[stage] then return end -- already counted it once
reached[stage] = true
seen[player] = reached -- remember it for this player
counts[stage] += 1
end
counts is a fresh table with no keys yet. Complete the increment so the first player to reach a stage makes it 1: counts[stage] = (counts[stage] or ) + 1
Read seen[player] or {} and counts[stage] or 0 as the same idea: "the value we have, or a fresh one if this is the first time." The or 0 default is the one that saved your coin saves in the lesson — new , no value yet. Drop either default and the first through mark errors on a nil index.
You drop the seen table and count every click as a first coin. What does the funnel say?
Here is the version that gets you ratio-banned. A client reports its own progress, and the server believes it:
progressEvent.OnServerEvent:Connect(function(player, stage)
counts[stage] += 1
end)
An exploiter fires that remote ten thousand times and your funnel says you have the best retention in the platform. It isn't a security bug you have to patch later — it's the same trust boundary from the security audit lesson, showing up as bad data instead of free coins.
Delete the remote and the handler, and replace them with a single line that counts from the server's own reward code.
Every call site is a line the server was going to write anyway: the join handler, the award-a-coin handler, the purchase handler. A funnel is a by-product of a game that already works, not a second version of your game.
Counting in memory is free. Writing is not: Roblox throttles traffic hard, and the same key can only be written about once every six seconds. A mark() on every click is a locked-out key and a warning in the output — the exact failure the lesson warned you about, arriving through the front door.
So the counters live in memory and a timer writes them out:
local DataStoreService = game:GetService("DataStoreService")
local funnelStore = DataStoreService:GetDataStore("FunnelCounts")
local function flush()
local ok, err = pcall(function()
funnelStore:UpdateAsync("daily", function(old)
-- add today's counts on top of what is already stored
local stored = old or {}
for stage, n in counts do
stored[stage] = (stored[stage] or 0) + n
end
return stored
end)
end)
if not ok then warn("funnel flush failed: " .. tostring(err)) end
end
task.spawn(function()
while true do
task.wait(30)
flush()
end
end)
game:BindToClose(flush) -- the last write of the session
Write the line that runs flush() every 30 seconds, forever, without freezing the server.
task.spawn(function()
-- your loop here
end)UpdateAsync and not SetAsync: the read-modify-write happens on Roblox's side, so two servers flushing at the same moment add up instead of overwriting each other. Never flush a count with SetAsync — you just lost the other server's numbers.
Here is the trap that makes people argue about numbers that both look fine. Raw counts always slope downward, because there are fewer at every stage — the first stage has the most by definition, and a big absolute drop there is just a wide top, not a leak. What tells you where the game breaks is the step conversion: this stage as a share of the one before it.
local STAGES = { "joined", "firstCoin", "firstUpgrade", "shopBought" }
local function report(counts)
local base = counts[STAGES[1]]
for _, stage in STAGES do
local n = counts[stage] or 0
print(string.format("%-14s %5d %5.1f%%", stage, n, n / base * 100))
end
end
Write report(stages, counts) so it prints one line per stage: the stage name, its count, and that count as a percentage of the first stage, formatted to one decimal (12.0%). Four stages in, four lines out.
The report reads: joined 1000 (100.0%), firstCoin 940 (94.0%), firstUpgrade 120 (12.0%), shopBought 15 (1.5%). Where is the leak?
A drop-off tells you who left. It says nothing about the who stayed, opened the shop, and then stood there for six minutes buying nothing. That second group is stuck — and the fix is never the same. A leak needs a reason to keep going; a wall needs to be crossed.
You cannot see a stall in a funnel that only counts milestones, because the never failed a stage — they hovered inside one. So split the step into its two halves and count both:
-- the two halves of the shop step
shopOpened.OnServerEvent:Connect(function(player) mark(player, "shopOpened") end)
-- ...inside the purchase handler, after the balance check
mark(player, "shopBought")
800 who opened the shop and 41 who bought one is not a drop-off problem. Everyone arrived; 95% of them hit a wall. Move the price, add a preview of what the upgrade does, or put the first affordable item where they land.
To separate 'left' from 'stuck', count both halves of the step: mark(player, 'shopOpened') when the panel opens, and mark(player, '') inside the purchase handler.
200 players reach the shop, 180 buy something, 20 leave instead. Which is it?
A funnel turns a hunch into a claim, and a claim is only worth something if you can lose it. Write the hypothesis down before you touch the code — one line, with a number in it:
leave between firstCoin and firstUpgrade because the upgrade panel is behind a menu they never find. I will move the upgrade button to the main HUD and watch the 12.0% figure.
Then change one thing. Not the price, the panel, and the tutorial — with three changes and one metric, a number that moves tells you nothing about why. This is the same discipline as the red-green in the testing lesson: one claim, one change, one number, checked again.
Twenty is a rumor, not a data set. Day-one numbers swing wildly, a small sample makes a 5% swing look like a trend, and a stage you can only count once a week cannot tell you about the change you shipped on Tuesday. Read the shape of the funnel early, act on the big cliffs, and make real decisions once the counts are in the hundreds. Roblox's own analytics page will do this for you for free — your funnel's job is to tell you which stage to go look at.
Write your hypothesis in one line: which stage you think loses players, what you think is causing it, and the number you will watch to find out.
-- Players leave ____ because ____. I will watch ____.Your funnel checklist, before you trust the numbers:
BindToClose, never every mark.None of this needs a new system. Every mark() call is a line inside code you already wrote, the counters ride in the same habit as your saves, and the report is a twenty-line module. Measuring a game well is a by-product of a game that is already easy to read.
Next up: the save , assembled end to end from shuffled lines — because a funnel counts a session that only lasts if the save is right.