Skip to content

Commit ef275b2

Browse files
committed
Use ab_user instead of session to pull active_experiments
1 parent 6b0c686 commit ef275b2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/split/analytics.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ def tracking_code(options = {})
3131
end
3232

3333
def custom_variables
34-
return nil if session.nil?
34+
return nil if ab_user.nil?
3535
arr = []
3636

37-
session.each_with_index do |h, i|
37+
ab_user.active_experiments.each_with_index do |h, i|
3838
arr << "_gaq.push([\"_setCustomVar\", #{i + 1}, \"#{h[0]}\", \"#{h[1]}\", 1]);"
3939
end
4040
arr.reverse[0..4].reverse.join("\n")

0 commit comments

Comments
 (0)