FAnalyticsEventAttribute

Struct to hold key/value pairs that will be sent as attributes along with analytics events.

Windows
MacOS
Linux

References

Module

Analytics

Header

/Engine/Source/Runtime/Analytics/Analytics/Public/AnalyticsEventAttribute.h

Include

#include "AnalyticsEventAttribute.h"

Syntax

struct FAnalyticsEventAttribute

Remarks

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.

Constructors

Name Description

Public function

FAnalyticsEventAttribute()

Default ctor since we declare a custom ctor.

Public function

FAnalyticsEventAttribute

(
    const FAnalyticsEventAttribute& RH...
)

Reinstate the default copy ctor because that one still works fine.

Public function

FAnalyticsEventAttribute

(
    FAnalyticsEventAttribute&& RHS
)

Hack to allow copy ctor using an rvalue-ref.

Public function

FAnalyticsEventAttribute

(
    FString InName,
    ValueType&& InValue
)

Destructors

Name Description

Public function

~FAnalyticsEventAttribute()

Functions

Name Description

Public function Const

const FStrin...

 

GetName()

Public function Const

const FStrin...

 

GetValue()

Public function Const

bool

 

IsJsonFragment()

Public function Static

bool

 

IsValidAttributeName

(
    const FString& InName
)

Public function

void

 

SetValue

(
    ValueType&& InValue
)

Allow setting value for any type that supports LexToString

Operators

Name Description

Public function

FAnalyticsEv...

 

operator=

(
    const FAnalyticsEventAttribute& RH...
)

Hack to allow assignment.

Public function

FAnalyticsEv...

 

operator=

(
    FAnalyticsEventAttribute&& RHS
)

Hack to allow assignment.

Enums

Name

Description

Public enum

AttrTypeEnum

Deprecated Variables

Name Description

Public variable

const FString

 

AttrName

This property has been deprecated, use GetName() instead

Public variable

const AttrTypeE...

 

AttrType

This property has been deprecated, use IsJsonFragment or GetValue instead

Public variable

const bool

 

AttrValueBool

This property has been deprecated, use GetValue() instead. You cannot recover the original non-string value anymore

Public variable

const double

 

AttrValueNumber

This property has been deprecated, use GetValue() instead. You cannot recover the original non-string value anymore

Public variable

const FString

 

AttrValueString

This property has been deprecated, use GetValue() instead

Deprecated Functions

Name Description

Public function

void

 

SwitchToJsonFragment()

This property is used to support the deprecated APIs, construct Json values using FJsonFragment instead

Public function Const

FString

 

ToString()

This property has been deprecated, use GetValue() instead

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss