mono/monotouch-bindings — pull request #142 by patridge (2013-06-12 20:43:39+00:00)
Title: [GoogleAnalytics] Fix data type issue with currency micros.

When I submitted a test transaction to Google Analytics using the bindings here, I got some odd data showing in the Google Analytics dashboard.

![googleanalyticsfail](https://f.cloud.github.com/assets/713665/645208/a3403666-d39f-11e2-985e-248a1ee2904c.png)

> On a side note, if you look closely, Google Analytics doesn't appear to handle very large negative numbers very well (`-4 + -4 = +9`).

[Google's Objective-C code](https://developers.google.com/analytics/devguides/collection/ios/v2/ecommerce#implementation) suggests an `int64_t` for these values.

transaction.revenueMicros = (int64_t)(2.16 * 1000000);

I thought it might be some sort of overflow issue and swapped out the C# binding for those currency values from `int` to `long` and the data started showing up correctly in the dashboard.

![googleanalyticsfailfixed](https://f.cloud.github.com/assets/713665/645209/a3543d28-d39f-11e2-8d47-14141506130f.png)