Skip to main content

UserSettingsReport

A class in Root.Township, Alta.Analytics.UserSettingsAnalytics.

Collects the logged-in player's playtime, platform and many comfort, locomotion and graphics settings, and sends them as one analytics event.

Constructors​

MemberWhat it is
UserSettingsReport(string reportTitle)Creates an UserSettingsReport from reportTitle.

Fields​

MemberWhat it is
const string UserSettingsReportNameThe event name used for the report.
4 private and internal fields
MemberWhat it is
private readonly Dictionary<string, object> eventDataThe collected setting names and values.
private static Logger loggerNLog logger for this class.
private readonly string reportTitleThe report title from the config, included in the data.
private readonly int userIdThe logged-in user's ID, read when the report is created.

Methods​

MemberWhat it is
async Task<bool> PostReport(IAnalyticsService analyticsService)Fills the data and sends a UserSettingsAnalyticsEvent. Returns false if anything throws.
1 private and internal method
MemberWhat it is
private async Task PopulateEventData()Fetches the user's statistics from the API and fills the event data from them and the current game settings.