Lesson 4 of 6
Analytics: funnels, economy events, retention
Measure a Roblox game with Beacon Yard's real analytics code, covering custom, funnel, journey and economy events, the dashboards, retention metrics and the limits that shape what you log.
By the end you can
- Choose between custom, funnel, journey and economy events, and send each from the server with the right arguments
- Read Beacon Yard's onboarding funnel and coin economy events, and say what each dashboard chart would show
- Explain D1, D7 and D30 retention and the limits that keep events cheap and charts readable
Before this: Monetization: products, passes, subscriptions, economy, ProfileStore: the library pros use
Step 1 of 12
A dashboard with nothing on it
Open Creator Hub's analytics page for a brand-new private experience and every card is empty. No sessions, no retention, no economy. That is expected: AnalyticsService events can only be sent from a live server in a published game, never from the client or from Roblox Studio1. To verify your events before launch, join a published private server through the Roblox client and open View Events on the Economy, Funnel or Custom page for a near real-time list; full charts take up to 24 hours, and the complete dashboard needs more than 10 daily active users and 10 play hours for 7 days in a row23.
So the work of this lesson happens before launch: deciding which questions you will ask, and sending the events that answer them. Nobody can add data about last week afterwards.
You press Play in Studio on a published place, collect coins, and check Creator Hub's Analytics page. Why did no events arrive?
Press 1 to 4 to choose, Enter to check.
Step 2 of 12
Four kinds of event
Roblox's AnalyticsService takes four kinds of event, and each has its own dashboard page3.
| Kind | Method | Question it answers | Beacon Yard example |
|---|---|---|---|
| Custom | LogCustomEvent | How often does X happen? | round_started with the round length |
| Funnel | LogOnboardingFunnelStepEvent, LogFunnelStepEvent | Where do players stop in a linear flow? | Joined, FirstCoin, StartedDrill, SurvivedDrill, FirstPurchase |
| Journey | LogJourneyEvent | Which branching paths do players take? | Not used (Beacon Yard's onboarding is a straight funnel) |
| Economy | LogEconomyEvent | Where does currency come from and go? | Coins from a pickup, coins spent on Speed |
Every call is made on the server, for a Player, after something really happened. The docs warn to log after a successful operation: an economy event for a purchase that failed makes the charts lie4.
Match each question to the kind of event.
Step 3 of 12
Custom events
LogCustomEvent(player, name, value?) counts an event and, if you pass a value, sums, averages and bounds it. At m06 the game logged round_started with the round length. A game can have up to 100 custom event names, and the docs advise custom fields instead of new names whenever you can, because the limit on names is much tighter5.
function Analytics.log(player: Player, eventName: string, value: number?)
safely(function()
AnalyticsService:LogCustomEvent(player, eventName, value)
end)
Notice what is not here: a loop. One event per round, per purchase or per defeat is a signal. One per Heartbeat is noise, and it burns the rate limit, which is 120 plus 20 per concurrent user per minute for all AnalyticsService calls4.
Why should you never log a custom event inside a Heartbeat connection?
Press 1 to 4 to choose, Enter to check.
Step 4 of 12
The onboarding funnel
A funnel is an ordered list of steps. Each player who reaches step 3 should also have reached 1 and 2, and the chart shows how many dropped between each pair. Roblox has a dedicated call for the first-session funnel: LogOnboardingFunnelStepEvent(player, stepNumber, stepName). Step numbers start at 1, a game can have up to 10 funnels with up to 100 steps each, and a saved step expires after 180 days without events6.
Beacon Yard's funnel is five steps, in the order of a new player's first session:
- Joined, once the profile has loaded.
- FirstCoin, on the first pickup.
- StartedDrill, when a drill starts.
- SurvivedDrill, when the round returns to Idle and the player is alive.
- FirstPurchase, on the first shop buy (Speed or Shield) or the first Coin Pack.
The module logs each step once per player. It saves the furthest step in the profile (onboardingStep), so a returning player does not log Joined again, and a step reached late is not logged at all.
function Analytics.onboarding(player: Player, step: OnboardingStep): boolean
local index = Analytics.onboardingIndex(step)
local ok, data = pcall(DataService.get, player)
if not ok or index <= data.onboardingStep then
return false
end
data.onboardingStep = index
safely(function()
AnalyticsService:LogOnboardingFunnelStepEvent(player, index, step)
end)
return true
A player has onboardingStep = 3. The code calls Analytics.onboarding(player, "FirstCoin"). What happens?
-- ONBOARDING = { Joined, FirstCoin, StartedDrill, SurvivedDrill, FirstPurchase }
local index = Analytics.onboardingIndex("FirstCoin") -- 2
if index <= data.onboardingStep then
return false
end
Press 1 to 4 to choose, Enter to check.
Step 5 of 12
Read a funnel
A funnel chart is a column of counts. The useful number is not the total at the end; it is the biggest drop between two steps, because that is where players leave. The numbers below are invented to practise reading one, and are not from a real Beacon Yard launch.
In this made-up data, half of the players who found a coin never started a drill. The fix would be in the game, not the dashboard: the objective text, the beacon sign, a prompt that is easy to see. That is the point of the funnel.
In the made-up data, 800 players got a first coin and 400 started a drill. What would you try first?
Press 1 to 4 to choose, Enter to check.
Step 6 of 12
Economy events
An economy event says that a named currency moved. LogEconomyEvent(player, flowType, currency, amount, balanceAfter, transactionType, itemSku?)1. A source puts currency into the game, a sink takes it out. The amount is always positive, and the dashboard shows sinks as negative itself.
At m12-money, CoinService logs every pickup as a source with type Gameplay and item CoinPickup. ShopService logs Speed and Shield as sinks of type Shop. The Coin Pack grants coins as an IAP source. Every call carries the balance after the change, so the dashboard can chart the average balance too.
function Analytics.coinSource(player: Player, amount: number, balance: number, transactionType: string, sku: string)
safely(function()
AnalyticsService:LogEconomyEvent(
player,
Enum.AnalyticsEconomyFlowType.Source,
CURRENCY,
amount,
balance,
transactionType,
sku
)
end)
| In the picture | In Roblox |
|---|---|
| The roll | The economy events on the dashboard |
| A line for each sale | One LogEconomyEvent per coin in or out |
| The balance printed on each line | The balance-after argument |
The economy events are the store's till roll. Every coin that comes in and every coin that goes out gets a line with the new balance. The profile is still the bank: the roll is a record for you to read and cannot restore a lost balance.
Think of it as The store's till roll
Economy events have their own limits: up to 10 currencies, and after 20 distinct transaction types or 100 distinct item SKUs the extras are grouped as "Other"4. That is why Beacon Yard has one currency, Coins, and a handful of SKUs.
Match each coin movement to its flow type and transaction type.
Step 7 of 12
Limits that shape what you log
Three limits decide how to design events4.
Reference AnalyticsService limits, checked 2026-11-23
Limits reset daily, and the docs say they may change.
120 + 20 × CCU requests per minute- All AnalyticsService calls from the experience together.
3 per event- Filter economy, funnel and custom events. After 8,000 combined values they are grouped as Other.
100- Use fields, not new names, for variants.
10 currencies, 20 types, 100 SKUs- Beyond 20 transaction types or 100 SKUs the extras are grouped as Other.
10 funnels, 100 steps each- A saved step expires after 180 days without events.
90 days- Each event rolls off 90 days after its last data.
Custom fields are how you avoid a new event for every variant. Three fields can carry, say, the item name, the round number and the team, and the dashboard can break any chart down by them. Do not put a player's user id in a field: it has thousands of values and uses up the 8,000 before anything useful does.
You want to chart Speed and Shield sales separately. What is the best way?
Press 1 to 4 to choose, Enter to check.
Step 8 of 12
Retention: do they come back?
Retention is the share of new players who return. D1 counts players who first played on one day and came back the next. D7 counts those who returned a week later and D30 a month later7. The most recent days on the D7 and D30 charts are empty because the week or the month has not passed yet.
D1 is the first thing to improve, and Roblox's guide names three levers: the core loop, the first-time user experience and performance. Beacon Yard's loop is coins to a drill to a shop, and the onboarding funnel is a map of that first experience. A drop at SurvivedDrill says the loop is too hard; a drop at FirstCoin says the yard did not explain itself.
Today is the 27th. The D7 chart shows no value for players who first played on the 24th. Why?
Press 1 to 4 to choose, Enter to check.
Retention sits beside two other Creator Hub dashboards: Engagement and Monetization. The Engagement page tracks average session time: total time users spend in your game divided by the number of sessions8. The Monetization Overview page defines four core revenue metrics9:
| Metric | Definition | Formula |
|---|---|---|
| Conversion rate | Percent of daily active users (DAU) who are also paying users | payingUsers / dau * 100 |
| Paying users | Daily active users who purchased a game-related item | Count of buyers that day |
| ARPPU | Average revenue per paying user | revenue / payingUsers |
| ARPDAU | Average revenue per daily active user | revenue / dau (also conversion * ARPPU) |
Before pressing Run, predict conversion rate, ARPPU and ARPDAU for 2,000 DAU, 80 paying users and 12,000 Robux revenue. For cohort LTV, recommender signals and real benchmarks, continue with The metrics that matter: retention, ARPDAU, conversion, LTV in Module 15.
On another day, 1,000 daily active users produce 25 paying users who spend 5,000 Robux in total. What is ARPDAU in Robux?
Step 9 of 12
What else studios use
Stored dataRemember: Economy events is the store's till roll.
Other ways pros do this
| Option | What it is | When pros pick it | Trade-offs |
|---|---|---|---|
| Creator Hub analytics | Built-in dashboards for engagement, retention, monetization, funnels and economy, plus custom dashboards. | Always; it needs no extra setup and costs nothing. | Limited to the documented events and fields; data rolls off after 90 days. |
| Custom dashboards and Insights | Your own charts built from the same events, and guidance from Roblox on what to improve. | A live game with several people reading numbers. | Still limited to what you logged. |
| Experiments and Configs | A/B test a change on part of your players and change values without a restart. | Tuning prices, rewards and events. | Needs enough players for a result. |
| Your own backend via HttpService or Open Cloud | Send events to a warehouse or dashboard you control. | Large studios with their own data team and questions the built-in tools cannot answer. | You build, secure and pay for it; HttpService has its own limits. |
Where does it break?“The store's till roll” is a good picture of economy events. Where does it stop being true?
It breaks here. A till roll only records what happened; it cannot restore a lost balance, which lives in the profile.
The true model. LogEconomyEvent records a source or sink of a named currency with the balance after it. Analytics events are aggregated for charts and are not a backup of player data.
A bad deploy wipes some players' coins. Can the economy events restore them?
Press 1 to 4 to choose, Enter to check.
Step 10 of 12
Build along: read your own events
Retiring the analogy
You no longer need “the store's till roll”. LogEconomyEvent records a source or sink of a named currency with the balance after it. Analytics events are aggregated for charts and are not a backup of player data.
Build along
src/server/Analytics.luausrc/server/CoinService.luausrc/server/ShopService.luausrc/server/DataMigration.luau
Open the
m12-moneycode in Studio and play. Collect a coin and buy Shield to confirm your code callsAnalyticscleanly. Studio itself does not send analytics events to Creator Hub, and in an unpublished place you will see the module's one warning while the yard keeps running.You should see Output shows no script errors (or one warning if the place is unpublished).
Read
DataMigration.luauandAnalytics.onboarding. Find whereonboardingStepis saved, and why a second FirstCoin never logs.You should see The profile has an onboardingStep field, and DataMigration.template lists it with a default of 0.
Publish your test experience as a private experience, join a live server through the Roblox client (not Studio), collect a coin and buy an item, then open Analytics, Economy in Creator Hub and select View Events to see your events in near real time. Dashboard charts take up to 24 hours to appear.
You should see Creator Hub's Analytics, Economy, View Events list shows your Coins events from the live private server.
In
MonetizationService.process, find theIAPsource call after the receipt record is written, and confirm it is logged only when this server wrote the receipt.You should see A second Coin Pack purchase logs one IAP source event with the new balance.
Step 11 of 12
Challenges
Level 2, Builder
Challenge
Add the round number as a custom field on coin source events, without using up the field budget.
- Start from
- The game at milestone m12 (download)
Done means
- Every coin source event carries the round number in custom field 1
- The round number stays under a small bounded range
- No user id appears in any field
Meet the criteria above, then record your own result. No test grades this check.
Level 3, Professional
Challenge
Add an OpenedShop funnel step. The test is challenges/analytics-funnel.luau and the written solution is challenges/solutions/analytics-funnel.md. Run it from a bindable in the server script, as the challenges README shows.
- Start from
- The game at milestone m12 (download)
- Grade it
- To grade work from an earlier milestone, apply your challenge changes to a checkout based on
m14-ship, which includes the Course Runner. In Studio, press Play, then rungame.ServerScriptService.RunGameTests:Invoke("analytics-funnel", "analytics-opened-shop")in the server command bar. Copy the pass code from Output.
Done means
- A new OpenedShop step sits between SurvivedDrill and FirstPurchase
- It is logged once per player when the shop opens, and steps after it are renumbered
- challenges/analytics-funnel.luau prints TEST PASS for every check
After you insert OpenedShop between SurvivedDrill and FirstPurchase, what step number does FirstPurchase get?
Step 12 of 12
Recap
Recap
- Custom events count things, funnel events show where players stop in a linear flow, journey events track branching paths, and economy events track a currency as sources and sinks; all are sent from live published servers after the action succeeded, never from Studio.
- Beacon Yard logs a five-step onboarding funnel once per player (the furthest step is saved in the profile) and every coin in or out with the balance after it.
- Retention is D1, D7 and D30, rate limits and field budgets decide how many events and fields you can use, and none of it is a backup.
Economy events is the store's till roll, until a till roll only records what happened; it cannot restore a lost balance, which lives in the profile.
Queued for review
Next Change with evidence: Experiments, error reports and alerts