2 min read

Source: Roblox Creator Hub · CC BY 4.0 · View source · Code samples: MIT Imported 2026-10-03. Formatting adapted for this site.

Custom fields

You can use up to three custom fields to filter your economy, funnel, and custom events by unique dimensions specific to your game. Some examples include:

The customFields parameter is a dictionary that lets you send up to three custom values using the provided AnalyticsCustomFieldKeys as keys by accessing them as AnalyticsCustomFieldKeys.CustomField{01, 02, 03}.Name. Anything other than CustomField01.Name, CustomField02.Name, and CustomField03.Name is ignored. You can have up to 8,000 unique combinations of values across the three custom fields.

Note

The values assigned to custom fields must be strings. If you need to log another data type like a boolean or number, pass it in string format.

Using a fantasy-related game as an example, you can track an economy event regarding equipment type, player class, and level with the following:

local AnalyticsService = game:GetService("AnalyticsService")

AnalyticsService:LogEconomyEvent(
    player,
    Enum.AnalyticsEconomyFlowType.Sink,
    "Coins", -- Currency name
    80, -- Cost
    20, -- Balance after transaction
    Enum.AnalyticsEconomyTransactionType.Shop.Name,
    "Obsidian Sword", -- Item SKU
    {
        [Enum.AnalyticsCustomFieldKeys.CustomField01.Name] = "Category - Weapon",
        [Enum.AnalyticsCustomFieldKeys.CustomField02.Name] = "Class - Warrior",
        [Enum.AnalyticsCustomFieldKeys.CustomField03.Name] = "Level - 10",
    } -- Custom field dictionary
)

Including the dimension name in the value is not required, but can help you remember the context later when reviewing your charts. Other keys in the customFields table are ignored.