Collapse Sidebar


This function triggers an event used to track player actions pertaining to the in-game economy.

For example, it should be called to track when players acquire or spend virtual items within the economy like currency.

Limits of events

Each game server is allowed a certain number of standard events API calls based on the number of players present (more players means more events will be needed).
The events that exceed the limit will be dropped and log an error to the developer console.

  • Per minute limit: 120 + numPlayers * 20, all events shared this limit.
  • Cooldown: refresh every 10 seconds

Limits of parameters

Limit the size of parameters. The event that exceeds the limit will be dropped and log an error to the developer console.

Parameters Maximum Number of Characters
customData Variant 500 after serialized
other string types 50

See also

  • AnalyticsService/FirePlayerProgressionEvent, triggers an event used to track player progression through the game
  • AnalyticsService/FireLogEvent, triggers an event used to track errors and warnings experienced by players
  • AnalyticsService/FireCustomEvent, triggers an event used to emit a custom event


Name Type Default Description

The player who triggered the economy event

The name of the item

Indicates the acquisition or spending of an in game resource

A user defined category for items. For example, the category could be “Vehicle” or “Weapon”


The amount of the currency

The currency used. Examples: ‘gold’, ‘gems’, ‘life’ etc.

The event location. A dictionary that each key-value represents an entry of location data. The key-value is a string-string pair. With this you can query which are the most popular “stores” then maybe you want to increase/lower the price for the stores.

See the example below:

local location = {
    ["placeDesc"] = "Dungeon1", 
    ["levelDesc"] = "level2",
    ["mapDesc"] = "LeftChamberMap",
    ["storeName"] = "DarkSmith",
    ["userDefindKey"] = "0005"

Optional. User defined data, could be a string, a number or a table


Return Type Summary

No return

Code Samples

Analytics Event - Economy

The event below demonstrates one possible usage for the AnalyticsService:FireInGameEconomyEvent function. It uses the function to invoke an analytics economy event when the parented gold Part is touched by a player.

local gold = script.Parent
local AnalyticsService = game:GetService(“AnalyticsService”)

gold.Touched:Connect(function (otherPart)
	local player = game.Players:GetPlayerFromCharacter(otherPart.Parent)
	if player == nil then return end

	local location = {
		["Map"] = "someMap",
		["Position"] = tostring(gold.Position)

		"Sword", -- item name
		"Weapon", -- itemCategory
		2020, -- amount of Gold		
		"Gold", -- currency
		{ SomeCustomKey = "SomeCustomValue"}) -- optional customData