chrisnicola/Mixpanel.NET

DateTime format is incorrect for Mixpanel

Closed this issue · 5 comments

Mixpanel requires DateTime to be sent in a kind of funky format

See here
https://mixpanel.com/docs/properties-or-segments/property-data-types

I would actually recommend you switch from using the Json serializer built into .net and switch to JSON.net. It is far superior and more commonly used in open source community.

Also you will be able to use it to provide a custom serializer for DateTime for mixpanel

@EliSchleifer the reason I used the built in (I know it's terrible) is to avoid any external dependencies since this is such a simple API and simple library. I'll try to look at this this weekend, or maybe @StanleyGoldman has some time.

JSON.net in particular is a pretty big lib to bring in just for this and if you prefer a different library (I know a lot of people are using ServiceStack now) it might be annoying to have to depend on it.

Alternatively, if you are comfortable with a pull-request we'd be grateful for it.

When I have an hour I will put it together. And send a pull request

From: Chris Nicola [mailto:notifications@github.com]
Sent: Thursday, October 11, 2012 5:22 PM
To: lucisferre/Mixpanel.NET
Cc: Eli Schleifer
Subject: Re: [Mixpanel.NET] DateTime format is incorrect for Mixpanel (#5)

@EliSchleifer https://github.com/EliSchleifer the reason I used the built in (I know it's terrible) is to avoid any external dependencies since this is such a simple API and simple library. I'll try to look at this this weekend, or maybe @StanleyGoldman https://github.com/StanleyGoldman has some time.

JSON.net in particular is a pretty big lib to bring in just for this and if you prefer a different library (I know a lot of people are using ServiceStack now) it might be annoying to have to depend on it.

Alternatively, if you are comfortable with a pull-request we'd be grateful for it.


Reply to this email directly or view it on GitHub #5 (comment) .

https://github.com/notifications/beacon/J6T91GIPIyhU-8ti4GCGP8x9DkfM27rhOHHD1a7j2KWRwlW75luxkvSBiBGktTpX.gif

@EliSchleifer btw is this completely broken because of this? When I was testing earlier I didn't have problems with the timestamps.

Yes. This will not crash or reject the call, but MixPanel cannot parse (at least they couldn’t in the past) timestamps in the format we were generating

From: Chris Nicola [mailto:notifications@github.com]
Sent: Thursday, November 08, 2012 4:48 PM
To: lucisferre/Mixpanel.NET
Cc: Eli Schleifer
Subject: Re: [Mixpanel.NET] DateTime format is incorrect for Mixpanel (#5)

@EliSchleifer https://github.com/EliSchleifer btw is this completely broken because of this? When I was testing earlier I didn't have problems with the timestamps.


Reply to this email directly or view it on GitHub #5 (comment) .

https://github.com/notifications/beacon/2m4P2QuKfEJnp9KZhjF378Wnq4myOq4JKySNSpiCaflnhAaMRXpRb6gjnHVDViOI.gif

Confirm that Lucis.

I left some code on my work computer that I've yet to push to my fork of Mixpanel.NET, but I have JSON.Net compiled in and the bug fixed. I'm changing the project structure in my version a bit. So I'm not sure if Lucis will want my version.