John
John

Reputation: 3945

App Center - What is Device and OS of the user?

Just installed AppCenter to my xamarin.forms app.

Tested throwing exceptions and it correctly logs as issues in the Diagnostics section of appcenter.ms dashboard. From here I am able to view the report to say what device & os the user is using...

Question being how can I get these details by logging a tracked event...So was able to say

 Analytics.TrackEvent("My custom event 1");

and this will appear in my AppCenter dashboard on the Analytics-> Events section

So I need to include a line or two of code in the track event that will send back device and os of the user....can anyone point me in the right direction to find this?

Thanks

Upvotes: 0

Views: 213

Answers (1)

Leo Zhu
Leo Zhu

Reputation: 14981

You could track your events with properties.

Analytics.TrackEvent("Video clicked", new Dictionary<string, string> {
   { "Device", "Pixel 10.0" },
   { "OS", "Android"}
});

Update:

You could get the device information by Xamarin.Essentials,then you could pass them in the above method.

Upvotes: 1

Related Questions