Getting useful Device Information for Analytics

When I’m looking at the Analytics I’m doing for my Windows Phone apps there are quite a couple of things I’m registering. All anonymous of course, but I’d like to know things about the devices the users of my apps are using. So I went looking for a way to get the same information I already register for my Windows Phone Apps in Google Analytics (see my useful nuget package to get Google Analytics in your Windows Phone apps).

I already have the application version, I explained how to get it in an earlier post. Further more I try to register: Device Manufacturer, Device Type and OS Version. Though the OS Version doesn’t make that much sense I think.

var deviceInfo = new Windows.Security.ExchangeActiveSyncProvisioning.EasClientDeviceInformation();
var manufacturer = deviceInfo.SystemManufacturer; //Output: Dell Inc.
var productName = deviceInfo.SystemProductName; //Output: Dell System XPS L702X

That was easy, but getting this information through the Exchange Active Sync classes sounds strange, it works and that is what matters. If you know any alternative solutions please add your comments.

I also would like to know the resolution of the user. My current thoughts are that they are probably very high for non-tablets, but the tablets are probably 1366x768. You can get information about the screen-size through Windows.Current.Bounds, however be carefull, the Width is different when the app is snapped or fill mode.

var deviceWidth = Window.Current.Bounds.Width;
var deviceHeigth = Window.Current.Bounds.Height;

Alright that’s very interesting information so far. Maybe this would be useful for a port of the Google Analytics package to support Windows 8 apps.