@@ -61,41 +61,41 @@ discard block |
||
61 | 61 | $options = array( |
62 | 62 | "project_id" => 1000, |
63 | 63 | "changes" => array( |
64 | - array( |
|
64 | + array( |
|
65 | 65 | "type" => "custom_code", |
66 | 66 | "allow_additional_redirect" => true, |
67 | 67 | "async" => true, |
68 | 68 | "selector" => "a[href*=\"optimizely\"]", |
69 | 69 | "dependencies" => array( |
70 | - 24, |
|
71 | - 26 |
|
70 | + 24, |
|
71 | + 26 |
|
72 | 72 | ), |
73 | 73 | "destination" => "https://app.optimizely.com/", |
74 | 74 | "extension_id" => 1234, |
75 | 75 | "preserve_parameters" => true, |
76 | 76 | "src" => 524, |
77 | 77 | "value" => "window.someGlobalFunction();" |
78 | - ) |
|
78 | + ) |
|
79 | 79 | ), |
80 | 80 | "created" => "2016-10-14T05:08:42.822Z", |
81 | 81 | "earliest" => "2016-10-14T05:08:42.822Z", |
82 | 82 | "experiment_ids" => array( |
83 | - 0 |
|
83 | + 0 |
|
84 | 84 | ), |
85 | 85 | "holdback" => 0, |
86 | 86 | "last_modified" => "2016-10-14T05:08:42.822Z", |
87 | 87 | "latest" => "2016-10-14T05:08:42.822Z", |
88 | 88 | "metrics" => array( |
89 | - array( |
|
89 | + array( |
|
90 | 90 | "aggregator" => "unique", |
91 | 91 | "event_id" => 0, |
92 | 92 | "field" => "revenue", |
93 | 93 | "scope" => "session" |
94 | - ) |
|
94 | + ) |
|
95 | 95 | ), |
96 | 96 | "name" => "Landing Page Optimization", |
97 | 97 | "page_ids" => array( |
98 | - 0 |
|
98 | + 0 |
|
99 | 99 | ), |
100 | 100 | "status" => "active", |
101 | 101 | "type" => "a/b" |
@@ -117,41 +117,41 @@ discard block |
||
117 | 117 | $options = array( |
118 | 118 | "project_id" => 1000, |
119 | 119 | "changes" => array( |
120 | - array( |
|
120 | + array( |
|
121 | 121 | "type" => "custom_code", |
122 | 122 | "allow_additional_redirect" => true, |
123 | 123 | "async" => true, |
124 | 124 | "selector" => "a[href*=\"optimizely\"]", |
125 | 125 | "dependencies" => array( |
126 | - 24, |
|
127 | - 26 |
|
126 | + 24, |
|
127 | + 26 |
|
128 | 128 | ), |
129 | 129 | "destination" => "https://app.optimizely.com/", |
130 | 130 | "extension_id" => 1234, |
131 | 131 | "preserve_parameters" => true, |
132 | 132 | "src" => 524, |
133 | 133 | "value" => "window.someGlobalFunction();" |
134 | - ) |
|
134 | + ) |
|
135 | 135 | ), |
136 | 136 | "created" => "2016-10-14T05:08:42.822Z", |
137 | 137 | "earliest" => "2016-10-14T05:08:42.822Z", |
138 | 138 | "experiment_ids" => array( |
139 | - 0 |
|
139 | + 0 |
|
140 | 140 | ), |
141 | 141 | "holdback" => 0, |
142 | 142 | "last_modified" => "2016-10-14T05:08:42.822Z", |
143 | 143 | "latest" => "2016-10-14T05:08:42.822Z", |
144 | 144 | "metrics" => array( |
145 | - array( |
|
145 | + array( |
|
146 | 146 | "aggregator" => "unique", |
147 | 147 | "event_id" => 0, |
148 | 148 | "field" => "revenue", |
149 | 149 | "scope" => "session" |
150 | - ) |
|
150 | + ) |
|
151 | 151 | ), |
152 | 152 | "name" => "Landing Page Optimization", |
153 | 153 | "page_ids" => array( |
154 | - 0 |
|
154 | + 0 |
|
155 | 155 | ), |
156 | 156 | "status" => "active", |
157 | 157 | "type" => "a/b" |
@@ -113,14 +113,14 @@ discard block |
||
113 | 113 | $options = array( |
114 | 114 | "project_id" => 1000, |
115 | 115 | "audience_ids" => array( |
116 | - 1234, |
|
117 | - 1212, |
|
118 | - 1432 |
|
116 | + 1234, |
|
117 | + 1212, |
|
118 | + 1432 |
|
119 | 119 | ), |
120 | 120 | "campaign_id" => 2000, |
121 | 121 | "audience_conditions" => "[\"and\", {\"audience_id\": 7000}, {\"audience_id\":7001}]", |
122 | 122 | "changes" => array( |
123 | - array( |
|
123 | + array( |
|
124 | 124 | "type" => "custom_code", |
125 | 125 | "allow_additional_redirect" => true, |
126 | 126 | "async" => true, |
@@ -135,8 +135,8 @@ discard block |
||
135 | 135 | "text" => "Some nice message" |
136 | 136 | ), |
137 | 137 | "dependencies" => array( |
138 | - 24, |
|
139 | - 26 |
|
138 | + 24, |
|
139 | + 26 |
|
140 | 140 | ), |
141 | 141 | "destination" => "https://app.optimizely.com/", |
142 | 142 | "extension_id" => 1234, |
@@ -145,57 +145,57 @@ discard block |
||
145 | 145 | "selector" => "a[href*=\"optimizely\"]", |
146 | 146 | "src" => 524, |
147 | 147 | "value" => "window.someGlobalFunction();" |
148 | - ) |
|
148 | + ) |
|
149 | 149 | ), |
150 | 150 | "type" => "a/b", |
151 | 151 | "description" => "string", |
152 | 152 | "holdback" => 5000, |
153 | 153 | "key" => "home_page_experiment", |
154 | 154 | "metrics" => array( |
155 | - array( |
|
155 | + array( |
|
156 | 156 | "aggregator" => "unique", |
157 | 157 | "event_id" => 0, |
158 | 158 | "field" => "revenue", |
159 | 159 | "scope" => "session" |
160 | - ) |
|
160 | + ) |
|
161 | 161 | ), |
162 | 162 | "name" => "Blue Button Experiment", |
163 | 163 | "schedule" => array( |
164 | - "start_time" => "2016-10-14T05:08:42.850Z", |
|
165 | - "stop_time" => "2016-10-14T05:08:42.850Z", |
|
166 | - "time_zone" => "UTC" |
|
164 | + "start_time" => "2016-10-14T05:08:42.850Z", |
|
165 | + "stop_time" => "2016-10-14T05:08:42.850Z", |
|
166 | + "time_zone" => "UTC" |
|
167 | 167 | ), |
168 | 168 | "status" => "active", |
169 | 169 | "variations" => array( |
170 | - array( |
|
170 | + array( |
|
171 | 171 | "actions" => array( |
172 | - array( |
|
172 | + array( |
|
173 | 173 | "changes" => array( |
174 | - array( |
|
174 | + array( |
|
175 | 175 | "type" => "custom_code", |
176 | 176 | "allow_additional_redirect" => true, |
177 | 177 | "async" => true, |
178 | 178 | "selector" => "a[href*=\"optimizely\"]", |
179 | 179 | "dependencies" => array( |
180 | - 24, |
|
181 | - 26 |
|
180 | + 24, |
|
181 | + 26 |
|
182 | 182 | ), |
183 | 183 | "destination" => "https://app.optimizely.com/", |
184 | 184 | "extension_id" => 1234, |
185 | 185 | "preserve_parameters" => true, |
186 | 186 | "src" => 524, |
187 | 187 | "value" => "window.someGlobalFunction();" |
188 | - ) |
|
188 | + ) |
|
189 | 189 | ), |
190 | 190 | "page_id" => 0 |
191 | - ) |
|
191 | + ) |
|
192 | 192 | ), |
193 | 193 | "archived" => true, |
194 | 194 | "key" => "blue_button_variation", |
195 | 195 | "name" => "Blue Button", |
196 | 196 | "variation_id" => 0, |
197 | 197 | "weight" => 0, |
198 | - ) |
|
198 | + ) |
|
199 | 199 | ) |
200 | 200 | ); |
201 | 201 | |
@@ -210,13 +210,13 @@ discard block |
||
210 | 210 | $options = array( |
211 | 211 | "project_id" => 1000, |
212 | 212 | "audience_ids" => array( |
213 | - 1234, |
|
214 | - 1212, |
|
215 | - 1432 |
|
213 | + 1234, |
|
214 | + 1212, |
|
215 | + 1432 |
|
216 | 216 | ), |
217 | 217 | "campaign_id" => 2000, |
218 | 218 | "changes" => array( |
219 | - array( |
|
219 | + array( |
|
220 | 220 | "type" => "custom_code", |
221 | 221 | "allow_additional_redirect" => true, |
222 | 222 | "async" => true, |
@@ -232,64 +232,64 @@ discard block |
||
232 | 232 | ), |
233 | 233 | "selector" => "a[href*=\"optimizely\"]", |
234 | 234 | "dependencies" => array( |
235 | - 24, |
|
236 | - 26 |
|
235 | + 24, |
|
236 | + 26 |
|
237 | 237 | ), |
238 | 238 | "destination" => "https://app.optimizely.com/", |
239 | 239 | "extension_id" => 1234, |
240 | 240 | "preserve_parameters" => true, |
241 | 241 | "src" => 524, |
242 | 242 | "value" => "window.someGlobalFunction();" |
243 | - ) |
|
243 | + ) |
|
244 | 244 | ), |
245 | 245 | "description" => "string", |
246 | 246 | "holdback" => 5000, |
247 | 247 | "key" => "home_page_experiment", |
248 | 248 | "metrics" => array( |
249 | - array( |
|
249 | + array( |
|
250 | 250 | "aggregator" => "unique", |
251 | 251 | "event_id" => 0, |
252 | 252 | "field" => "revenue", |
253 | 253 | "scope" => "session" |
254 | - ) |
|
254 | + ) |
|
255 | 255 | ), |
256 | 256 | "name" => "Blue Button Experiment", |
257 | 257 | "schedule" => array( |
258 | - "start_time" => "2016-10-14T05:08:42.850Z", |
|
259 | - "stop_time" => "2016-10-14T05:08:42.850Z", |
|
260 | - "time_zone" => "UTC" |
|
258 | + "start_time" => "2016-10-14T05:08:42.850Z", |
|
259 | + "stop_time" => "2016-10-14T05:08:42.850Z", |
|
260 | + "time_zone" => "UTC" |
|
261 | 261 | ), |
262 | 262 | "status" => "active", |
263 | 263 | "variations" => array( |
264 | - array( |
|
264 | + array( |
|
265 | 265 | "actions" => array( |
266 | - array( |
|
266 | + array( |
|
267 | 267 | "changes" => array( |
268 | - array( |
|
268 | + array( |
|
269 | 269 | "type" => "custom_code", |
270 | 270 | "allow_additional_redirect" => true, |
271 | 271 | "async" => true, |
272 | 272 | "selector" => "a[href*=\"optimizely\"]", |
273 | 273 | "dependencies" => array( |
274 | - 24, |
|
275 | - 26 |
|
274 | + 24, |
|
275 | + 26 |
|
276 | 276 | ), |
277 | 277 | "destination" => "https://app.optimizely.com/", |
278 | 278 | "extension_id" => 1234, |
279 | 279 | "preserve_parameters" => true, |
280 | 280 | "src" => 524, |
281 | 281 | "value" => "window.someGlobalFunction();" |
282 | - ) |
|
282 | + ) |
|
283 | 283 | ), |
284 | 284 | "page_id" => 0 |
285 | - ) |
|
285 | + ) |
|
286 | 286 | ), |
287 | 287 | "archived" => true, |
288 | 288 | "key" => "blue_button_variation", |
289 | 289 | "name" => "Blue Button", |
290 | 290 | "variation_id" => 0, |
291 | 291 | "weight" => 0 |
292 | - ) |
|
292 | + ) |
|
293 | 293 | ) |
294 | 294 | ); |
295 | 295 |
@@ -86,15 +86,15 @@ discard block |
||
86 | 86 | "project_id" => 1000, |
87 | 87 | "archived" => false, |
88 | 88 | "conditions" => array( |
89 | - "and", |
|
90 | - array( |
|
89 | + "and", |
|
90 | + array( |
|
91 | 91 | "type" => "language", |
92 | 92 | "value" => "es" |
93 | - ), |
|
94 | - array( |
|
93 | + ), |
|
94 | + array( |
|
95 | 95 | "type" => "location", |
96 | 96 | "value" => "US-CA-SANFRANCISCO" |
97 | - ) |
|
97 | + ) |
|
98 | 98 | ), |
99 | 99 | "description" => "People that speak spanish and are in San Francisco", |
100 | 100 | "name" => "Spanish speaking San Franciscans", |
@@ -127,15 +127,15 @@ discard block |
||
127 | 127 | "project_id" => 1000, |
128 | 128 | "archived" => false, |
129 | 129 | "conditions" => array( |
130 | - "and", |
|
131 | - array( |
|
130 | + "and", |
|
131 | + array( |
|
132 | 132 | "type" => "language", |
133 | 133 | "value" => "es" |
134 | - ), |
|
135 | - array( |
|
134 | + ), |
|
135 | + array( |
|
136 | 136 | "type" => "location", |
137 | 137 | "value" => "US-CA-SANFRANCISCO" |
138 | - ) |
|
138 | + ) |
|
139 | 139 | ), |
140 | 140 | "description" => "People that speak spanish and are in San Francisco", |
141 | 141 | "name" => "Spanish speaking San Franciscans", |
@@ -154,15 +154,15 @@ discard block |
||
154 | 154 | "project_id" => 1000, |
155 | 155 | "archived" => false, |
156 | 156 | "conditions" => array( |
157 | - "and", |
|
158 | - array( |
|
157 | + "and", |
|
158 | + array( |
|
159 | 159 | "type" => "language", |
160 | 160 | "value" => "es" |
161 | - ), |
|
162 | - array( |
|
161 | + ), |
|
162 | + array( |
|
163 | 163 | "type" => "location", |
164 | 164 | "value" => "US-CA-SANFRANCISCO" |
165 | - ) |
|
165 | + ) |
|
166 | 166 | ), |
167 | 167 | "description" => "People that speak spanish and are in San Francisco", |
168 | 168 | "name" => "Spanish speaking San Franciscans", |
@@ -187,15 +187,15 @@ discard block |
||
187 | 187 | "project_id" => 1000, |
188 | 188 | "archived" => false, |
189 | 189 | "conditions" => array( |
190 | - "and", |
|
191 | - array( |
|
190 | + "and", |
|
191 | + array( |
|
192 | 192 | "type" => "language", |
193 | 193 | "value" => "es" |
194 | - ), |
|
195 | - array( |
|
194 | + ), |
|
195 | + array( |
|
196 | 196 | "type" => "location", |
197 | 197 | "value" => "US-CA-SANFRANCISCO" |
198 | - ) |
|
198 | + ) |
|
199 | 199 | ), |
200 | 200 | "description" => "People that speak spanish and are in San Francisco", |
201 | 201 | "name" => "Spanish speaking San Franciscans", |
@@ -214,15 +214,15 @@ discard block |
||
214 | 214 | "project_id" => 1000, |
215 | 215 | "archived" => false, |
216 | 216 | "conditions" => array( |
217 | - "and", |
|
218 | - array( |
|
217 | + "and", |
|
218 | + array( |
|
219 | 219 | "type" => "language", |
220 | 220 | "value" => "es" |
221 | - ), |
|
222 | - array( |
|
221 | + ), |
|
222 | + array( |
|
223 | 223 | "type" => "location", |
224 | 224 | "value" => "US-CA-SANFRANCISCO" |
225 | - ) |
|
225 | + ) |
|
226 | 226 | ), |
227 | 227 | "description" => "People that speak spanish and are in San Francisco", |
228 | 228 | "name" => "Spanish speaking San Franciscans", |
@@ -255,14 +255,14 @@ discard block |
||
255 | 255 | "platform" => "web", |
256 | 256 | "status" => "active", |
257 | 257 | "web_snippet" => array( |
258 | - "enable_force_variation" => false, |
|
259 | - "exclude_disabled_experiments" => false, |
|
260 | - "exclude_names" => true, |
|
261 | - "include_jquery" => true, |
|
262 | - "ip_anonymization" => false, |
|
263 | - "ip_filter" => "^206\\.23\\.100\\.([5-9][0-9]|1([0-4][0-9]|50))$", |
|
264 | - "library" => "jquery-1.11.3-trim", |
|
265 | - "project_javascript" => "alert(\"Active Experiment\")" |
|
258 | + "enable_force_variation" => false, |
|
259 | + "exclude_disabled_experiments" => false, |
|
260 | + "exclude_names" => true, |
|
261 | + "include_jquery" => true, |
|
262 | + "ip_anonymization" => false, |
|
263 | + "ip_filter" => "^206\\.23\\.100\\.([5-9][0-9]|1([0-4][0-9]|50))$", |
|
264 | + "library" => "jquery-1.11.3-trim", |
|
265 | + "project_javascript" => "alert(\"Active Experiment\")" |
|
266 | 266 | ) |
267 | 267 | )); |
268 | 268 |
@@ -24,20 +24,20 @@ discard block |
||
24 | 24 | array( |
25 | 25 | "project_id" => 1000, |
26 | 26 | "audience_ids" => array( |
27 | - 1234, |
|
28 | - 1212, |
|
29 | - 1432 |
|
27 | + 1234, |
|
28 | + 1212, |
|
29 | + 1432 |
|
30 | 30 | ), |
31 | 31 | "campaign_id" => 2000, |
32 | 32 | "changes" => array( |
33 | - array( |
|
33 | + array( |
|
34 | 34 | "type" => "custom_code", |
35 | 35 | "allow_additional_redirect" => true, |
36 | 36 | "async" => true, |
37 | 37 | "selector" => "a[href*=\"optimizely\"]", |
38 | 38 | "dependencies" => array( |
39 | - 24, |
|
40 | - 26 |
|
39 | + 24, |
|
40 | + 26 |
|
41 | 41 | ), |
42 | 42 | "destination" => "https://app.optimizely.com/", |
43 | 43 | "extension_id" => 1234, |
@@ -45,39 +45,39 @@ discard block |
||
45 | 45 | "src" => 524, |
46 | 46 | "value" => "window.someGlobalFunction();", |
47 | 47 | "id" => "string" |
48 | - ) |
|
48 | + ) |
|
49 | 49 | ), |
50 | 50 | "description" => "string", |
51 | 51 | "holdback" => 5000, |
52 | 52 | "key" => "home_page_experiment", |
53 | 53 | "metrics" => array( |
54 | - array( |
|
54 | + array( |
|
55 | 55 | "aggregator" => "unique", |
56 | 56 | "event_id" => 0, |
57 | 57 | "field" => "revenue", |
58 | 58 | "scope" => "session" |
59 | - ) |
|
59 | + ) |
|
60 | 60 | ), |
61 | 61 | "name" => "Blue Button Experiment", |
62 | 62 | "schedule" => array( |
63 | - "start_time" => "2016-10-17T07:05:00.070Z", |
|
64 | - "stop_time" => "2016-10-17T07:05:00.070Z", |
|
65 | - "time_zone" => "UTC" |
|
63 | + "start_time" => "2016-10-17T07:05:00.070Z", |
|
64 | + "stop_time" => "2016-10-17T07:05:00.070Z", |
|
65 | + "time_zone" => "UTC" |
|
66 | 66 | ), |
67 | 67 | "status" => "active", |
68 | 68 | "variations" => array( |
69 | - array( |
|
69 | + array( |
|
70 | 70 | "actions" => array( |
71 | - array( |
|
71 | + array( |
|
72 | 72 | "changes" => array( |
73 | - array( |
|
73 | + array( |
|
74 | 74 | "type" => "custom_code", |
75 | 75 | "allow_additional_redirect" => true, |
76 | 76 | "async" => true, |
77 | 77 | "selector" => "a[href*=\"optimizely\"]", |
78 | 78 | "dependencies" => array( |
79 | - 24, |
|
80 | - 26 |
|
79 | + 24, |
|
80 | + 26 |
|
81 | 81 | ), |
82 | 82 | "destination" => "https://app.optimizely.com/", |
83 | 83 | "extension_id" => 1234, |
@@ -85,23 +85,23 @@ discard block |
||
85 | 85 | "src" => 524, |
86 | 86 | "value" => "window.someGlobalFunction();", |
87 | 87 | "id" => "string" |
88 | - ) |
|
88 | + ) |
|
89 | 89 | ), |
90 | 90 | "page_id" => 0 |
91 | - ) |
|
91 | + ) |
|
92 | 92 | ), |
93 | 93 | "archived"=> true, |
94 | 94 | "key" => "blue_button_variation", |
95 | 95 | "name" => "Blue Button", |
96 | 96 | "variation_id" => 0, |
97 | 97 | "weight" => 0 |
98 | - ) |
|
98 | + ) |
|
99 | 99 | ), |
100 | 100 | "created" => "2016-10-17T07:05:00.070Z", |
101 | 101 | "id" => 3000, |
102 | 102 | "is_classic" => false, |
103 | 103 | "last_modified" => "2016-10-17T07:05:00.070Z" |
104 | - ) |
|
104 | + ) |
|
105 | 105 | ), 200); |
106 | 106 | |
107 | 107 | $optimizelyApiClientMock->method('sendApiRequest') |
@@ -172,20 +172,20 @@ discard block |
||
172 | 172 | $result = new Result(array( |
173 | 173 | "project_id" => 1000, |
174 | 174 | "audience_ids" => array( |
175 | - 1234, |
|
176 | - 1212, |
|
177 | - 1432 |
|
175 | + 1234, |
|
176 | + 1212, |
|
177 | + 1432 |
|
178 | 178 | ), |
179 | 179 | "campaign_id" => 2000, |
180 | 180 | "changes" => array( |
181 | - array( |
|
181 | + array( |
|
182 | 182 | "type" => "custom_code", |
183 | 183 | "allow_additional_redirect" => true, |
184 | 184 | "async" => true, |
185 | 185 | "selector" => "a[href*=\"optimizely\"]", |
186 | 186 | "dependencies" => array( |
187 | - 24, |
|
188 | - 26 |
|
187 | + 24, |
|
188 | + 26 |
|
189 | 189 | ), |
190 | 190 | "destination" => "https://app.optimizely.com/", |
191 | 191 | "extension_id" => 1234, |
@@ -193,39 +193,39 @@ discard block |
||
193 | 193 | "src" => 524, |
194 | 194 | "value" => "window.someGlobalFunction();", |
195 | 195 | "id" => "string" |
196 | - ) |
|
196 | + ) |
|
197 | 197 | ), |
198 | 198 | "description" => "string", |
199 | 199 | "holdback" => 5000, |
200 | 200 | "key" => "home_page_experiment", |
201 | 201 | "metrics" => array( |
202 | - array( |
|
202 | + array( |
|
203 | 203 | "aggregator" => "unique", |
204 | 204 | "event_id" => 0, |
205 | 205 | "field" => "revenue", |
206 | 206 | "scope" => "session" |
207 | - ) |
|
207 | + ) |
|
208 | 208 | ), |
209 | 209 | "name" => "Blue Button Experiment", |
210 | 210 | "schedule" => array( |
211 | - "start_time" => "2016-10-17T07:05:00.070Z", |
|
212 | - "stop_time" => "2016-10-17T07:05:00.070Z", |
|
213 | - "time_zone" => "UTC" |
|
211 | + "start_time" => "2016-10-17T07:05:00.070Z", |
|
212 | + "stop_time" => "2016-10-17T07:05:00.070Z", |
|
213 | + "time_zone" => "UTC" |
|
214 | 214 | ), |
215 | 215 | "status" => "active", |
216 | 216 | "variations" => array( |
217 | - array( |
|
217 | + array( |
|
218 | 218 | "actions" => array( |
219 | - array( |
|
219 | + array( |
|
220 | 220 | "changes" => array( |
221 | - array( |
|
221 | + array( |
|
222 | 222 | "type" => "custom_code", |
223 | 223 | "allow_additional_redirect" => true, |
224 | 224 | "async" => true, |
225 | 225 | "selector" => "a[href*=\"optimizely\"]", |
226 | 226 | "dependencies" => array( |
227 | - 24, |
|
228 | - 26 |
|
227 | + 24, |
|
228 | + 26 |
|
229 | 229 | ), |
230 | 230 | "destination" => "https://app.optimizely.com/", |
231 | 231 | "extension_id" => 1234, |
@@ -233,23 +233,23 @@ discard block |
||
233 | 233 | "src" => 524, |
234 | 234 | "value" => "window.someGlobalFunction();", |
235 | 235 | "id" => "string" |
236 | - ) |
|
236 | + ) |
|
237 | 237 | ), |
238 | 238 | "page_id" => 0 |
239 | - ) |
|
239 | + ) |
|
240 | 240 | ), |
241 | 241 | "archived"=> true, |
242 | 242 | "key" => "blue_button_variation", |
243 | 243 | "name" => "Blue Button", |
244 | 244 | "variation_id" => 0, |
245 | 245 | "weight" => 0 |
246 | - ) |
|
246 | + ) |
|
247 | 247 | ), |
248 | 248 | "created" => "2016-10-17T07:05:00.070Z", |
249 | 249 | "id" => 3000, |
250 | 250 | "is_classic" => false, |
251 | 251 | "last_modified" => "2016-10-17T07:05:00.070Z" |
252 | - ), 200); |
|
252 | + ), 200); |
|
253 | 253 | |
254 | 254 | $optimizelyApiClientMock->method('sendApiRequest') |
255 | 255 | ->willReturn($result); |
@@ -305,7 +305,7 @@ discard block |
||
305 | 305 | "end_time" => "2016-10-17T07:05:00.089Z", |
306 | 306 | "experiment_id" => 3000, |
307 | 307 | "metrics" => array( |
308 | - array( |
|
308 | + array( |
|
309 | 309 | "event" => "string", |
310 | 310 | "event_name" => "string", |
311 | 311 | "measure" => "conversions", |
@@ -313,54 +313,54 @@ discard block |
||
313 | 313 | "priority" => 1, |
314 | 314 | "unit" => "session", |
315 | 315 | "variation_results" => array( |
316 | - "9000" => array( |
|
316 | + "9000" => array( |
|
317 | 317 | "experiment_id" => 0, |
318 | 318 | "is_baseline" => true, |
319 | 319 | "lift" => array( |
320 | - "confidence_interval" => array( |
|
320 | + "confidence_interval" => array( |
|
321 | 321 | 0.010399560300730457, |
322 | 322 | 0.0850821459929161 |
323 | - ), |
|
324 | - "is_most_conclusive" => true, |
|
325 | - "is_significant" => true, |
|
326 | - "significance" => 0, |
|
327 | - "value" => 0, |
|
328 | - "visitors_remaining" => 0 |
|
323 | + ), |
|
324 | + "is_most_conclusive" => true, |
|
325 | + "is_significant" => true, |
|
326 | + "significance" => 0, |
|
327 | + "value" => 0, |
|
328 | + "visitors_remaining" => 0 |
|
329 | 329 | ), |
330 | 330 | "name" => "Blue Button", |
331 | 331 | "rate" => 0, |
332 | 332 | "scope" => "variation", |
333 | 333 | "total_increase" => array( |
334 | - "confidence_interval" => array( |
|
334 | + "confidence_interval" => array( |
|
335 | 335 | 0.010399560300730457, |
336 | 336 | 0.0850821459929161 |
337 | - ), |
|
338 | - "is_most_conclusive" => true, |
|
339 | - "is_significant" => true, |
|
340 | - "significance" => 0, |
|
341 | - "value" => 0, |
|
342 | - "visitors_remaining" => 0 |
|
337 | + ), |
|
338 | + "is_most_conclusive" => true, |
|
339 | + "is_significant" => true, |
|
340 | + "significance" => 0, |
|
341 | + "value" => 0, |
|
342 | + "visitors_remaining" => 0 |
|
343 | 343 | ), |
344 | 344 | "value" => 0, |
345 | 345 | "variation_id" => "string" |
346 | - ) |
|
346 | + ) |
|
347 | + ) |
|
347 | 348 | ) |
348 | - ) |
|
349 | 349 | ), |
350 | 350 | "reach" => array( |
351 | - "baseline_count" => 0, |
|
352 | - "baseline_reach" => 0, |
|
353 | - "total_count" => 0, |
|
354 | - "treatment_count" => 0, |
|
355 | - "treatment_reach" => 0, |
|
356 | - "variations" => array( |
|
351 | + "baseline_count" => 0, |
|
352 | + "baseline_reach" => 0, |
|
353 | + "total_count" => 0, |
|
354 | + "treatment_count" => 0, |
|
355 | + "treatment_reach" => 0, |
|
356 | + "variations" => array( |
|
357 | 357 | "9000" => array( |
358 | - "count" => 0, |
|
359 | - "name" => "Blue Button", |
|
360 | - "variation_id" => "string", |
|
361 | - "variation_reach" => 0 |
|
358 | + "count" => 0, |
|
359 | + "name" => "Blue Button", |
|
360 | + "variation_id" => "string", |
|
361 | + "variation_reach" => 0 |
|
362 | + ) |
|
362 | 363 | ) |
363 | - ) |
|
364 | 364 | ), |
365 | 365 | "start_time" => "2016-10-17T07:05:00.090Z" |
366 | 366 | ), 200); |
@@ -387,20 +387,20 @@ discard block |
||
387 | 387 | $result = new Result(array( |
388 | 388 | "project_id" => 1000, |
389 | 389 | "audience_ids" => array( |
390 | - 1234, |
|
391 | - 1212, |
|
392 | - 1432 |
|
390 | + 1234, |
|
391 | + 1212, |
|
392 | + 1432 |
|
393 | 393 | ), |
394 | 394 | "campaign_id" => 2000, |
395 | 395 | "changes" => array( |
396 | - array( |
|
396 | + array( |
|
397 | 397 | "type" => "custom_code", |
398 | 398 | "allow_additional_redirect" => true, |
399 | 399 | "async" => true, |
400 | 400 | "selector" => "a[href*=\"optimizely\"]", |
401 | 401 | "dependencies" => array( |
402 | - 24, |
|
403 | - 26 |
|
402 | + 24, |
|
403 | + 26 |
|
404 | 404 | ), |
405 | 405 | "destination" => "https://app.optimizely.com/", |
406 | 406 | "extension_id" => 1234, |
@@ -408,39 +408,39 @@ discard block |
||
408 | 408 | "src" => 524, |
409 | 409 | "value" => "window.someGlobalFunction();", |
410 | 410 | "id" => "string" |
411 | - ) |
|
411 | + ) |
|
412 | 412 | ), |
413 | 413 | "description" => "string", |
414 | 414 | "holdback" => 5000, |
415 | 415 | "key" => "home_page_experiment", |
416 | 416 | "metrics" => array( |
417 | - array( |
|
417 | + array( |
|
418 | 418 | "aggregator" => "unique", |
419 | 419 | "event_id" => 0, |
420 | 420 | "field" => "revenue", |
421 | 421 | "scope" => "session" |
422 | - ) |
|
422 | + ) |
|
423 | 423 | ), |
424 | 424 | "name" => "Blue Button Experiment", |
425 | 425 | "schedule" => array( |
426 | - "start_time" => "2016-10-17T07:05:00.099Z", |
|
427 | - "stop_time" => "2016-10-17T07:05:00.099Z", |
|
428 | - "time_zone" => "UTC" |
|
426 | + "start_time" => "2016-10-17T07:05:00.099Z", |
|
427 | + "stop_time" => "2016-10-17T07:05:00.099Z", |
|
428 | + "time_zone" => "UTC" |
|
429 | 429 | ), |
430 | 430 | "status" => "active", |
431 | 431 | "variations" => array( |
432 | - array( |
|
432 | + array( |
|
433 | 433 | "actions" => array( |
434 | - array( |
|
434 | + array( |
|
435 | 435 | "changes" => array( |
436 | - array( |
|
436 | + array( |
|
437 | 437 | "type" => "custom_code", |
438 | 438 | "allow_additional_redirect" => true, |
439 | 439 | "async" => true, |
440 | 440 | "selector" => "a[href*=\"optimizely\"]", |
441 | 441 | "dependencies" => array( |
442 | - 24, |
|
443 | - 26 |
|
442 | + 24, |
|
443 | + 26 |
|
444 | 444 | ), |
445 | 445 | "destination" => "https://app.optimizely.com/", |
446 | 446 | "extension_id" => 1234, |
@@ -448,17 +448,17 @@ discard block |
||
448 | 448 | "src" => 524, |
449 | 449 | "value" => "window.someGlobalFunction();", |
450 | 450 | "id" => "string" |
451 | - ) |
|
451 | + ) |
|
452 | 452 | ), |
453 | 453 | "page_id" => 0 |
454 | - ) |
|
454 | + ) |
|
455 | 455 | ), |
456 | 456 | "archived" => true, |
457 | 457 | "key" => "blue_button_variation", |
458 | 458 | "name" => "Blue Button", |
459 | 459 | "variation_id" => 0, |
460 | 460 | "weight" => 0 |
461 | - ) |
|
461 | + ) |
|
462 | 462 | ), |
463 | 463 | "created" => "2016-10-17T07:05:00.099Z", |
464 | 464 | "id" => 3000, |
@@ -474,76 +474,76 @@ discard block |
||
474 | 474 | $experiment = new Experiment(array( |
475 | 475 | "project_id" => 1000, |
476 | 476 | "audience_ids" => array( |
477 | - 1234, |
|
478 | - 1212, |
|
479 | - 1432 |
|
477 | + 1234, |
|
478 | + 1212, |
|
479 | + 1432 |
|
480 | 480 | ), |
481 | 481 | "campaign_id" => 2000, |
482 | 482 | "changes" => array( |
483 | - array( |
|
483 | + array( |
|
484 | 484 | "type" => "custom_code", |
485 | 485 | "allow_additional_redirect" => true, |
486 | 486 | "async" => true, |
487 | 487 | "selector" => "a[href*=\"optimizely\"]", |
488 | 488 | "dependencies" => array( |
489 | - 24, |
|
490 | - 26 |
|
489 | + 24, |
|
490 | + 26 |
|
491 | 491 | ), |
492 | 492 | "destination" => "https://app.optimizely.com/", |
493 | 493 | "extension_id" => 1234, |
494 | 494 | "preserve_parameters" => true, |
495 | 495 | "src" => 524, |
496 | 496 | "value" => "window.someGlobalFunction();" |
497 | - ) |
|
497 | + ) |
|
498 | 498 | ), |
499 | 499 | "description" => "string", |
500 | 500 | "holdback" => 5000, |
501 | 501 | "key" => "home_page_experiment", |
502 | 502 | "metrics" => array( |
503 | - array( |
|
503 | + array( |
|
504 | 504 | "aggregator" => "unique", |
505 | 505 | "event_id" => 0, |
506 | 506 | "field" => "revenue", |
507 | 507 | "scope" => "session" |
508 | - ) |
|
508 | + ) |
|
509 | 509 | ), |
510 | 510 | "name" => "Blue Button Experiment", |
511 | 511 | "schedule" => array( |
512 | - "start_time" => "2016-10-17T07:04:59.724Z", |
|
513 | - "stop_time" => "2016-10-17T07:04:59.724Z", |
|
514 | - "time_zone" => "UTC" |
|
512 | + "start_time" => "2016-10-17T07:04:59.724Z", |
|
513 | + "stop_time" => "2016-10-17T07:04:59.724Z", |
|
514 | + "time_zone" => "UTC" |
|
515 | 515 | ), |
516 | 516 | "status" => "active", |
517 | 517 | "variations" => array( |
518 | - array( |
|
518 | + array( |
|
519 | 519 | "actions" => array( |
520 | - array( |
|
520 | + array( |
|
521 | 521 | "changes" => array( |
522 | - array( |
|
522 | + array( |
|
523 | 523 | "type" => "custom_code", |
524 | 524 | "allow_additional_redirect" => true, |
525 | 525 | "async" => true, |
526 | 526 | "selector" => "a[href*=\"optimizely\"]", |
527 | 527 | "dependencies" => array( |
528 | - 24, |
|
529 | - 26 |
|
528 | + 24, |
|
529 | + 26 |
|
530 | 530 | ), |
531 | 531 | "destination" => "https://app.optimizely.com/", |
532 | 532 | "extension_id" => 1234, |
533 | 533 | "preserve_parameters" => true, |
534 | 534 | "src" => 524, |
535 | 535 | "value" => "window.someGlobalFunction();" |
536 | - ) |
|
536 | + ) |
|
537 | 537 | ), |
538 | 538 | "page_id" => 0 |
539 | - ) |
|
539 | + ) |
|
540 | 540 | ), |
541 | 541 | "archived" => true, |
542 | 542 | "key" => "blue_button_variation", |
543 | 543 | "name" => "Blue Button", |
544 | 544 | "variation_id" => 0, |
545 | 545 | "weight" => 0 |
546 | - ) |
|
546 | + ) |
|
547 | 547 | ) |
548 | 548 | )); |
549 | 549 | |
@@ -564,20 +564,20 @@ discard block |
||
564 | 564 | $result = new Result(array( |
565 | 565 | "project_id" => 1000, |
566 | 566 | "audience_ids" => array( |
567 | - 1234, |
|
568 | - 1212, |
|
569 | - 1432 |
|
567 | + 1234, |
|
568 | + 1212, |
|
569 | + 1432 |
|
570 | 570 | ), |
571 | 571 | "campaign_id" => 2000, |
572 | 572 | "changes" => array( |
573 | - array( |
|
573 | + array( |
|
574 | 574 | "type" => "custom_code", |
575 | 575 | "allow_additional_redirect" => true, |
576 | 576 | "async" => true, |
577 | 577 | "selector" => "a[href*=\"optimizely\"]", |
578 | 578 | "dependencies" => array( |
579 | - 24, |
|
580 | - 26 |
|
579 | + 24, |
|
580 | + 26 |
|
581 | 581 | ), |
582 | 582 | "destination" => "https://app.optimizely.com/", |
583 | 583 | "extension_id" => 1234, |
@@ -585,39 +585,39 @@ discard block |
||
585 | 585 | "src" => 524, |
586 | 586 | "value" => "window.someGlobalFunction();", |
587 | 587 | "id" => "string" |
588 | - ) |
|
588 | + ) |
|
589 | 589 | ), |
590 | 590 | "description" => "string", |
591 | 591 | "holdback" => 5000, |
592 | 592 | "key" => "home_page_experiment", |
593 | 593 | "metrics" => array( |
594 | - array( |
|
594 | + array( |
|
595 | 595 | "aggregator" => "unique", |
596 | 596 | "event_id" => 0, |
597 | 597 | "field" => "revenue", |
598 | 598 | "scope" => "session" |
599 | - ) |
|
599 | + ) |
|
600 | 600 | ), |
601 | 601 | "name" => "Blue Button Experiment", |
602 | 602 | "schedule" => array( |
603 | - "start_time" => "2016-10-17T07:05:00.109Z", |
|
604 | - "stop_time" => "2016-10-17T07:05:00.109Z", |
|
605 | - "time_zone" => "UTC" |
|
603 | + "start_time" => "2016-10-17T07:05:00.109Z", |
|
604 | + "stop_time" => "2016-10-17T07:05:00.109Z", |
|
605 | + "time_zone" => "UTC" |
|
606 | 606 | ), |
607 | 607 | "status" => "active", |
608 | 608 | "variations" => array( |
609 | - array( |
|
609 | + array( |
|
610 | 610 | "actions" => array( |
611 | - array( |
|
611 | + array( |
|
612 | 612 | "changes" => array( |
613 | - array( |
|
613 | + array( |
|
614 | 614 | "type" => "custom_code", |
615 | 615 | "allow_additional_redirect" => true, |
616 | 616 | "async" => true, |
617 | 617 | "selector" => "a[href*=\"optimizely\"]", |
618 | 618 | "dependencies" => array( |
619 | - 24, |
|
620 | - 26 |
|
619 | + 24, |
|
620 | + 26 |
|
621 | 621 | ), |
622 | 622 | "destination" => "https://app.optimizely.com/", |
623 | 623 | "extension_id" => 1234, |
@@ -625,17 +625,17 @@ discard block |
||
625 | 625 | "src" => 524, |
626 | 626 | "value" => "window.someGlobalFunction();", |
627 | 627 | "id" => "string" |
628 | - ) |
|
628 | + ) |
|
629 | 629 | ), |
630 | 630 | "page_id" => 0 |
631 | - ) |
|
631 | + ) |
|
632 | 632 | ), |
633 | 633 | "archived" => true, |
634 | 634 | "key" => "blue_button_variation", |
635 | 635 | "name" => "Blue Button", |
636 | 636 | "variation_id" => 0, |
637 | 637 | "weight" => 0 |
638 | - ) |
|
638 | + ) |
|
639 | 639 | ), |
640 | 640 | "created" => "2016-10-17T07:05:00.109Z", |
641 | 641 | "id" => 3000, |
@@ -649,75 +649,75 @@ discard block |
||
649 | 649 | $experimentsService = new Experiments($optimizelyApiClientMock); |
650 | 650 | |
651 | 651 | $experiment = new Experiment(array( |
652 | - "audience_ids" => array( |
|
652 | + "audience_ids" => array( |
|
653 | 653 | 0 |
654 | - ), |
|
655 | - "changes" => array( |
|
654 | + ), |
|
655 | + "changes" => array( |
|
656 | 656 | array( |
657 | - "type" => "custom_code", |
|
658 | - "allow_additional_redirect" => true, |
|
659 | - "async" => true, |
|
660 | - "selector" => "a[href*=\"optimizely\"]", |
|
661 | - "dependencies" => array( |
|
657 | + "type" => "custom_code", |
|
658 | + "allow_additional_redirect" => true, |
|
659 | + "async" => true, |
|
660 | + "selector" => "a[href*=\"optimizely\"]", |
|
661 | + "dependencies" => array( |
|
662 | 662 | 24, |
663 | 663 | 26 |
664 | - ), |
|
665 | - "destination" => "https://app.optimizely.com/", |
|
666 | - "extension_id" => 1234, |
|
667 | - "preserve_parameters" => true, |
|
668 | - "src" => 524, |
|
669 | - "value" => "window.someGlobalFunction();" |
|
664 | + ), |
|
665 | + "destination" => "https://app.optimizely.com/", |
|
666 | + "extension_id" => 1234, |
|
667 | + "preserve_parameters" => true, |
|
668 | + "src" => 524, |
|
669 | + "value" => "window.someGlobalFunction();" |
|
670 | 670 | ) |
671 | - ), |
|
672 | - "description" => "AB Test to see if the Blue Button converts more visitors", |
|
673 | - "holdback" => 0, |
|
674 | - "key" => "home_page_experiment", |
|
675 | - "metrics" => array( |
|
671 | + ), |
|
672 | + "description" => "AB Test to see if the Blue Button converts more visitors", |
|
673 | + "holdback" => 0, |
|
674 | + "key" => "home_page_experiment", |
|
675 | + "metrics" => array( |
|
676 | 676 | array( |
677 | - "aggregator" => "unique", |
|
678 | - "event_id" => 0, |
|
679 | - "field" => "revenue", |
|
680 | - "scope" => "session" |
|
677 | + "aggregator" => "unique", |
|
678 | + "event_id" => 0, |
|
679 | + "field" => "revenue", |
|
680 | + "scope" => "session" |
|
681 | 681 | ) |
682 | - ), |
|
683 | - "name" => "Blue Button Experiment", |
|
684 | - "schedule" => array( |
|
682 | + ), |
|
683 | + "name" => "Blue Button Experiment", |
|
684 | + "schedule" => array( |
|
685 | 685 | "start_time" => "2016-10-17T07:04:59.731Z", |
686 | 686 | "stop_time" => "2016-10-17T07:04:59.731Z", |
687 | 687 | "time_zone" => "UTC" |
688 | - ), |
|
689 | - "status" => "active", |
|
690 | - "variations" => array( |
|
688 | + ), |
|
689 | + "status" => "active", |
|
690 | + "variations" => array( |
|
691 | 691 | array( |
692 | - "actions" => array( |
|
692 | + "actions" => array( |
|
693 | 693 | array( |
694 | - "changes" => array( |
|
694 | + "changes" => array( |
|
695 | 695 | array( |
696 | - "type" => "custom_code", |
|
697 | - "allow_additional_redirect" => true, |
|
698 | - "async" => true, |
|
699 | - "selector" => "a[href*=\"optimizely\"]", |
|
700 | - "dependencies" => array( |
|
696 | + "type" => "custom_code", |
|
697 | + "allow_additional_redirect" => true, |
|
698 | + "async" => true, |
|
699 | + "selector" => "a[href*=\"optimizely\"]", |
|
700 | + "dependencies" => array( |
|
701 | 701 | 24, |
702 | 702 | 26 |
703 | - ), |
|
704 | - "destination" => "https://app.optimizely.com/", |
|
705 | - "extension_id" => 1234, |
|
706 | - "preserve_parameters" => true, |
|
707 | - "src" => 524, |
|
708 | - "value" => "window.someGlobalFunction();" |
|
703 | + ), |
|
704 | + "destination" => "https://app.optimizely.com/", |
|
705 | + "extension_id" => 1234, |
|
706 | + "preserve_parameters" => true, |
|
707 | + "src" => 524, |
|
708 | + "value" => "window.someGlobalFunction();" |
|
709 | 709 | ) |
710 | - ), |
|
711 | - "page_id" => 0 |
|
710 | + ), |
|
711 | + "page_id" => 0 |
|
712 | 712 | ) |
713 | - ), |
|
714 | - "archived" => true, |
|
715 | - "key" => "blue_button_variation", |
|
716 | - "name" => "Blue Button", |
|
717 | - "variation_id" => 0, |
|
718 | - "weight" => 0 |
|
713 | + ), |
|
714 | + "archived" => true, |
|
715 | + "key" => "blue_button_variation", |
|
716 | + "name" => "Blue Button", |
|
717 | + "variation_id" => 0, |
|
718 | + "weight" => 0 |
|
719 | + ) |
|
719 | 720 | ) |
720 | - ) |
|
721 | 721 | )); |
722 | 722 | |
723 | 723 | $result = $experimentsService->update(1000, $experiment, true, true); |
@@ -765,14 +765,14 @@ discard block |
||
765 | 765 | "platform" => "web", |
766 | 766 | "status" => "active", |
767 | 767 | "web_snippet" => array( |
768 | - "enable_force_variation" => false, |
|
769 | - "exclude_disabled_experiments" => false, |
|
770 | - "exclude_names" => true, |
|
771 | - "include_jquery" => true, |
|
772 | - "ip_anonymization" => false, |
|
773 | - "ip_filter" => "^206\\.23\\.100\\.([5-9][0-9]|1([0-4][0-9]|50))$", |
|
774 | - "library" => "jquery-1.11.3-trim", |
|
775 | - "project_javascript" => "alert(\"Active Experiment\")" |
|
768 | + "enable_force_variation" => false, |
|
769 | + "exclude_disabled_experiments" => false, |
|
770 | + "exclude_names" => true, |
|
771 | + "include_jquery" => true, |
|
772 | + "ip_anonymization" => false, |
|
773 | + "ip_filter" => "^206\\.23\\.100\\.([5-9][0-9]|1([0-4][0-9]|50))$", |
|
774 | + "library" => "jquery-1.11.3-trim", |
|
775 | + "project_javascript" => "alert(\"Active Experiment\")" |
|
776 | 776 | ) |
777 | 777 | )); |
778 | 778 | |
@@ -783,12 +783,12 @@ discard block |
||
783 | 783 | $experiment = new Experiment(array( |
784 | 784 | "project_id" => $createdProject->getId(), |
785 | 785 | "variations" => array( |
786 | - array( |
|
786 | + array( |
|
787 | 787 | "weight" => 0, |
788 | 788 | "actions" => array( |
789 | - array( |
|
789 | + array( |
|
790 | 790 | "changes" => array( |
791 | - /*array( |
|
791 | + /*array( |
|
792 | 792 | "type" => "attribute", |
793 | 793 | "allow_additional_redirect" => true, |
794 | 794 | "async" => true, |
@@ -830,17 +830,17 @@ discard block |
||
830 | 830 | )*/ |
831 | 831 | ), |
832 | 832 | "page_id" => 0 |
833 | - ) |
|
833 | + ) |
|
834 | 834 | ), |
835 | 835 | "archived" => true, |
836 | 836 | "key" => "blue_button_variation", |
837 | 837 | "name" => "Blue Button" |
838 | - ) |
|
838 | + ) |
|
839 | 839 | ), |
840 | 840 | "audience_conditions" => "[\"and\", {\"audience_id\": 7000}, {\"audience_id\":7001}]", |
841 | 841 | "campaign_id" => 2000, |
842 | 842 | "changes" => array( |
843 | - /*array( |
|
843 | + /*array( |
|
844 | 844 | "type" => "attribute", |
845 | 845 | "allow_additional_redirect" => true, |
846 | 846 | "async" => true, |
@@ -885,18 +885,18 @@ discard block |
||
885 | 885 | "holdback" => 5000, |
886 | 886 | "key" => "home_page_experiment", |
887 | 887 | "metrics" => array( |
888 | - array( |
|
888 | + array( |
|
889 | 889 | "aggregator" => "unique", |
890 | 890 | "event_id" => 0, |
891 | 891 | "field" => "revenue", |
892 | 892 | "scope" => "session" |
893 | - ) |
|
893 | + ) |
|
894 | 894 | ), |
895 | 895 | "name" => "Blue Button Experiment", |
896 | 896 | "schedule" => array( |
897 | - "start_time" => "string", |
|
898 | - "stop_time" => "string", |
|
899 | - "time_zone" => "GMT-01:00" |
|
897 | + "start_time" => "string", |
|
898 | + "stop_time" => "string", |
|
899 | + "time_zone" => "GMT-01:00" |
|
900 | 900 | ), |
901 | 901 | "type" => "a/b" |
902 | 902 | )); |
@@ -23,14 +23,14 @@ discard block |
||
23 | 23 | array( |
24 | 24 | "project_id" => 1000, |
25 | 25 | "changes" => array( |
26 | - array( |
|
26 | + array( |
|
27 | 27 | "type" => "custom_code", |
28 | 28 | "allow_additional_redirect" => true, |
29 | 29 | "async" => true, |
30 | 30 | "selector" => "a[href*=\"optimizely\"]", |
31 | 31 | "dependencies" => array( |
32 | - 24, |
|
33 | - 26 |
|
32 | + 24, |
|
33 | + 26 |
|
34 | 34 | ), |
35 | 35 | "destination" => "https://app.optimizely.com/", |
36 | 36 | "extension_id" => 1234, |
@@ -38,32 +38,32 @@ discard block |
||
38 | 38 | "src" => 524, |
39 | 39 | "value" => "window.someGlobalFunction();", |
40 | 40 | "id" => "string" |
41 | - ) |
|
41 | + ) |
|
42 | 42 | ), |
43 | 43 | "created" => "2016-10-18T03:27:04.123Z", |
44 | 44 | "earliest" => "2016-10-18T03:27:04.123Z", |
45 | 45 | "experiment_ids" => array( |
46 | - 0 |
|
46 | + 0 |
|
47 | 47 | ), |
48 | 48 | "holdback" => 0, |
49 | 49 | "last_modified" => "2016-10-18T03:27:04.123Z", |
50 | 50 | "latest" => "2016-10-18T03:27:04.123Z", |
51 | 51 | "metrics" => array( |
52 | - array( |
|
52 | + array( |
|
53 | 53 | "aggregator" => "unique", |
54 | 54 | "event_id" => 0, |
55 | 55 | "field" => "revenue", |
56 | 56 | "scope" => "session" |
57 | - ) |
|
57 | + ) |
|
58 | 58 | ), |
59 | 59 | "name" => "Landing Page Optimization", |
60 | 60 | "page_ids" => array( |
61 | - 0 |
|
61 | + 0 |
|
62 | 62 | ), |
63 | 63 | "status" => "active", |
64 | 64 | "type" => "a/b", |
65 | 65 | "id" => 2000 |
66 | - ) |
|
66 | + ) |
|
67 | 67 | ), 200); |
68 | 68 | |
69 | 69 | $optimizelyApiClientMock->method('sendApiRequest') |
@@ -119,14 +119,14 @@ discard block |
||
119 | 119 | $result = new Result(array( |
120 | 120 | "project_id" => 1000, |
121 | 121 | "changes" => array( |
122 | - array( |
|
122 | + array( |
|
123 | 123 | "type" => "custom_code", |
124 | 124 | "allow_additional_redirect" => true, |
125 | 125 | "async" => true, |
126 | 126 | "selector" => "a[href*=\"optimizely\"]", |
127 | 127 | "dependencies" => array( |
128 | - 24, |
|
129 | - 26 |
|
128 | + 24, |
|
129 | + 26 |
|
130 | 130 | ), |
131 | 131 | "destination" => "https://app.optimizely.com/", |
132 | 132 | "extension_id" => 1234, |
@@ -134,27 +134,27 @@ discard block |
||
134 | 134 | "src" => 524, |
135 | 135 | "value" => "window.someGlobalFunction();", |
136 | 136 | "id" => "string" |
137 | - ) |
|
137 | + ) |
|
138 | 138 | ), |
139 | 139 | "created" => "2016-10-18T03:27:04.139Z", |
140 | 140 | "earliest" => "2016-10-18T03:27:04.139Z", |
141 | 141 | "experiment_ids" => array( |
142 | - 0 |
|
142 | + 0 |
|
143 | 143 | ), |
144 | 144 | "holdback" => 0, |
145 | 145 | "last_modified" => "2016-10-18T03:27:04.139Z", |
146 | 146 | "latest" => "2016-10-18T03:27:04.139Z", |
147 | 147 | "metrics" => array( |
148 | - array( |
|
148 | + array( |
|
149 | 149 | "aggregator" => "unique", |
150 | 150 | "event_id" => 0, |
151 | 151 | "field" => "revenue", |
152 | 152 | "scope" => "session" |
153 | - ) |
|
153 | + ) |
|
154 | 154 | ), |
155 | 155 | "name" => "Landing Page Optimization", |
156 | 156 | "page_ids" => array( |
157 | - 0 |
|
157 | + 0 |
|
158 | 158 | ), |
159 | 159 | "status" => "active", |
160 | 160 | "type" => "a/b", |
@@ -185,47 +185,47 @@ discard block |
||
185 | 185 | "confidence_threshold" => 0, |
186 | 186 | "end_time" => "2016-10-18T03:27:04.147Z", |
187 | 187 | "metrics" => array( |
188 | - array( |
|
188 | + array( |
|
189 | 189 | "event" => "string", |
190 | 190 | "event_name" => "string", |
191 | 191 | "measure" => "conversions", |
192 | 192 | "metric_id" => "string", |
193 | 193 | "priority" => 0, |
194 | 194 | "results" => array( |
195 | - "campaign" => array( |
|
195 | + "campaign" => array( |
|
196 | 196 | "experiment_id" => 0, |
197 | 197 | "is_baseline" => true, |
198 | 198 | "lift" => array( |
199 | - "confidence_interval" => array( |
|
199 | + "confidence_interval" => array( |
|
200 | 200 | 0.010399560300730457, |
201 | 201 | 0.0850821459929161 |
202 | - ), |
|
203 | - "is_most_conclusive" => true, |
|
204 | - "is_significant" => true, |
|
205 | - "significance" => 0, |
|
206 | - "value" => 0, |
|
207 | - "visitors_remaining" => 0 |
|
202 | + ), |
|
203 | + "is_most_conclusive" => true, |
|
204 | + "is_significant" => true, |
|
205 | + "significance" => 0, |
|
206 | + "value" => 0, |
|
207 | + "visitors_remaining" => 0 |
|
208 | 208 | ), |
209 | 209 | "name" => "Blue Button", |
210 | 210 | "rate" => 0, |
211 | 211 | "scope" => "variation", |
212 | 212 | "total_increase" => array( |
213 | - "confidence_interval" => array( |
|
213 | + "confidence_interval" => array( |
|
214 | 214 | 0.010399560300730457, |
215 | 215 | 0.0850821459929161 |
216 | - ), |
|
217 | - "is_most_conclusive" => true, |
|
218 | - "is_significant" => true, |
|
219 | - "significance" => 0, |
|
220 | - "value" => 0, |
|
221 | - "visitors_remaining" => 0 |
|
216 | + ), |
|
217 | + "is_most_conclusive" => true, |
|
218 | + "is_significant" => true, |
|
219 | + "significance" => 0, |
|
220 | + "value" => 0, |
|
221 | + "visitors_remaining" => 0 |
|
222 | 222 | ), |
223 | 223 | "value" => 0, |
224 | 224 | "variation_id" => "string" |
225 | - ) |
|
225 | + ) |
|
226 | 226 | ), |
227 | 227 | "unit" => "session" |
228 | - ) |
|
228 | + ) |
|
229 | 229 | ), |
230 | 230 | "start_time" => "2016-10-18T03:27:04.148Z" |
231 | 231 | ), 200); |
@@ -253,14 +253,14 @@ discard block |
||
253 | 253 | $result = new Result(array( |
254 | 254 | "project_id" => 1000, |
255 | 255 | "changes" => array( |
256 | - array( |
|
256 | + array( |
|
257 | 257 | "type" => "custom_code", |
258 | 258 | "allow_additional_redirect" => true, |
259 | 259 | "async" => true, |
260 | 260 | "selector" => "a[href*=\"optimizely\"]", |
261 | 261 | "dependencies" => array( |
262 | - 24, |
|
263 | - 26 |
|
262 | + 24, |
|
263 | + 26 |
|
264 | 264 | ), |
265 | 265 | "destination" => "https://app.optimizely.com/", |
266 | 266 | "extension_id" => 1234, |
@@ -268,27 +268,27 @@ discard block |
||
268 | 268 | "src" => 524, |
269 | 269 | "value" => "window.someGlobalFunction();", |
270 | 270 | "id" => "string" |
271 | - ) |
|
271 | + ) |
|
272 | 272 | ), |
273 | 273 | "created" => "2016-10-18T03:27:04.155Z", |
274 | 274 | "earliest" => "2016-10-18T03:27:04.155Z", |
275 | 275 | "experiment_ids" => array( |
276 | - 0 |
|
276 | + 0 |
|
277 | 277 | ), |
278 | 278 | "holdback" => 0, |
279 | 279 | "last_modified" => "2016-10-18T03:27:04.155Z", |
280 | 280 | "latest" => "2016-10-18T03:27:04.155Z", |
281 | 281 | "metrics" => array( |
282 | - array( |
|
282 | + array( |
|
283 | 283 | "aggregator" => "unique", |
284 | 284 | "event_id" => 0, |
285 | 285 | "field" => "revenue", |
286 | 286 | "scope" => "session" |
287 | - ) |
|
287 | + ) |
|
288 | 288 | ), |
289 | 289 | "name" => "Landing Page Optimization", |
290 | 290 | "page_ids" => array( |
291 | - 0 |
|
291 | + 0 |
|
292 | 292 | ), |
293 | 293 | "status" => "active", |
294 | 294 | "type" => "a/b", |
@@ -303,41 +303,41 @@ discard block |
||
303 | 303 | $campaign = new Campaign(array( |
304 | 304 | "project_id" => 1000, |
305 | 305 | "changes" => array( |
306 | - array( |
|
306 | + array( |
|
307 | 307 | "type" => "custom_code", |
308 | 308 | "allow_additional_redirect" => true, |
309 | 309 | "async" => true, |
310 | 310 | "selector" => "a[href*=\"optimizely\"]", |
311 | 311 | "dependencies" => array( |
312 | - 24, |
|
313 | - 26 |
|
312 | + 24, |
|
313 | + 26 |
|
314 | 314 | ), |
315 | 315 | "destination" => "https://app.optimizely.com/", |
316 | 316 | "extension_id" => 1234, |
317 | 317 | "preserve_parameters" => true, |
318 | 318 | "src" => 524, |
319 | 319 | "value" => "window.someGlobalFunction();" |
320 | - ) |
|
320 | + ) |
|
321 | 321 | ), |
322 | 322 | "created" => "2016-10-18T03:27:04.067Z", |
323 | 323 | "earliest" => "2016-10-18T03:27:04.067Z", |
324 | 324 | "experiment_ids" => array( |
325 | - 0 |
|
325 | + 0 |
|
326 | 326 | ), |
327 | 327 | "holdback" => 0, |
328 | 328 | "last_modified" => "2016-10-18T03:27:04.067Z", |
329 | 329 | "latest" => "2016-10-18T03:27:04.067Z", |
330 | 330 | "metrics" => array( |
331 | - array( |
|
331 | + array( |
|
332 | 332 | "aggregator" => "unique", |
333 | 333 | "event_id" => 0, |
334 | 334 | "field" => "revenue", |
335 | 335 | "scope" => "session" |
336 | - ) |
|
336 | + ) |
|
337 | 337 | ), |
338 | 338 | "name" => "Landing Page Optimization", |
339 | 339 | "page_ids" => array( |
340 | - 0 |
|
340 | + 0 |
|
341 | 341 | ), |
342 | 342 | "status" => "active", |
343 | 343 | "type" => "a/b" |
@@ -360,14 +360,14 @@ discard block |
||
360 | 360 | $result = new Result(array( |
361 | 361 | "project_id" => 1000, |
362 | 362 | "changes" => array( |
363 | - array( |
|
363 | + array( |
|
364 | 364 | "type" => "custom_code", |
365 | 365 | "allow_additional_redirect" => true, |
366 | 366 | "async" => true, |
367 | 367 | "selector" => "a[href*=\"optimizely\"]", |
368 | 368 | "dependencies" => array( |
369 | - 24, |
|
370 | - 26 |
|
369 | + 24, |
|
370 | + 26 |
|
371 | 371 | ), |
372 | 372 | "destination" => "https://app.optimizely.com/", |
373 | 373 | "extension_id" => 1234, |
@@ -375,27 +375,27 @@ discard block |
||
375 | 375 | "src" => 524, |
376 | 376 | "value" => "window.someGlobalFunction();", |
377 | 377 | "id" => "string" |
378 | - ) |
|
378 | + ) |
|
379 | 379 | ), |
380 | 380 | "created" => "2016-10-18T03:27:04.155Z", |
381 | 381 | "earliest" => "2016-10-18T03:27:04.155Z", |
382 | 382 | "experiment_ids" => array( |
383 | - 0 |
|
383 | + 0 |
|
384 | 384 | ), |
385 | 385 | "holdback" => 0, |
386 | 386 | "last_modified" => "2016-10-18T03:27:04.155Z", |
387 | 387 | "latest" => "2016-10-18T03:27:04.155Z", |
388 | 388 | "metrics" => array( |
389 | - array( |
|
389 | + array( |
|
390 | 390 | "aggregator" => "unique", |
391 | 391 | "event_id" => 0, |
392 | 392 | "field" => "revenue", |
393 | 393 | "scope" => "session" |
394 | - ) |
|
394 | + ) |
|
395 | 395 | ), |
396 | 396 | "name" => "Landing Page Optimization", |
397 | 397 | "page_ids" => array( |
398 | - 0 |
|
398 | + 0 |
|
399 | 399 | ), |
400 | 400 | "status" => "active", |
401 | 401 | "type" => "a/b", |
@@ -410,41 +410,41 @@ discard block |
||
410 | 410 | $campaign = new Campaign(array( |
411 | 411 | "project_id" => 1000, |
412 | 412 | "changes" => array( |
413 | - array( |
|
413 | + array( |
|
414 | 414 | "type" => "custom_code", |
415 | 415 | "allow_additional_redirect" => true, |
416 | 416 | "async" => true, |
417 | 417 | "selector" => "a[href*=\"optimizely\"]", |
418 | 418 | "dependencies" => array( |
419 | - 24, |
|
420 | - 26 |
|
419 | + 24, |
|
420 | + 26 |
|
421 | 421 | ), |
422 | 422 | "destination" => "https://app.optimizely.com/", |
423 | 423 | "extension_id" => 1234, |
424 | 424 | "preserve_parameters" => true, |
425 | 425 | "src" => 524, |
426 | 426 | "value" => "window.someGlobalFunction();" |
427 | - ) |
|
427 | + ) |
|
428 | 428 | ), |
429 | 429 | "created" => "2016-10-18T03:27:04.067Z", |
430 | 430 | "earliest" => "2016-10-18T03:27:04.067Z", |
431 | 431 | "experiment_ids" => array( |
432 | - 0 |
|
432 | + 0 |
|
433 | 433 | ), |
434 | 434 | "holdback" => 0, |
435 | 435 | "last_modified" => "2016-10-18T03:27:04.067Z", |
436 | 436 | "latest" => "2016-10-18T03:27:04.067Z", |
437 | 437 | "metrics" => array( |
438 | - array( |
|
438 | + array( |
|
439 | 439 | "aggregator" => "unique", |
440 | 440 | "event_id" => 0, |
441 | 441 | "field" => "revenue", |
442 | 442 | "scope" => "session" |
443 | - ) |
|
443 | + ) |
|
444 | 444 | ), |
445 | 445 | "name" => "Landing Page Optimization", |
446 | 446 | "page_ids" => array( |
447 | - 0 |
|
447 | + 0 |
|
448 | 448 | ), |
449 | 449 | "status" => "active", |
450 | 450 | "type" => "a/b" |
@@ -496,14 +496,14 @@ discard block |
||
496 | 496 | "platform" => "web", |
497 | 497 | "status" => "active", |
498 | 498 | "web_snippet" => array( |
499 | - "enable_force_variation" => false, |
|
500 | - "exclude_disabled_experiments" => false, |
|
501 | - "exclude_names" => true, |
|
502 | - "include_jquery" => true, |
|
503 | - "ip_anonymization" => false, |
|
504 | - "ip_filter" => "^206\\.23\\.100\\.([5-9][0-9]|1([0-4][0-9]|50))$", |
|
505 | - "library" => "jquery-1.11.3-trim", |
|
506 | - "project_javascript" => "alert(\"Active Experiment\")" |
|
499 | + "enable_force_variation" => false, |
|
500 | + "exclude_disabled_experiments" => false, |
|
501 | + "exclude_names" => true, |
|
502 | + "include_jquery" => true, |
|
503 | + "ip_anonymization" => false, |
|
504 | + "ip_filter" => "^206\\.23\\.100\\.([5-9][0-9]|1([0-4][0-9]|50))$", |
|
505 | + "library" => "jquery-1.11.3-trim", |
|
506 | + "project_javascript" => "alert(\"Active Experiment\")" |
|
507 | 507 | ) |
508 | 508 | )); |
509 | 509 | |
@@ -514,30 +514,30 @@ discard block |
||
514 | 514 | $campaign = new Campaign(array( |
515 | 515 | "project_id" => $createdProject->getId(), |
516 | 516 | "changes" => array( |
517 | - array( |
|
517 | + array( |
|
518 | 518 | "type" => "custom_code", |
519 | 519 | "value" => "window.someGlobalFunction();" |
520 | - ) |
|
520 | + ) |
|
521 | 521 | ), |
522 | 522 | "created" => "2016-10-18T03:27:04.067Z", |
523 | 523 | "earliest" => "2016-10-18T03:27:04.067Z", |
524 | 524 | "experiment_ids" => array( |
525 | - 0 |
|
525 | + 0 |
|
526 | 526 | ), |
527 | 527 | "holdback" => 0, |
528 | 528 | "last_modified" => "2016-10-18T03:27:04.067Z", |
529 | 529 | "latest" => "2016-10-18T03:27:04.067Z", |
530 | 530 | "metrics" => array( |
531 | - array( |
|
531 | + array( |
|
532 | 532 | "aggregator" => "unique", |
533 | 533 | "event_id" => 0, |
534 | 534 | "field" => "revenue", |
535 | 535 | "scope" => "session" |
536 | - ) |
|
536 | + ) |
|
537 | 537 | ), |
538 | 538 | "name" => "Landing Page Optimization", |
539 | 539 | "page_ids" => array( |
540 | - 0 |
|
540 | + 0 |
|
541 | 541 | ), |
542 | 542 | "status" => "not_started", |
543 | 543 | "type" => "a/b" |
@@ -26,8 +26,8 @@ discard block |
||
26 | 26 | "category" => "add_to_cart", |
27 | 27 | "description" => "Item added to cart", |
28 | 28 | "event_filter" => array( |
29 | - "filter_type" => "target_selector", |
|
30 | - "selector" => ".menu-options" |
|
29 | + "filter_type" => "target_selector", |
|
30 | + "selector" => ".menu-options" |
|
31 | 31 | ), |
32 | 32 | "event_type" => "custom", |
33 | 33 | "key" => "add_to_cart", |
@@ -66,8 +66,8 @@ discard block |
||
66 | 66 | "category" => "add_to_cart", |
67 | 67 | "description" => "Item added to cart", |
68 | 68 | "event_filter" => array( |
69 | - "filter_type" => "target_selector", |
|
70 | - "selector" => ".menu-options" |
|
69 | + "filter_type" => "target_selector", |
|
70 | + "selector" => ".menu-options" |
|
71 | 71 | ), |
72 | 72 | "event_type" => "custom", |
73 | 73 | "key" => "add_to_cart", |
@@ -100,22 +100,22 @@ discard block |
||
100 | 100 | ->getMock(); |
101 | 101 | |
102 | 102 | $result = new Result(array( |
103 | - "event_filter" => array( |
|
103 | + "event_filter" => array( |
|
104 | 104 | "filter_type" => "target_selector", |
105 | 105 | "selector" => ".menu-options" |
106 | - ), |
|
107 | - "name" => "Add to Cart", |
|
108 | - "archived" => true, |
|
109 | - "category" => "add_to_cart", |
|
110 | - "description" => "string", |
|
111 | - "event_type" => "click", |
|
112 | - "key" => "add_to_cart", |
|
113 | - "created" => "2016-10-18T05:07:04.153Z", |
|
114 | - "id" => 0, |
|
115 | - "is_classic" => false, |
|
116 | - "is_editable" => true, |
|
117 | - "page_id" => 0, |
|
118 | - "project_id" => 1000 |
|
106 | + ), |
|
107 | + "name" => "Add to Cart", |
|
108 | + "archived" => true, |
|
109 | + "category" => "add_to_cart", |
|
110 | + "description" => "string", |
|
111 | + "event_type" => "click", |
|
112 | + "key" => "add_to_cart", |
|
113 | + "created" => "2016-10-18T05:07:04.153Z", |
|
114 | + "id" => 0, |
|
115 | + "is_classic" => false, |
|
116 | + "is_editable" => true, |
|
117 | + "page_id" => 0, |
|
118 | + "project_id" => 1000 |
|
119 | 119 | ), 201); |
120 | 120 | |
121 | 121 | $optimizelyApiClientMock->method('sendApiRequest') |
@@ -124,16 +124,16 @@ discard block |
||
124 | 124 | $eventsService = new Events($optimizelyApiClientMock); |
125 | 125 | |
126 | 126 | $event = new ClickEvent(array( |
127 | - "event_filter" => array( |
|
127 | + "event_filter" => array( |
|
128 | 128 | "filter_type" => "target_selector", |
129 | 129 | "selector" => ".menu-options" |
130 | - ), |
|
131 | - "name" => "Add to Cart", |
|
132 | - "archived" => true, |
|
133 | - "category" => "add_to_cart", |
|
134 | - "description" => "string", |
|
135 | - "event_type" => "click", |
|
136 | - "key" => "add_to_cart" |
|
130 | + ), |
|
131 | + "name" => "Add to Cart", |
|
132 | + "archived" => true, |
|
133 | + "category" => "add_to_cart", |
|
134 | + "description" => "string", |
|
135 | + "event_type" => "click", |
|
136 | + "key" => "add_to_cart" |
|
137 | 137 | )); |
138 | 138 | |
139 | 139 | $result = $eventsService->createClickEvent(0, $event); |
@@ -194,22 +194,22 @@ discard block |
||
194 | 194 | ->getMock(); |
195 | 195 | |
196 | 196 | $result = new Result(array( |
197 | - "event_filter" => array( |
|
197 | + "event_filter" => array( |
|
198 | 198 | "filter_type" => "target_selector", |
199 | 199 | "selector" => ".menu-options" |
200 | - ), |
|
201 | - "name" => "Add to Cart", |
|
202 | - "archived" => true, |
|
203 | - "category" => "add_to_cart", |
|
204 | - "description" => "string", |
|
205 | - "event_type" => "click", |
|
206 | - "key" => "add_to_cart", |
|
207 | - "created" => "2016-10-18T05:07:04.153Z", |
|
208 | - "id" => 0, |
|
209 | - "is_classic" => false, |
|
210 | - "is_editable" => true, |
|
211 | - "page_id" => 0, |
|
212 | - "project_id" => 1000 |
|
200 | + ), |
|
201 | + "name" => "Add to Cart", |
|
202 | + "archived" => true, |
|
203 | + "category" => "add_to_cart", |
|
204 | + "description" => "string", |
|
205 | + "event_type" => "click", |
|
206 | + "key" => "add_to_cart", |
|
207 | + "created" => "2016-10-18T05:07:04.153Z", |
|
208 | + "id" => 0, |
|
209 | + "is_classic" => false, |
|
210 | + "is_editable" => true, |
|
211 | + "page_id" => 0, |
|
212 | + "project_id" => 1000 |
|
213 | 213 | ), 200); |
214 | 214 | |
215 | 215 | $optimizelyApiClientMock->method('sendApiRequest') |
@@ -218,16 +218,16 @@ discard block |
||
218 | 218 | $eventsService = new Events($optimizelyApiClientMock); |
219 | 219 | |
220 | 220 | $event = new ClickEvent(array( |
221 | - "event_filter" => array( |
|
221 | + "event_filter" => array( |
|
222 | 222 | "filter_type" => "target_selector", |
223 | 223 | "selector" => ".menu-options" |
224 | - ), |
|
225 | - "name" => "Add to Cart", |
|
226 | - "archived" => true, |
|
227 | - "category" => "add_to_cart", |
|
228 | - "description" => "string", |
|
229 | - "event_type" => "click", |
|
230 | - "key" => "add_to_cart" |
|
224 | + ), |
|
225 | + "name" => "Add to Cart", |
|
226 | + "archived" => true, |
|
227 | + "category" => "add_to_cart", |
|
228 | + "description" => "string", |
|
229 | + "event_type" => "click", |
|
230 | + "key" => "add_to_cart" |
|
231 | 231 | )); |
232 | 232 | |
233 | 233 | $result = $eventsService->updateClickEvent(0, 0, $event); |
@@ -299,14 +299,14 @@ discard block |
||
299 | 299 | "platform" => "web", |
300 | 300 | "status" => "active", |
301 | 301 | "web_snippet" => array( |
302 | - "enable_force_variation" => false, |
|
303 | - "exclude_disabled_experiments" => false, |
|
304 | - "exclude_names" => true, |
|
305 | - "include_jquery" => true, |
|
306 | - "ip_anonymization" => false, |
|
307 | - "ip_filter" => "^206\\.23\\.100\\.([5-9][0-9]|1([0-4][0-9]|50))$", |
|
308 | - "library" => "jquery-1.11.3-trim", |
|
309 | - "project_javascript" => "alert(\"Active Experiment\")" |
|
302 | + "enable_force_variation" => false, |
|
303 | + "exclude_disabled_experiments" => false, |
|
304 | + "exclude_names" => true, |
|
305 | + "include_jquery" => true, |
|
306 | + "ip_anonymization" => false, |
|
307 | + "ip_filter" => "^206\\.23\\.100\\.([5-9][0-9]|1([0-4][0-9]|50))$", |
|
308 | + "library" => "jquery-1.11.3-trim", |
|
309 | + "project_javascript" => "alert(\"Active Experiment\")" |
|
310 | 310 | ) |
311 | 311 | )); |
312 | 312 | |
@@ -338,22 +338,22 @@ discard block |
||
338 | 338 | |
339 | 339 | // Create new event in the project |
340 | 340 | $event = new ClickEvent(array( |
341 | - "event_filter" => array( |
|
341 | + "event_filter" => array( |
|
342 | 342 | "filter_type" => "target_selector", |
343 | 343 | "selector" => ".menu-options" |
344 | - ), |
|
345 | - "name" => "Add to Cart", |
|
346 | - "archived" => true, |
|
347 | - "category" => "add_to_cart", |
|
348 | - "description" => "Some simple event", |
|
349 | - "event_type" => "click", |
|
350 | - "key" => "add_to_cart", |
|
351 | - "created" => "2016-10-18T05:07:04.153Z", |
|
352 | - "id" => 0, |
|
353 | - "is_classic" => false, |
|
354 | - "is_editable" => true, |
|
355 | - "page_id" => $createdPage->getId(), |
|
356 | - "project_id" => $createdProject->getId() |
|
344 | + ), |
|
345 | + "name" => "Add to Cart", |
|
346 | + "archived" => true, |
|
347 | + "category" => "add_to_cart", |
|
348 | + "description" => "Some simple event", |
|
349 | + "event_type" => "click", |
|
350 | + "key" => "add_to_cart", |
|
351 | + "created" => "2016-10-18T05:07:04.153Z", |
|
352 | + "id" => 0, |
|
353 | + "is_classic" => false, |
|
354 | + "is_editable" => true, |
|
355 | + "page_id" => $createdPage->getId(), |
|
356 | + "project_id" => $createdProject->getId() |
|
357 | 357 | )); |
358 | 358 | |
359 | 359 | $result = $optimizelyClient->events()->createClickEvent($createdPage->getId(), $event); |
@@ -205,14 +205,14 @@ |
||
205 | 205 | "platform" => "web", |
206 | 206 | "status" => "active", |
207 | 207 | "web_snippet" => array( |
208 | - "enable_force_variation" => false, |
|
209 | - "exclude_disabled_experiments" => false, |
|
210 | - "exclude_names" => true, |
|
211 | - "include_jquery" => true, |
|
212 | - "ip_anonymization" => false, |
|
213 | - "ip_filter" => "^206\\.23\\.100\\.([5-9][0-9]|1([0-4][0-9]|50))$", |
|
214 | - "library" => "jquery-1.11.3-trim", |
|
215 | - "project_javascript" => "alert(\"Active Experiment\")" |
|
208 | + "enable_force_variation" => false, |
|
209 | + "exclude_disabled_experiments" => false, |
|
210 | + "exclude_names" => true, |
|
211 | + "include_jquery" => true, |
|
212 | + "ip_anonymization" => false, |
|
213 | + "ip_filter" => "^206\\.23\\.100\\.([5-9][0-9]|1([0-4][0-9]|50))$", |
|
214 | + "library" => "jquery-1.11.3-trim", |
|
215 | + "project_javascript" => "alert(\"Active Experiment\")" |
|
216 | 216 | ) |
217 | 217 | )); |
218 | 218 |
@@ -217,14 +217,14 @@ |
||
217 | 217 | "platform" => "web", |
218 | 218 | "status" => "active", |
219 | 219 | "web_snippet" => array( |
220 | - "enable_force_variation" => false, |
|
221 | - "exclude_disabled_experiments" => false, |
|
222 | - "exclude_names" => true, |
|
223 | - "include_jquery" => true, |
|
224 | - "ip_anonymization" => false, |
|
225 | - "ip_filter" => "^206\\.23\\.100\\.([5-9][0-9]|1([0-4][0-9]|50))$", |
|
226 | - "library" => "jquery-1.11.3-trim", |
|
227 | - "project_javascript" => "alert(\"Active Experiment\")" |
|
220 | + "enable_force_variation" => false, |
|
221 | + "exclude_disabled_experiments" => false, |
|
222 | + "exclude_names" => true, |
|
223 | + "include_jquery" => true, |
|
224 | + "ip_anonymization" => false, |
|
225 | + "ip_filter" => "^206\\.23\\.100\\.([5-9][0-9]|1([0-4][0-9]|50))$", |
|
226 | + "library" => "jquery-1.11.3-trim", |
|
227 | + "project_javascript" => "alert(\"Active Experiment\")" |
|
228 | 228 | ) |
229 | 229 | )); |
230 | 230 |