Navigation
API > API/Runtime > API/Runtime/Analytics
Struct to hold key/value pairs that will be sent as attributes along with analytics events. All values are actually strings, but we provide a convenient constructor that relies on ToStringForAnalytics() to convert common types.
| Name | FAnalyticsEventAttribute |
| Type | struct |
| Header File | /Engine/Source/Runtime/Analytics/Analytics/Public/AnalyticsEventAttribute.h |
| Include Path | #include "AnalyticsEventAttribute.h" |
Syntax
struct FAnalyticsEventAttribute
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FAnalyticsEventAttribute
(
FString InName, |
AnalyticsEventAttribute.h | ||
| Hack to allow copy ctor using an rvalue-ref. | AnalyticsEventAttribute.h | ||
FAnalyticsEventAttribute
(
const FAnalyticsEventAttribute& RHS |
Reinstate the default copy ctor because that one still works fine. | AnalyticsEventAttribute.h | |
| Default ctor since we declare a custom ctor. | AnalyticsEventAttribute.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FAnalyticsEventAttribute() |
AnalyticsEventAttribute.h |
Enums
Public
| Name | Remarks |
|---|---|
| AttrTypeEnum |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AttrName | const FString | AnalyticsEventAttribute.h | ||
| AttrType | const AttrTypeEnum | AnalyticsEventAttribute.h | ||
| AttrValueBool | const bool | AnalyticsEventAttribute.h | ||
| AttrValueNumber | const double | AnalyticsEventAttribute.h | ||
| AttrValueString | const FString | AnalyticsEventAttribute.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
const FString & GetName() |
AnalyticsEventAttribute.h | ||
const FString & GetValue() |
AnalyticsEventAttribute.h | ||
bool IsJsonFragment() |
AnalyticsEventAttribute.h | ||
void SetValue
(
ValueType&& InValue |
Allow setting value for any type that supports LexToString | AnalyticsEventAttribute.h | |
void SwitchToJsonFragment() |
Legacy support for old RecordEventJson API. Don't call this directly. | AnalyticsEventAttribute.h | |
FString ToString() |
If you need the old AttrValue behavior (i.e. stringify everything), call this function instead. | AnalyticsEventAttribute.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static bool IsValidAttributeName
(
const FString& InName |
AnalyticsEventAttribute.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FAnalyticsEventAttribute & operator+
(
const FAnalyticsEventAttribute& RHS |
ALlow aggregation of attributes | AnalyticsEventAttribute.h | |
FAnalyticsEventAttribute & operator+=
(
const FAnalyticsEventAttribute& RHS |
ALlow aggregation of attributes | AnalyticsEventAttribute.h | |
| Hack to allow assignment. | AnalyticsEventAttribute.h | ||
FAnalyticsEventAttribute & operator=
(
const FAnalyticsEventAttribute& RHS |
Hack to allow assignment. | AnalyticsEventAttribute.h |