wordpress-mobile/WordPress-iOS — pull request #2931 by sendhil (2014-12-16 01:50:01+00:00)
Title: Add timing of events to mixpanel

Here's an example of how this works. The following code could be added to the `viewDidLoad` of the editor VC (note - this sends no data up to Mixpanel, it just starts the timer):
```
[WPAnalytics beginTimerForStat:WPAnalyticsStatEditorClosed];
```

When the editor VC gets dismissed, we previously had this:
```
[WPAnalytics track:WPAnalyticsStatEditorClosed withProperties:properties];
```

but to time it all we have to do is change that line to this:

```
[WPAnalytics endTimerForStat:WPAnalyticsStatEditorClosed withProperties:properties];
```

This results in a 'Duration' property being attached to the event in mixpanel.

cc @mikejohnstn