Analytics: Track any custom event you want and use custom fields for segmentation

You don’t have to. The charts will only show fields for the selected event when breaking down. The filter bar will include all of your custom fields. Just know that if you filter by another event’s field you won’t get any data in the charts.

1 Like

Can this be used with Players.PlayerRemoving? I’m getting an error that says the player must be a child of “Players” in some games but my game Pilfering Pirates seems to not have this issue?

I’m starting to get data in on my dashboard and it looks like all custom fields are showing up as N/A.

…and as I’m writing this I’m realizing that I used Enum.AnalyticsCustomFieldKeys.CustomField01.Value insead of Enum.AnalyticsCustomFieldKeys.CustomField01.Name. My bad.

It would be great if using an invalid key threw an error in studio since it’s a pretty easy mistake to make.

Will the custom event tracking limit of 100 be increased in the future? This is a really awesome feature!

1 Like

Are you using the CustomFields? We had a number of requests for our other events like Funnels and Economy, but when people started to use Custom Fields they realized that they didn’t need more than the limit that we provided to them

I’ve looked at a few implementations of experiences with a high number of events - and for many of them they could be compressed by 95% if custom fields were used

2 Likes

I don’t really know how I can implement CustomFIelds. My game is a chemistry merging game, and I am tracking everytime someone discovers a new brick in their singleplayer save. However, there are over a 100 bricks that you can create. Currently I am just logging every time a new brick is discovered.

Can you use a BrickDiscovered event - and have BrickId as a custom field? That way you can filter by your custom field to track the individual bricks or even see all the bricks in aggregate.

You can read more about custom fields here: Custom Fields | Documentation - Roblox Creator Hub

Found out that the issue was with the Workspace.SignalBehavior property. Changing it from deferred to default/immediate fixes the error

1 Like

Not really related to custom analytics (sorry), but I have a currency bundle in my experience you can purchase with Robux OR with another in game currency. What would be the best way to track this with AnalyticsService?

I know I would use the IAP Enum for the Robux purchases.
But for buying a currency with another currency, my best guess would be to log a sink event of the currency your are spending with an SKU of the bundles name, then to log again with the currency you earned from the bundle? If I am doing this should I also log again after the currency has been earned from the bundle with a Robux purchase?

Hi! Yup I think you pretty much got all of it. Personally I would set it up as:

  1. When a user purchase currency A using currency B, send a sink event with currency B. (user spent currency B)
  2. Normally I don’t recommend tracking robux as a currency since that information is already in the monetization pages.
  3. When the transaction completes, send a source event with currency A. (user earned currency A). You could distinguish the two variants with varying transaction types / item skus if you want.
1 Like

Thank you! I will implement it soon. I love using AnalyticsService as it’s helped me a lot since I started using it.

One last thing I wanted to implement was tracking items obtained in my experience, currently, whenever a user obtains an item, it logs an economy event with the items name as the SKU. This is working fine, except I read on the documentation that after 100 SKU’s it all gets grouped into “Other”, which does not help me in my goal of trying to see how many times a specific item has been obtained. Would it be smarter to:

Log one economy event with just a “ItemPurchased” SKU.

Then log a custom event saying the user obtained the item? (With a custom field of the items name)

Yup sounds reasonable! You could see some cool stuff like avg times an item is obtained per user or unique number of users that obtained an item.

Ok thank you so much! The AnalyticsService is very useful and fun to use! Excited to see any future updates for it!

1 Like
local AS = game:GetService("AnalyticsService")

game.Players.PlayerAdded:Connect(function(plr: Player)
	AS:LogCustomEvent(plr, "APlayerJoined", os.time(), {
		[Enum.AnalyticsCustomFieldKeys.CustomField01.Value] = plr.Name .. " has joined the game.",
	})
end)

I made this code yet it does not show on charts at all

Hi! You can check your events in the View Events window in real time to make sure that they are coming in since the charts take ~24 hours. Some slight notes about your event tho:

  • We only show aggregations of the value so if you use time as the value we will only be able to show you min/max/avg of the time
  • Make sure you use CustomField01.Name instead of .Value - read more here: Custom Fields | Documentation - Roblox Creator Hub
  • Using the player name in the value will deplete your cardinality limit for custom fields really fast since we only support up to 8,000 unique values.

If you want to see when your players are playing the experience I’d recommend also checking out the Engagement and Performance dashboards.

Oh ok thanks. Yeah ill rewrite the code as told
But on another note, I think it should be explained better on the Docs because its too complicated to understand. I personally had to go to youtube and forms just to understand how it works

I added a event in a skip loading screen button to see how much people click it I made two one with the time it player waited and one without but both doesn’t appear on the dashboard the game is private though

Were you only playing in Studio? Events only can correctly sent in for chart creation if in a live game server.

It’s in live game server and private game

Is there any errors in the console? Also maybe the game being private cancels any Analytics? I am not sure.