| IAnalyticsProvider
|
Module |
|
Header |
/Engine/Source/Runtime/Analytics/Analytics/Public/Interfaces/IAnalyticsProvider.h |
Include |
#include "Interfaces/IAnalyticsProvider.h" |
class IAnalyticsProvider
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<FAnalyticEventAttribute> Attrs; Attrs.Add(...); AnalyticsProvider->RecordEvent(TEXT("MyEvent"), Attrs);
Several APIs build off the pure virtual ones. The following pure virtuals must be implemented by a derived class.
virtual bool StartSession(const TArray<FAnalyticsEventAttribute>& Attributes) virtual void EndSession() virtual FStringGetSessionID() const virtual bool SetSessionID(const FString& InSessionID) virtual void FlushEvents() virtual void SetUserID(const FString& InUserID) virtual FStringGetUserID() const virtual void RecordEvent(const FString& EventName, const TArray<FAnalyticsEventAttribute>& Attributes)
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.
Name | Description | |
---|---|---|
|
~IAnalyticsProvider() |
Name | Description | ||
---|---|---|---|
|
EndSession() |
Ends the session. |
|
|
FlushEvents() |
Flush any cached events to the analytics provider. |
|
|
GetSessionID() |
Gets the opaque session identifier string for the provider. |
|
|
GetUserID() |
Gset the current UserID. |
|
|
RecordCurrencyGiven ( |
Record a gift of in-game currency from the game itself. |
|
|
RecordCurrencyGiven ( |
Record a gift of in-game currency from the game itself. |
|
|
RecordCurrencyPurchase ( |
Record a purchase of in-game currency using real-world money. |
|
|
RecordCurrencyPurchase ( |
Record an in-game purchase of a an item. |
|
|
RecordCurrencyPurchase |
Record a purchase of in-game currency using real-world money. |
|
|
RecordError ( |
Records an error that has happened in the game |
|
|
RecordError ( |
Records an error that has happened in the game |
|
|
RecordEvent ( |
Overload for RecordEvent that takes a single attribute |
|
|
RecordEvent |
Overload for RecordEvent that takes a single name/value pair |
|
|
RecordEvent ( |
Records a named event with an array of attributes |
|
|
RecordEvent ( |
Overload for RecordEvent that takes no parameters |
|
|
RecordItemPurchase ( |
Record an in-game purchase of a an item. |
|
|
RecordItemPurchase ( |
Record an in-game purchase of a an item. |
|
|
RecordItemPurchase |
Record an in-game purchase of a an item. |
|
|
RecordProgress |
Record a player progression event that has happened in the game |
|
|
RecordProgress ( |
Record a player progression event that has happened in the game |
|
|
RecordProgress ( |
Record a player progression event that has happened in the game |
|
|
SetAge ( |
Sets the location the game believes the user is playing in as part of the session |
|
|
SetBuildInfo ( |
Sets a user defined string as the build information/version for the session |
|
|
SetGender ( |
Sets the gender the game believes the user is as part of the session |
|
|
SetLocation ( |
Sets the location the game believes the user is playing in as part of the session |
|
|
SetSessionID ( |
Sets the session ID of the analytics session. |
|
|
SetUserID ( |
Set the UserID for use with analytics. |
|
|
StartSession() |
Starts a session. |
|
|
StartSession ( |
Starts a session. See parameterless-version for contract details. |
|
|
StartSession ( |
Overload for StartSession that takes a single attribute |
|
|
StartSession |
Overload for StartSession that takes a single name/value pair |