lib/field_test/experiment.rb in field_test-0.2.2 vs lib/field_test/experiment.rb in field_test-0.2.3

- old
+ new

@@ -103,10 +103,10 @@ if use_events? data = {} sql = relation.joins("LEFT JOIN field_test_events ON field_test_events.field_test_membership_id = field_test_memberships.id") .select("variant, COUNT(DISTINCT participant) AS participated, COUNT(DISTINCT field_test_membership_id) AS converted") - .where(field_test_events: {name: goal}) + .where(field_test_events: {name: [goal, nil]}) FieldTest::Membership.connection.select_all(sql).each do |row| data[[row["variant"], true]] = row["converted"].to_i data[[row["variant"], false]] = row["participated"].to_i - row["converted"].to_i end