EZvent, Analytics Simplified

EZvent

Created by: HeatSquared

EZvent was made to simply AnalyticsService for easy use case
I’ve made this so more people can use these features alot easier.


Link

EZvent is VERY new and is most likely prone to bugs.
If you come across any please let me know ASAP !

(P.S I also apologies about the typechecking, I’m not the best at it so you’ll see a few warnings in strict, If you fix this send me a message on DISCORD @ heatsquared !)


Example

--!strict

local EZvents = require(game.ReplicatedStorage.EZvents)

------------------------------

local Custom = EZvents.Custom
local ThisIsCustom = Custom:RegisterEvent("ThisIsCustom")

ThisIsCustom:Log(game.Players.HeatSquared, {
	Value = 501;
})

------------------------------

local Funnel = EZvents.Funnel
local OnboardFunnel = Funnel:RegisterEvent("ThisIsOnboarding")

OnboardFunnel:LogOnboarding(game.Players.HeatSquared, {
	Step = 1;
	StepName = "This is a step up..."
})

OnboardFunnel:LogFunnel(game.Players.HeatSquared, {
	Step = 2;
	StepName = "This is another step up but not onboarding..."
})
------------------------------

local Economy = EZvents.Economy
local EconomyEvent = Economy:RegisterEvent("Eco")

EconomyEvent:Log(game.Players.HeatSquared, {
	FlowType = Enum.AnalyticsEconomyFlowType.Source,
	Currency = "TIX",
	Amount = 50,
	EndingBalance = 70,
	TransactionType = Enum.AnalyticsEconomyTransactionType.Gameplay,
	ItemSku = "Shop"
})
--[[

	@ Documentation
	Created by heatsquared :)
	
	local EZvents = require(path.to.ezvents)
	->
	EZVents.Custom - Custom Events
	EZVents.Funnel - Funnel Events
	EZVents.Economy - Economy Events
	->
	
	<--------------------------------------------->
	
	local ExampleCustom = EZVents.Custom:RegisterEvent(Name_of_event)
	
	ExampleCustom:Log(Player: Player, Data: {
		Value: number?,
		CustomFields: {[string]: any?}
	})

	<--------------------------------------------->

	local ExampleFunnel = EZVents.Funnel:RegisterEvent(Name_of_event)
	
	ExampleFunnel:LogFunnel(Player: Player, Data: {
		Step: number,
		StepName: string,
		CustomFields: {[string]: any?}
	})
	
	ExampleFunnel:LogOnboarding(Player: Player, Data: {
		Step: number?,
		StepName: string,
		CustomFields: {[string]: any?}
	})
	
	
	<--------------------------------------------->
	local ExampleEconomy = EZVents.Economy:RegisterEvent(Name_of_event)
	
	ExampleEconomy:Log(Player: Player, Data: {
		FlowType: Enum.AnalyticsEconomyFlowType,
		Currency: string,
		Amount: number,
		EndingBalance: number,
		TransactionType: string,
		ItemSku: string,
		CustomFields: {[string]: any?}
	})
]]

Contact

Discord: HeatSquared

1 Like