Navigation
API > API/Runtime > API/Runtime/Analytics > API/Runtime/Analytics/Interfaces
Inheritance Hierarchy
- IAnalyticsProvider
- IAnalyticsProviderET
References
| Module | Analytics |
| Header | /Engine/Source/Runtime/Analytics/Analytics/Public/Interfaces/IAnalyticsProvider.h |
| Include | #include "Interfaces/IAnalyticsProvider.h" |
Syntax
class IAnalyticsProvider
Remarks
Generic interface for an analytics provider. Other modules can define more and register them with this module. See FAnalytics for details.
Easiest way to use this is like so:
// MakeAnalyticsEventAttributeArray is a convenient way to efficiently make an array of attributes // Since it returns an unnamed temporary, the compiler automatically selects the move-aware version. AnalyticsProvider->RecordEvent(TEXT("MyEvent"), MakeAnalyticsEventAttributeArray("Attr1", "Value1", ... )); or: TArray
Several APIs build off the pure virtual ones. The following pure virtuals must be implemented by a derived class. virtual bool StartSession(const TArray
There are several other methods to record specific types of events. They were added for legacy reasons to support specific third party implementations. Derived classes generally do not have to worry about them.
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | EndSession () |
Ends the session. | |
| void | FlushEvents () |
Flush any cached events to the analytics provider. | |
| FString | GetSessionID () |
Gets the opaque session identifier string for the provider. | |
| FString | GetUserID () |
Gset the current UserID. | |
| void | RecordCurrencyGiven
(
const FString& GameCurrencyType, |
Record a gift of in-game currency from the game itself. | |
| void | RecordCurrencyGiven
(
const FString& GameCurrencyType, |
Record a gift of in-game currency from the game itself. | |
| void | RecordCurrencyPurchase
(
const FString& GameCurrencyType, |
Record a purchase of in-game currency using real-world money. | |
| void | RecordCurrencyPurchase
(
const FString& GameCurrencyType, |
Record an in-game purchase of a an item. | |
| void | RecordCurrencyPurchase
(
const FString& GameCurrencyType, |
Record a purchase of in-game currency using real-world money. | |
| void | RecordError
(
const FString& Error, |
Records an error that has happened in the game | |
| void | RecordError
(
const FString& Error |
Records an error that has happened in the game | |
| void | RecordEvent
(
const FString& EventName, |
Overload for RecordEvent that takes a single attribute | |
| void | RecordEvent
(
const FString& EventName, |
Overload for RecordEvent that takes a single name/value pair | |
| void | RecordEvent
(
const FString& EventName, |
Records a named event with an array of attributes | |
| void | RecordEvent
(
const FString& EventName |
Overload for RecordEvent that takes no parameters | |
| void | RecordItemPurchase
(
const FString& ItemId, |
Record an in-game purchase of a an item. | |
| void | RecordItemPurchase
(
const FString& ItemId, |
Record an in-game purchase of a an item. | |
| void | RecordItemPurchase
(
const FString& ItemId, |
Record an in-game purchase of a an item. | |
| void | RecordProgress
(
const FString& ProgressType, |
Record a player progression event that has happened in the game | |
| void | RecordProgress
(
const FString& ProgressType, |
Record a player progression event that has happened in the game | |
| void | RecordProgress
(
const FString& ProgressType, |
Record a player progression event that has happened in the game | |
| void | SetAge
(
const int32 InAge |
Sets the location the game believes the user is playing in as part of the session | |
| void | SetBuildInfo
(
const FString& InBuildInfo |
Sets a user defined string as the build information/version for the session | |
| void | Sets the gender the game believes the user is as part of the session | ||
| void | SetLocation
(
const FString& InLocation |
Sets the location the game believes the user is playing in as part of the session | |
| bool | SetSessionID
(
const FString& InSessionID |
Sets the session ID of the analytics session. | |
| void | Set the UserID for use with analytics. | ||
| bool | StartSession () |
Starts a session. | |
| bool | StartSession
(
const TArray< FAnalyticsEventAttribute >& Attributes |
Starts a session. See parameterless-version for contract details. | |
| bool | StartSession
(
const FAnalyticsEventAttribute& Attribute |
Overload for StartSession that takes a single attribute | |
| bool | StartSession
(
const FString& ParamName, |
Overload for StartSession that takes a single name/value pair |