def score_conversion!(test_name)
test_name.gsub!(" ", "_")
participating_tests = Abingo.cache.read("Abingo::participating_tests::#{self.identity}") || []
if options[:assume_participation] || participating_tests.include?(test_name)
cache_key = "Abingo::conversions(#{self.identity},#{test_name}"
if options[:multiple_conversions] || !Abingo.cache.read(cache_key)
if !options[:count_humans_only] || is_human?
viewed_alternative = find_alternative_for_user(test_name,
Abingo::Experiment.alternatives_for_test(test_name))
Abingo::Alternative.score_conversion(test_name, viewed_alternative)
end
if Abingo.cache.exist?(cache_key)
Abingo.cache.increment(cache_key)
else
Abingo.cache.write(cache_key, 1)
end
end
end
end