Here’s a set of examples illustrating how to use the library from a Windows Phone 8 app.

MixpanelClient

The main class is MixpanelClient, it’s that little fellow that allows you to track events and profile updates. Furthermore, if ever sending an element failed, the client will automatically save it locally to automatically send them as a batch later on.

Here’s how to retrieve an instance of it:

_client = await MixpanelClient.GetCurrentClient();

This method is awaitable as on the first call, the client checks if there’s any unsent element and sends them if so.

Tracking events

Once you have an instance of MixpanelClient, here’s how to track events:

3 thoughts on “Mixpanel for Windows Phone 8”

When I’m trying to use this library (latest package version as for today is 1.2.6) for Windows 10 universal app I’m getting the following run-time error:

Could not load file or assembly ‘System.Runtime.Serialization, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes’ or one of its dependencies. The system cannot find the file specified.

That is after I’ve added additional Json.NET 7.0.1 package (latest as for today) which was not specified as dependency for Mixpanel package so it was not automatically resolved (only mentioned in release notes).

I understand that as of now the Windows 10 is not officially supported by Mixpanel library, but it looks more like assembly reference/nuget package composition-related issue, not like it is totally un-doable. Could you please check it out when you have time?

BTW, the lib looks awesome and you did a very great job and I would be really happy to give it a try.

As it’s turned out the problem was specifically with Json.NET 7.0.1. The temporary workaround is to use Json.NET 6.0.8 instead and Mixpanel 1.2.6 then working just fine. The only thing that I have to change still was reference Mixpanel.dll from “wpa” subfolder rather then from “windows8” as it was by default after nuget package installation.