Skip to content

Commit b93505a

Browse files
committed
Output tracking properties in AbPanel::Javascript
1 parent 38cf32c commit b93505a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/ab_panel/javascript.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
module AbPanel
22
class Javascript
33
def self.environment
4-
props = { distinct_id: AbPanel.env["distinct_id"] }
4+
props = {
5+
distinct_id: AbPanel.env["distinct_id"]
6+
}.merge(AbPanel.env[:properties])
57

68
AbPanel.funnels.each { |f| props["funnel_#{f}"] = true }
79

810
AbPanel.experiments.each { |exp| props[exp] = AbPanel.conditions.send(exp).condition }
11+
912
props.to_json
1013
end
1114
end

0 commit comments

Comments
 (0)