An open source Mixpanel .NET integration library that supports complete Mixpanel API. The main idea of the library is to hide API details allowing you to concentrate on data that you want to analyze. Supported platforms: .NET 4.6.1 and .NET Standard 2.0. It's also well documented, configurable and testable. Check the example usage on the project site.
$ dotnet add package mixpanel-csharpAn open source Mixpanel .NET integration library that supports complete Mixpanel API.
var mc = new MixpanelClient("e3bc4100330c35722740fb8c6f5abddc");
await mc.TrackAsync("Level Complete", new {
DistinctId = "12345",
LevelNumber = 5,
Duration = TimeSpan.FromMinutes(1)
});
This will send the following JSON to https://api.mixpanel.com/track/:
{
"event": "Level Complete",
"properties": {
"token": "e3bc4100330c35722740fb8c6f5abddc",
"distinct_id": "12345",
"LevelNumber": 5,
"$duration": 60
}
}
var mc = new MixpanelClient("e3bc4100330c35722740fb8c6f5abddc");
await mc.PeopleSetAsync(new {
DistinctId = "12345",
Name = "Darth Vader",
Kills = 215
});
This will send the following JSON to https://api.mixpanel.com/engage/:
{
"$token": "e3bc4100330c35722740fb8c6f5abddc",
"$distinct_id": "12345",
"$set": {
"$name": "Darth Vader",
"Kills": 215
}
}
https://github.com/eealeivan/mixpanel-csharp
mixpanel-csharp is licensed under MIT. Refer to LICENSE for more information.