class FAnalyticsProviderTreasureData;Treasure Data Unreal Engine Analytics Provider plugin. This SDK will immediately upload events upon adding them. No local buffer used.
| Enumerator | Value | Description |
|---|---|---|
| US01 | USA - us01.records.in.treasuredata.com | |
| AP01 | Japan - ap01.records.in.treasuredata.com | |
| AP02 | Korea - ap02.records.in.treasuredata.com | |
| EU01 | Europe - eu01.records.in.treasuredata.com. |
Check your organizations settings to verify the correct selection.
static inline TSharedPtr< IAnalyticsProvider > Create(
const FString Key,
const FString DBName,
FAnalyticsRegion Region
)Create Treasure Data Instance. All events will be recorded to two tables, Sessions and Events.
| Param | Description |
|---|---|
| Key | Write only API Key |
| DBName | Database Name to log data to. Maximum length of 120 characters. |
| Region | TD Account Region |
Return: TD Analytics Provider Instance
static inline void Destroy()Remove all configuration data from the Treasure Data instance.
virtual bool StartSession(
const TArray< FAnalyticsEventAttribute > & Attributes
) overrideStart the session
| Param | Description |
|---|---|
| Attributes | Additional event attributes |
Return: bool true if session started successfully
virtual void EndSession() overrideEnd the session
virtual void SetUserID(
const FString & InUserID
) overrideSet the ID of the User
| Param | Description |
|---|---|
| InUserID | String representing the User ID. Preferably Unique. |
virtual FString GetUserID() const overrideGet the ID of the User
Return: FString string representing the User ID
virtual FString GetSessionID() const overrideGet the current session ID
Return: FString string representing the current session ID
virtual bool SetSessionID(
const FString & InSessionID
) overrideSet the Session ID of the User
| Param | Description |
|---|---|
| InSessionID | session id as a string |
Return: bool true if session id set successfully
virtual void RecordEvent(
const FString & EventName,
const TArray< FAnalyticsEventAttribute > & Attributes
) overrideRecord an event
| Param | Description |
|---|---|
| EventName | Name of Event |
| Attributes | Attributes as an array |
virtual void RecordItemPurchase(
const FString & ItemId,
const FString & Currency,
int PerItemCost,
int ItemQuantity
) overrideRecord an item purchase
| Param | Description |
|---|---|
| ItemId | string representing ID of item |
| Currency | string representing ID of currency |
| PerItemCost | integer cost of item |
| ItemQuantity | number of items |
virtual void RecordCurrencyPurchase(
const FString & GameCurrencyType,
int GameCurrencyAmount,
const FString & RealCurrencyType,
float RealMoneyCost,
const FString & PaymentProvider
) overrideRecord purchse of currency
| Param | Description |
|---|---|
| GameCurrencyType | Type of currency as a string |
| GameCurrencyAmount | Amount of currency as a integer |
| RealCurrencyType | Currency type as a string |
| RealMoneyCost | Cost in Real dollars as a float |
| PaymentProvider | Payment Provider as a string |
virtual void RecordCurrencyGiven(
const FString & GameCurrencyType,
int GameCurrencyAmount
) overrideRecord the currency given to the user
| Param | Description |
|---|---|
| GameCurrencyType | Type of in-game currency as a string |
| GameCurrencyAmount | Amount of in-game currency as an integer |
virtual void SetBuildInfo(
const FString & InBuildInfo
) overrideSet the build information
| Param | Description |
|---|---|
| InBuildInfo | Build information as a string |
virtual void SetGender(
const FString & InGender
) overrideSet the Gender of the User
| Param | Description |
|---|---|
| InGender | String representing the gender |
virtual void SetLocation(
const FString & InLocation
) overrideSet the Location of the User
| Param | Description |
|---|---|
| InLocation | String representing the location of the user |
virtual void SetAge(
const int32 InAge
) overrideSet the Age of the User
| Param | Description |
|---|---|
| InAge | Integer representing the age of the user |
virtual void RecordItemPurchase(
const FString & ItemId,
int ItemQuantity,
const TArray< FAnalyticsEventAttribute > & EventAttrs
) overrideRecord the purchase of an in-game item
| Param | Description |
|---|---|
| ItemId | ID of the item as a string |
| ItemQuantity | Number of items as an integer |
| EventAttrs | Additional event attributes |
virtual void RecordCurrencyPurchase(
const FString & GameCurrencyType,
int GameCurrencyAmount,
const TArray< FAnalyticsEventAttribute > & EventAttrs
) overrideRecord purchase of in-game currency
| Param | Description |
|---|---|
| GameCurrencyType | Type of currency in game as a string |
| GameCurrencyAmount | Amount of currency as an integer |
| EventAttrs | Additional event attributes |
virtual void RecordCurrencyGiven(
const FString & GameCurrencyType,
int GameCurrencyAmount,
const TArray< FAnalyticsEventAttribute > & EventAttrs
) overrideRecord currency given to user in-game
| Param | Description |
|---|---|
| GameCurrencyType | Type of currency |
| GameCurrencyAmount | Amount of currency |
| EventAttrs | Additional event attributes |
virtual void RecordError(
const FString & Error,
const TArray< FAnalyticsEventAttribute > & EventAttrs
) overrideWhen things go wrong, record an error
| Param | Description |
|---|---|
| Error | Error event name |
| EventAttrs | Error event attributes |
virtual void RecordProgress(
const FString & ProgressType,
const FString & ProgressHierarchy,
const TArray< FAnalyticsEventAttribute > & EventAttrs
) overrideRecord progress of user
| Param | Description |
|---|---|
| ProgressType | Type of progress as a string |
| ProgressHierarchy | Hierarchy of progress as a string |
| EventAttrs | Additional event attributes |
void AddEventAttribute(
const FString & EventName,
const FString & EventValue
)Add basic event with value
| Param | Description |
|---|---|
| EventName | Name of Event |
| EventValue | Value of event |
void ClearEventAttributes()Clear event attributes
inline FAnalyticsRegion GetRegion()Return the AnalyticsRegion currently set for the object instance.
inline FString GetAPIURL()Convenience function to transform API Endpoint enumerations into Postback API address string.
Return: string with the Postback API endpoint