diff --git a/app/services/hyrax/analytics/matomo.rb b/app/services/hyrax/analytics/matomo.rb index ac9c83c32f..06a0582cd9 100644 --- a/app/services/hyrax/analytics/matomo.rb +++ b/app/services/hyrax/analytics/matomo.rb @@ -165,9 +165,9 @@ def results_array(response, metric) if result[1].empty? results.push([result[0].to_date, 0]) elsif result[1].is_a?(Array) - results.push([result[0].to_date, result[1].first[metric]]) + results.push([result[0].to_date, result[1].first[metric].to_i]) else - results.push([result[0].to_date, result[1][metric].presence || 0]) + results.push([result[0].to_date, result[1][metric].presence.to_i]) end end Hyrax::Analytics::Results.new(results)