New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GoogleAnalytics] Fix data type issue with currency micros. #142

Merged
merged 1 commit into from Jun 13, 2013

Conversation

Projects
None yet
2 participants
@patridge
Contributor

patridge commented Jun 12, 2013

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

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 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

@dalexsoto

This comment has been minimized.

Member

dalexsoto commented Jun 13, 2013

Thanks

dalexsoto added a commit that referenced this pull request Jun 13, 2013

Merge pull request #142 from patridge/master
[GoogleAnalytics] Fix data type issue with currency micros.

@dalexsoto dalexsoto merged commit ab99f21 into mono:master Jun 13, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment