Skip to main content

AnalyticsData

A class in Alta.Analytics.Runtime, Alta.Analytics.

The payload of one analytics event: its name, optional user ID and a list of name and value properties. Built by AnalyticsEvent.

Constructors​

MemberWhat it is
AnalyticsData(string eventName, int? userId = null)Creates an AnalyticsData from eventName and userId.

Fields​

1 private and internal field
MemberWhat it is
private readonly List<IAnalyticsProperty> propertiesThe property list.

Properties​

MemberWhat it is
int Count { get; }Number of properties added.
string EventName { get; }The event's name.
int? UserId { get; private set; }The user ID, or null when not set.

Methods​

MemberWhat it is
void AddProperty(string name, object value)Appends a name and value property. Duplicate names are not checked.
IEnumerator<IAnalyticsProperty> GetEnumerator()Enumerates the properties in the order they were added.
void SetUserId(int id)Sets the user ID the event is for.
1 private and internal method
MemberWhat it is
private IEnumerator System.Collections.IEnumerable.GetEnumerator()Enumerates the properties in the order they were added.