Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Metric Values should be float in order to handle percentage values #11

Merged
merged 1 commit into from

2 participants

@DTrierweiler

Hi!

I came across the issue, that I could not use any percentage values from the goals defined in GA (e.g. ConversionRate), cause they're converted to integer.
Generally I think it would be better, to return them as float.

Would be nice, if you could integrate this! Thanks anyway for this nice gem :)

Best,
Daniel

@chrisle chrisle merged commit 9669ab6 into chrisle:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/gattica/data_point.rb
View
2  lib/gattica/data_point.rb
@@ -20,7 +20,7 @@ def initialize(xml)
{ dimension.attributes['name'].split(':').last.to_sym => dimension.attributes['value'].split(':').last }
end
@metrics = xml.search('dxp:metric').collect do |metric|
- { metric.attributes['name'].split(':').last.to_sym => metric.attributes['value'].split(':').last.to_i }
+ { metric.attributes['name'].split(':').last.to_sym => metric.attributes['value'].split(':').last.to_f }
end
end
Something went wrong with that request. Please try again.