Collect data

Data collection is the process of gathering information on player’s behaviors during play such as login and currency acquistion. It is achieved at the client side by calling the correspoding methods written in some game scripts that SDK contains. Collected data is used as a basis of data analysis that leads to the generation of personalized or AI in-game shop offers.

How to use data collection method

To make the data collection work, it is necessary to call the appropriate methods of TPStashEvent class for each game event.

Two of common game events are join events and login events. The following example script exhibits how to initialize TentuPlay and logs the join events of new users and login events. You can collect the data by writing one line of code for each event.

Example on how to use methods for logging join and login event
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local TentuplaySDKModules = ReplicatedStorage["tentuplay-sdk-modules-ReplicatedStorage"]

local TPStashEvent = require(TentuplaySDKModules.TPStashEvent) --for collecting and uploading data

	--Join method when calling a new player join the game first time

     --Login method when calling user's login event
		1 --App version, Default is nil.(Optional)


If the data upload is successful, the events will be logged to Roblox Studio as shown below.

check uploads

See TentuPlay API Documentation for more information.