Skip to content

gsdean/Mixpanel.NET

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mixpanel.NET API Integration for .NET

This project provides basic API integration for using Mixpanel from .NET applications. I'm specifically building it with desktop analytics in mind but it should be useful for a wide range of analytics tracking scenarios.

If you have feature suggestions please open a github issue for them.

Current Features:

Planned Features:

  • Seperate API wrappers for the Mixpanel data query API

Usage:

First, I recommend looking at the specs since they pretty clearly demonstrate the usage, scenarios and options. To get started with most of the sensible default options first create a new Tracker

var tracker = new Tracker("your API key");

Tracking data can be done one of two ways, first, by sending properties in a dictionary.

var properties = new Dictionary<string, object>();
properties["something"] = "some data";
properties["something else"] = 5;
properties["time"] = DateTime.Now;
tracker.Track("My Event", properties);

Alternatively, you can use a class which will have it's name and properties serialzied.

var trackingEvent = new MyEvent {
  Something = "some data",
  SomethingElse = 5,
  Time = DateTime.Now
};
tracker.Track(trackingEvent);

Because it is conventional for analytics tracking, all camel-case names are split with spaces inserted between words. This makes the reporting easier to understand.

If you want to serialize the names literally then you can set that by passing a TrackerOptions class with LiteralSerialization = true in the constructor of your Tracker.

Licence

Licenced under the Apache 2.0 licence

About

Mixpanel API integration for .NET

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 98.7%
  • PowerShell 1.3%