Class: Optimizely::EventBuilderV2
Constant Summary
collapse
- CONVERSION_EVENT_ENDPOINT =
'https://p13nlog.dz.optimizely.com/log/event'
- IMPRESSION_EVENT_ENDPOINT =
'https://p13nlog.dz.optimizely.com/log/decision'
{ 'Content-Type' => 'application/json' }
Instance Attribute Summary
#bucketer, #config, #params
Instance Method Summary
collapse
#initialize
Instance Method Details
#create_conversion_event(event_key, user_id, attributes, event_tags, experiment_keys) ⇒ Object
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
# File 'lib/optimizely/event_builder.rb', line 93
def create_conversion_event(event_key, user_id, attributes, event_tags, experiment_keys)
@params = {}
add_common_params(user_id, attributes)
add_conversion_event(event_key)
add_event_tags(event_tags)
add_layer_states(user_id, experiment_keys)
Event.new(:post, CONVERSION_EVENT_ENDPOINT, @params, )
end
|
#create_impression_event(experiment_key, variation_id, user_id, attributes) ⇒ Object
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
# File 'lib/optimizely/event_builder.rb', line 76
def create_impression_event(experiment_key, variation_id, user_id, attributes)
@params = {}
add_common_params(user_id, attributes)
add_decision(experiment_key, variation_id)
add_attributes(attributes)
Event.new(:post, IMPRESSION_EVENT_ENDPOINT, @params, )
end
|