Configuring User Reporting
Customize user reports with fields, metadata, attachments, and metrics to match your game's feedback needs.
Read time 3 minutesLast updated 9 hours ago
The default settings for User Reporting are suitable for normal use, but as your project develops you might want to make changes for specific needs. You might build your own UI that matches your application to introduce custom fields or change the appearance of a user report form. The sample provided in the package is functional, but acts as a starting point.
User reports contain useful information such as metadata, events, sampled metrics, screenshots, and file attachments. For example, you could attach a user’s game save files to their report, or log an event every time the player performs a certain action. You can also sample performance metrics in performance-intensive gameplay situations.
Use the API to configure maximum values of each data type in your report. The UserReportExample file (found in the sample imported into your Unity project) provides a demonstration of the different means of adding data to reports.
For example, you might customize the following settings to limit the maximum of specific data types in a report:
- : A measure is a set of frames covered in each sample collected of a metric. The default measure length is 60 frames.
FramesPerMeasure - : A measure is a set of frames covered in metric samples, and counts the maximum number of measures in a report. The default value is 300 measures.
MaximumMeasureCount - : This limit applies to the number of events included in a report. The default value is 100 events.
MaximumEventCount - : The limit of the most screenshots attached to a report. The default value is 10 screenshots.
MaximumScreenshotCount - : Represents a metric gathering mode. Some metrics, such as frames per second (Graphics.FramesPerSecond), can be included in reports using the Automatic mode, the default configuration. Manual will only include your own custom metrics in reports, while Disabled will prevent any sampled metrics from being sent in reports entirely.
MetricsGatheringMode
UserReportingService.Instance..Configure(UserReportingClientConfiguration configuration)var customConfig = new UserReportingClientConfiguration(5, 5, 100, 100, MetricsGatheringMode.Automatic);UserReportingService.Instance.UserReporting.Configure(customConfig);
Create and sending Reports
To create a report, callUserReportingService.Instance.UserReporting.CreateNewUserReport();UserReportingService.Instance.SendUserReport(Action<float> progressUpdate, Action<bool> result)Add metadata
Use metadata to collect specific data for your game which appears with the device metadata included in User Reports by default. To add custom metadata, call theUserReportingService.Instance.AddMetadata(string name, string value)Log events
To log custom events, call theUserReportingService.Instance.LogEvent(UserReportEventLevel level, string message)Add sampling metrics
To add custom sampling metrics, call theUserReportingService.Instance.SampleMetric(string name, double value)SampleMetricAdd screenshots
To add screenshots to your report, call theUserReportingService.Instance.TakeScreenshot(int maximumWidth, int maximumHeight)UserReportingService.Instance.TakeScreenshot(int maximumWidth, int maximumHeight, object source)Add attachments
Add attachments such as video and scene graphs. Attachments are encoded as Base64 objects. UseUserReportingService.Instance.AddAttachmentToReport(string title, string filename, byte[] data)Organize report dimensions
Use dimensions to filter user reports on the Unity Dashboard. You can add dimensions and metrics to your report before sending it by adding items to a dimensions property. Each dimension or metric has a name and a value. You can add a new dimension to your report by calling:UserReportingService.Instance.AddDimensionValue(string dimension, string value);Name | Value |
|---|---|
| Platform | Android |
| Version | 2 |
| Category | Graphics |
| Platform | WindowsPlayer |
| Version | 1 |
| Language | English |
| Platform | WindowsPlayer |
| Version | 1 |
| Platform.Version | WindowsPlayer.1 |
Dimension name | Dimension value |
|---|---|
| Category | Graphics |
| Language | English |
| Platform | Android |
| Platform | WindowsPlayer |
| Platform.Version | WindowsPlayer: 1 |
| Version | 1 |
| Version | 2 |
Dimension name | Dimension value |
|---|---|
| Hash Tag | FloorBug |