Game Analytics for Windows Phone 8.1 & Windows Store

Game analytics can help a great deal in improving your games. By tracking downloads and in-app purchases, player demography, average session length, player progress and performance, as well as quality metrics such as crashes, companies are constantly trying to be one step ahead of their competitors.

At slash games, we’ve been using GameAnalytics for about a year now. It’s easy to implement, easy to use, and it provides great visualizations, custom reports and funnels. Oh, and it’s free.

While GameAnalytics already provides integration for Unity, iOS, Android, Corona and Flash, there’s been no native integration for Windows Phone and Windows Store apps so far.

Based on their REST API and on the work by Jason Ericson, I’ve succeeded in creating a native plugin for Windows Phone 8.1 and Windows Store apps. You just have to include a single source code file in your project, and sending an event to the GameAnalytics backend becomes as easy as

The plugin automatically generates unique session ids, uses the app package version as build id, and the Application Specific Hardware Identifier (ASHWID) as user id by default. However, you can change these at any time.

The library is open source, works out-of-the-box with the standard Visual Studio “Visual C++ Windows Phone DirectX App” and “Visual C++ Windows Store DirectX App” templates, and is tested to pass store validation:

EDIT: Works with Windows Phone 8 apps as well now! Enjoy!

C++ Windows Store app validation fails

If  you’ve recently run the Windows App Cert Kit for your C++ Windows Store app, you might have encountered these or similar failures of the Supported API test:

You’ve ensured you’re not building in Debug mode. The error persists. And you could swear, a few days ago, everything was fine.

Clearly, msvc dlls are not the type of code you would have written yourself. So what to do about this?

Luckily, the friendly folks over at the MSDN forums have isolated the issue, verifying that it can (temporarily) be resolved by uninstalling the recent Windows update KB2976978. This is the officially recommended workaround by Microsoft for the time being, as well.

Note that the above errors won’t cause your app to fail submission.

I’ll update this post as soon as there’s anything new!