@@ -23,20 +23,20 @@ discard block |
||
| 23 | 23 | array( |
| 24 | 24 | "project_id" => 1000, |
| 25 | 25 | "audience_ids" => array( |
| 26 | - 1234, |
|
| 27 | - 1212, |
|
| 28 | - 1432 |
|
| 26 | + 1234, |
|
| 27 | + 1212, |
|
| 28 | + 1432 |
|
| 29 | 29 | ), |
| 30 | 30 | "campaign_id" => 2000, |
| 31 | 31 | "changes" => array( |
| 32 | - array( |
|
| 32 | + array( |
|
| 33 | 33 | "type" => "custom_code", |
| 34 | 34 | "allow_additional_redirect" => true, |
| 35 | 35 | "async" => true, |
| 36 | 36 | "css_selector" => "a[href*=\"optimizely\"]", |
| 37 | 37 | "dependencies" => array( |
| 38 | - 24, |
|
| 39 | - 26 |
|
| 38 | + 24, |
|
| 39 | + 26 |
|
| 40 | 40 | ), |
| 41 | 41 | "destination" => "https://app.optimizely.com/", |
| 42 | 42 | "extension_id" => 1234, |
@@ -44,37 +44,37 @@ discard block |
||
| 44 | 44 | "src" => 524, |
| 45 | 45 | "value" => "window.someGlobalFunction();", |
| 46 | 46 | "id" => "string" |
| 47 | - ) |
|
| 47 | + ) |
|
| 48 | 48 | ), |
| 49 | 49 | "description" => "string", |
| 50 | 50 | "holdback" => 5000, |
| 51 | 51 | "key" => "home_page_experiment", |
| 52 | 52 | "metrics" => array( |
| 53 | - array( |
|
| 53 | + array( |
|
| 54 | 54 | "kind" => "string", |
| 55 | 55 | "id" => 0 |
| 56 | - ) |
|
| 56 | + ) |
|
| 57 | 57 | ), |
| 58 | 58 | "name" => "Blue Button Experiment", |
| 59 | 59 | "schedule" => array( |
| 60 | - "start_time" => "2016-10-17T07:05:00.070Z", |
|
| 61 | - "stop_time" => "2016-10-17T07:05:00.070Z", |
|
| 62 | - "time_zone" => "UTC" |
|
| 60 | + "start_time" => "2016-10-17T07:05:00.070Z", |
|
| 61 | + "stop_time" => "2016-10-17T07:05:00.070Z", |
|
| 62 | + "time_zone" => "UTC" |
|
| 63 | 63 | ), |
| 64 | 64 | "status" => "active", |
| 65 | 65 | "variations" => array( |
| 66 | - array( |
|
| 66 | + array( |
|
| 67 | 67 | "actions" => array( |
| 68 | - array( |
|
| 68 | + array( |
|
| 69 | 69 | "changes" => array( |
| 70 | - array( |
|
| 70 | + array( |
|
| 71 | 71 | "type" => "custom_code", |
| 72 | 72 | "allow_additional_redirect" => true, |
| 73 | 73 | "async" => true, |
| 74 | 74 | "css_selector" => "a[href*=\"optimizely\"]", |
| 75 | 75 | "dependencies" => array( |
| 76 | - 24, |
|
| 77 | - 26 |
|
| 76 | + 24, |
|
| 77 | + 26 |
|
| 78 | 78 | ), |
| 79 | 79 | "destination" => "https://app.optimizely.com/", |
| 80 | 80 | "extension_id" => 1234, |
@@ -82,23 +82,23 @@ discard block |
||
| 82 | 82 | "src" => 524, |
| 83 | 83 | "value" => "window.someGlobalFunction();", |
| 84 | 84 | "id" => "string" |
| 85 | - ) |
|
| 85 | + ) |
|
| 86 | 86 | ), |
| 87 | 87 | "page_id" => 0 |
| 88 | - ) |
|
| 88 | + ) |
|
| 89 | 89 | ), |
| 90 | 90 | "archived"=> true, |
| 91 | 91 | "key" => "blue_button_variation", |
| 92 | 92 | "name" => "Blue Button", |
| 93 | 93 | "variation_id" => 0, |
| 94 | 94 | "weight" => 0 |
| 95 | - ) |
|
| 95 | + ) |
|
| 96 | 96 | ), |
| 97 | 97 | "created" => "2016-10-17T07:05:00.070Z", |
| 98 | 98 | "id" => 3000, |
| 99 | 99 | "is_classic" => false, |
| 100 | 100 | "last_modified" => "2016-10-17T07:05:00.070Z" |
| 101 | - ) |
|
| 101 | + ) |
|
| 102 | 102 | ), 200); |
| 103 | 103 | |
| 104 | 104 | $optimizelyApiClientMock->method('sendApiRequest') |
@@ -124,20 +124,20 @@ discard block |
||
| 124 | 124 | $result = new Result(array( |
| 125 | 125 | "project_id" => 1000, |
| 126 | 126 | "audience_ids" => array( |
| 127 | - 1234, |
|
| 128 | - 1212, |
|
| 129 | - 1432 |
|
| 127 | + 1234, |
|
| 128 | + 1212, |
|
| 129 | + 1432 |
|
| 130 | 130 | ), |
| 131 | 131 | "campaign_id" => 2000, |
| 132 | 132 | "changes" => array( |
| 133 | - array( |
|
| 133 | + array( |
|
| 134 | 134 | "type" => "custom_code", |
| 135 | 135 | "allow_additional_redirect" => true, |
| 136 | 136 | "async" => true, |
| 137 | 137 | "css_selector" => "a[href*=\"optimizely\"]", |
| 138 | 138 | "dependencies" => array( |
| 139 | - 24, |
|
| 140 | - 26 |
|
| 139 | + 24, |
|
| 140 | + 26 |
|
| 141 | 141 | ), |
| 142 | 142 | "destination" => "https://app.optimizely.com/", |
| 143 | 143 | "extension_id" => 1234, |
@@ -145,37 +145,37 @@ discard block |
||
| 145 | 145 | "src" => 524, |
| 146 | 146 | "value" => "window.someGlobalFunction();", |
| 147 | 147 | "id" => "string" |
| 148 | - ) |
|
| 148 | + ) |
|
| 149 | 149 | ), |
| 150 | 150 | "description" => "string", |
| 151 | 151 | "holdback" => 5000, |
| 152 | 152 | "key" => "home_page_experiment", |
| 153 | 153 | "metrics" => array( |
| 154 | - array( |
|
| 154 | + array( |
|
| 155 | 155 | "kind" => "string", |
| 156 | 156 | "id" => 0 |
| 157 | - ) |
|
| 157 | + ) |
|
| 158 | 158 | ), |
| 159 | 159 | "name" => "Blue Button Experiment", |
| 160 | 160 | "schedule" => array( |
| 161 | - "start_time" => "2016-10-17T07:05:00.070Z", |
|
| 162 | - "stop_time" => "2016-10-17T07:05:00.070Z", |
|
| 163 | - "time_zone" => "UTC" |
|
| 161 | + "start_time" => "2016-10-17T07:05:00.070Z", |
|
| 162 | + "stop_time" => "2016-10-17T07:05:00.070Z", |
|
| 163 | + "time_zone" => "UTC" |
|
| 164 | 164 | ), |
| 165 | 165 | "status" => "active", |
| 166 | 166 | "variations" => array( |
| 167 | - array( |
|
| 167 | + array( |
|
| 168 | 168 | "actions" => array( |
| 169 | - array( |
|
| 169 | + array( |
|
| 170 | 170 | "changes" => array( |
| 171 | - array( |
|
| 171 | + array( |
|
| 172 | 172 | "type" => "custom_code", |
| 173 | 173 | "allow_additional_redirect" => true, |
| 174 | 174 | "async" => true, |
| 175 | 175 | "css_selector" => "a[href*=\"optimizely\"]", |
| 176 | 176 | "dependencies" => array( |
| 177 | - 24, |
|
| 178 | - 26 |
|
| 177 | + 24, |
|
| 178 | + 26 |
|
| 179 | 179 | ), |
| 180 | 180 | "destination" => "https://app.optimizely.com/", |
| 181 | 181 | "extension_id" => 1234, |
@@ -183,23 +183,23 @@ discard block |
||
| 183 | 183 | "src" => 524, |
| 184 | 184 | "value" => "window.someGlobalFunction();", |
| 185 | 185 | "id" => "string" |
| 186 | - ) |
|
| 186 | + ) |
|
| 187 | 187 | ), |
| 188 | 188 | "page_id" => 0 |
| 189 | - ) |
|
| 189 | + ) |
|
| 190 | 190 | ), |
| 191 | 191 | "archived"=> true, |
| 192 | 192 | "key" => "blue_button_variation", |
| 193 | 193 | "name" => "Blue Button", |
| 194 | 194 | "variation_id" => 0, |
| 195 | 195 | "weight" => 0 |
| 196 | - ) |
|
| 196 | + ) |
|
| 197 | 197 | ), |
| 198 | 198 | "created" => "2016-10-17T07:05:00.070Z", |
| 199 | 199 | "id" => 3000, |
| 200 | 200 | "is_classic" => false, |
| 201 | 201 | "last_modified" => "2016-10-17T07:05:00.070Z" |
| 202 | - ), 200); |
|
| 202 | + ), 200); |
|
| 203 | 203 | |
| 204 | 204 | $optimizelyApiClientMock->method('sendApiRequest') |
| 205 | 205 | ->willReturn($result); |
@@ -225,7 +225,7 @@ discard block |
||
| 225 | 225 | "end_time" => "2016-10-17T07:05:00.089Z", |
| 226 | 226 | "experiment_id" => 3000, |
| 227 | 227 | "metrics" => array( |
| 228 | - array( |
|
| 228 | + array( |
|
| 229 | 229 | "event" => "string", |
| 230 | 230 | "event_name" => "string", |
| 231 | 231 | "measure" => "conversions", |
@@ -233,54 +233,54 @@ discard block |
||
| 233 | 233 | "priority" => 1, |
| 234 | 234 | "unit" => "session", |
| 235 | 235 | "variation_results" => array( |
| 236 | - "9000" => array( |
|
| 236 | + "9000" => array( |
|
| 237 | 237 | "experiment_id" => 0, |
| 238 | 238 | "is_baseline" => true, |
| 239 | 239 | "lift" => array( |
| 240 | - "confidence_interval" => array( |
|
| 240 | + "confidence_interval" => array( |
|
| 241 | 241 | 0.010399560300730457, |
| 242 | 242 | 0.0850821459929161 |
| 243 | - ), |
|
| 244 | - "is_most_conclusive" => true, |
|
| 245 | - "is_significant" => true, |
|
| 246 | - "significance" => 0, |
|
| 247 | - "value" => 0, |
|
| 248 | - "visitors_remaining" => 0 |
|
| 243 | + ), |
|
| 244 | + "is_most_conclusive" => true, |
|
| 245 | + "is_significant" => true, |
|
| 246 | + "significance" => 0, |
|
| 247 | + "value" => 0, |
|
| 248 | + "visitors_remaining" => 0 |
|
| 249 | 249 | ), |
| 250 | 250 | "name" => "Blue Button", |
| 251 | 251 | "rate" => 0, |
| 252 | 252 | "scope" => "variation", |
| 253 | 253 | "total_increase" => array( |
| 254 | - "confidence_interval" => array( |
|
| 254 | + "confidence_interval" => array( |
|
| 255 | 255 | 0.010399560300730457, |
| 256 | 256 | 0.0850821459929161 |
| 257 | - ), |
|
| 258 | - "is_most_conclusive" => true, |
|
| 259 | - "is_significant" => true, |
|
| 260 | - "significance" => 0, |
|
| 261 | - "value" => 0, |
|
| 262 | - "visitors_remaining" => 0 |
|
| 257 | + ), |
|
| 258 | + "is_most_conclusive" => true, |
|
| 259 | + "is_significant" => true, |
|
| 260 | + "significance" => 0, |
|
| 261 | + "value" => 0, |
|
| 262 | + "visitors_remaining" => 0 |
|
| 263 | 263 | ), |
| 264 | 264 | "value" => 0, |
| 265 | 265 | "variation_id" => "string" |
| 266 | - ) |
|
| 266 | + ) |
|
| 267 | + ) |
|
| 267 | 268 | ) |
| 268 | - ) |
|
| 269 | 269 | ), |
| 270 | 270 | "reach" => array( |
| 271 | - "baseline_count" => 0, |
|
| 272 | - "baseline_reach" => 0, |
|
| 273 | - "total_count" => 0, |
|
| 274 | - "treatment_count" => 0, |
|
| 275 | - "treatment_reach" => 0, |
|
| 276 | - "variations" => array( |
|
| 271 | + "baseline_count" => 0, |
|
| 272 | + "baseline_reach" => 0, |
|
| 273 | + "total_count" => 0, |
|
| 274 | + "treatment_count" => 0, |
|
| 275 | + "treatment_reach" => 0, |
|
| 276 | + "variations" => array( |
|
| 277 | 277 | "9000" => array( |
| 278 | - "count" => 0, |
|
| 279 | - "name" => "Blue Button", |
|
| 280 | - "variation_id" => "string", |
|
| 281 | - "variation_reach" => 0 |
|
| 278 | + "count" => 0, |
|
| 279 | + "name" => "Blue Button", |
|
| 280 | + "variation_id" => "string", |
|
| 281 | + "variation_reach" => 0 |
|
| 282 | + ) |
|
| 282 | 283 | ) |
| 283 | - ) |
|
| 284 | 284 | ), |
| 285 | 285 | "start_time" => "2016-10-17T07:05:00.090Z" |
| 286 | 286 | ), 200); |
@@ -307,20 +307,20 @@ discard block |
||
| 307 | 307 | $result = new Result(array( |
| 308 | 308 | "project_id" => 1000, |
| 309 | 309 | "audience_ids" => array( |
| 310 | - 1234, |
|
| 311 | - 1212, |
|
| 312 | - 1432 |
|
| 310 | + 1234, |
|
| 311 | + 1212, |
|
| 312 | + 1432 |
|
| 313 | 313 | ), |
| 314 | 314 | "campaign_id" => 2000, |
| 315 | 315 | "changes" => array( |
| 316 | - array( |
|
| 316 | + array( |
|
| 317 | 317 | "type" => "custom_code", |
| 318 | 318 | "allow_additional_redirect" => true, |
| 319 | 319 | "async" => true, |
| 320 | 320 | "css_selector" => "a[href*=\"optimizely\"]", |
| 321 | 321 | "dependencies" => array( |
| 322 | - 24, |
|
| 323 | - 26 |
|
| 322 | + 24, |
|
| 323 | + 26 |
|
| 324 | 324 | ), |
| 325 | 325 | "destination" => "https://app.optimizely.com/", |
| 326 | 326 | "extension_id" => 1234, |
@@ -328,37 +328,37 @@ discard block |
||
| 328 | 328 | "src" => 524, |
| 329 | 329 | "value" => "window.someGlobalFunction();", |
| 330 | 330 | "id" => "string" |
| 331 | - ) |
|
| 331 | + ) |
|
| 332 | 332 | ), |
| 333 | 333 | "description" => "string", |
| 334 | 334 | "holdback" => 5000, |
| 335 | 335 | "key" => "home_page_experiment", |
| 336 | 336 | "metrics" => array( |
| 337 | - array( |
|
| 337 | + array( |
|
| 338 | 338 | "kind" => "string", |
| 339 | 339 | "id" => 0 |
| 340 | - ) |
|
| 340 | + ) |
|
| 341 | 341 | ), |
| 342 | 342 | "name" => "Blue Button Experiment", |
| 343 | 343 | "schedule" => array( |
| 344 | - "start_time" => "2016-10-17T07:05:00.099Z", |
|
| 345 | - "stop_time" => "2016-10-17T07:05:00.099Z", |
|
| 346 | - "time_zone" => "UTC" |
|
| 344 | + "start_time" => "2016-10-17T07:05:00.099Z", |
|
| 345 | + "stop_time" => "2016-10-17T07:05:00.099Z", |
|
| 346 | + "time_zone" => "UTC" |
|
| 347 | 347 | ), |
| 348 | 348 | "status" => "active", |
| 349 | 349 | "variations" => array( |
| 350 | - array( |
|
| 350 | + array( |
|
| 351 | 351 | "actions" => array( |
| 352 | - array( |
|
| 352 | + array( |
|
| 353 | 353 | "changes" => array( |
| 354 | - array( |
|
| 354 | + array( |
|
| 355 | 355 | "type" => "custom_code", |
| 356 | 356 | "allow_additional_redirect" => true, |
| 357 | 357 | "async" => true, |
| 358 | 358 | "css_selector" => "a[href*=\"optimizely\"]", |
| 359 | 359 | "dependencies" => array( |
| 360 | - 24, |
|
| 361 | - 26 |
|
| 360 | + 24, |
|
| 361 | + 26 |
|
| 362 | 362 | ), |
| 363 | 363 | "destination" => "https://app.optimizely.com/", |
| 364 | 364 | "extension_id" => 1234, |
@@ -366,17 +366,17 @@ discard block |
||
| 366 | 366 | "src" => 524, |
| 367 | 367 | "value" => "window.someGlobalFunction();", |
| 368 | 368 | "id" => "string" |
| 369 | - ) |
|
| 369 | + ) |
|
| 370 | 370 | ), |
| 371 | 371 | "page_id" => 0 |
| 372 | - ) |
|
| 372 | + ) |
|
| 373 | 373 | ), |
| 374 | 374 | "archived" => true, |
| 375 | 375 | "key" => "blue_button_variation", |
| 376 | 376 | "name" => "Blue Button", |
| 377 | 377 | "variation_id" => 0, |
| 378 | 378 | "weight" => 0 |
| 379 | - ) |
|
| 379 | + ) |
|
| 380 | 380 | ), |
| 381 | 381 | "created" => "2016-10-17T07:05:00.099Z", |
| 382 | 382 | "id" => 3000, |
@@ -392,73 +392,73 @@ discard block |
||
| 392 | 392 | $experiment = new Experiment(array( |
| 393 | 393 | "project_id" => 1000, |
| 394 | 394 | "audience_ids" => array( |
| 395 | - 1234, |
|
| 396 | - 1212, |
|
| 397 | - 1432 |
|
| 395 | + 1234, |
|
| 396 | + 1212, |
|
| 397 | + 1432 |
|
| 398 | 398 | ), |
| 399 | 399 | "campaign_id" => 2000, |
| 400 | 400 | "changes" => array( |
| 401 | - array( |
|
| 401 | + array( |
|
| 402 | 402 | "type" => "custom_code", |
| 403 | 403 | "allow_additional_redirect" => true, |
| 404 | 404 | "async" => true, |
| 405 | 405 | "css_selector" => "a[href*=\"optimizely\"]", |
| 406 | 406 | "dependencies" => array( |
| 407 | - 24, |
|
| 408 | - 26 |
|
| 407 | + 24, |
|
| 408 | + 26 |
|
| 409 | 409 | ), |
| 410 | 410 | "destination" => "https://app.optimizely.com/", |
| 411 | 411 | "extension_id" => 1234, |
| 412 | 412 | "preserve_parameters" => true, |
| 413 | 413 | "src" => 524, |
| 414 | 414 | "value" => "window.someGlobalFunction();" |
| 415 | - ) |
|
| 415 | + ) |
|
| 416 | 416 | ), |
| 417 | 417 | "description" => "string", |
| 418 | 418 | "holdback" => 5000, |
| 419 | 419 | "key" => "home_page_experiment", |
| 420 | 420 | "metrics" => array( |
| 421 | - array( |
|
| 421 | + array( |
|
| 422 | 422 | "kind" => "string" |
| 423 | - ) |
|
| 423 | + ) |
|
| 424 | 424 | ), |
| 425 | 425 | "name" => "Blue Button Experiment", |
| 426 | 426 | "schedule" => array( |
| 427 | - "start_time" => "2016-10-17T07:04:59.724Z", |
|
| 428 | - "stop_time" => "2016-10-17T07:04:59.724Z", |
|
| 429 | - "time_zone" => "UTC" |
|
| 427 | + "start_time" => "2016-10-17T07:04:59.724Z", |
|
| 428 | + "stop_time" => "2016-10-17T07:04:59.724Z", |
|
| 429 | + "time_zone" => "UTC" |
|
| 430 | 430 | ), |
| 431 | 431 | "status" => "active", |
| 432 | 432 | "variations" => array( |
| 433 | - array( |
|
| 433 | + array( |
|
| 434 | 434 | "actions" => array( |
| 435 | - array( |
|
| 435 | + array( |
|
| 436 | 436 | "changes" => array( |
| 437 | - array( |
|
| 437 | + array( |
|
| 438 | 438 | "type" => "custom_code", |
| 439 | 439 | "allow_additional_redirect" => true, |
| 440 | 440 | "async" => true, |
| 441 | 441 | "css_selector" => "a[href*=\"optimizely\"]", |
| 442 | 442 | "dependencies" => array( |
| 443 | - 24, |
|
| 444 | - 26 |
|
| 443 | + 24, |
|
| 444 | + 26 |
|
| 445 | 445 | ), |
| 446 | 446 | "destination" => "https://app.optimizely.com/", |
| 447 | 447 | "extension_id" => 1234, |
| 448 | 448 | "preserve_parameters" => true, |
| 449 | 449 | "src" => 524, |
| 450 | 450 | "value" => "window.someGlobalFunction();" |
| 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 | )); |
| 464 | 464 | |
@@ -479,20 +479,20 @@ discard block |
||
| 479 | 479 | $result = new Result(array( |
| 480 | 480 | "project_id" => 1000, |
| 481 | 481 | "audience_ids" => array( |
| 482 | - 1234, |
|
| 483 | - 1212, |
|
| 484 | - 1432 |
|
| 482 | + 1234, |
|
| 483 | + 1212, |
|
| 484 | + 1432 |
|
| 485 | 485 | ), |
| 486 | 486 | "campaign_id" => 2000, |
| 487 | 487 | "changes" => array( |
| 488 | - array( |
|
| 488 | + array( |
|
| 489 | 489 | "type" => "custom_code", |
| 490 | 490 | "allow_additional_redirect" => true, |
| 491 | 491 | "async" => true, |
| 492 | 492 | "css_selector" => "a[href*=\"optimizely\"]", |
| 493 | 493 | "dependencies" => array( |
| 494 | - 24, |
|
| 495 | - 26 |
|
| 494 | + 24, |
|
| 495 | + 26 |
|
| 496 | 496 | ), |
| 497 | 497 | "destination" => "https://app.optimizely.com/", |
| 498 | 498 | "extension_id" => 1234, |
@@ -500,37 +500,37 @@ discard block |
||
| 500 | 500 | "src" => 524, |
| 501 | 501 | "value" => "window.someGlobalFunction();", |
| 502 | 502 | "id" => "string" |
| 503 | - ) |
|
| 503 | + ) |
|
| 504 | 504 | ), |
| 505 | 505 | "description" => "string", |
| 506 | 506 | "holdback" => 5000, |
| 507 | 507 | "key" => "home_page_experiment", |
| 508 | 508 | "metrics" => array( |
| 509 | - array( |
|
| 509 | + array( |
|
| 510 | 510 | "kind" => "string", |
| 511 | 511 | "id" => 0 |
| 512 | - ) |
|
| 512 | + ) |
|
| 513 | 513 | ), |
| 514 | 514 | "name" => "Blue Button Experiment", |
| 515 | 515 | "schedule" => array( |
| 516 | - "start_time" => "2016-10-17T07:05:00.109Z", |
|
| 517 | - "stop_time" => "2016-10-17T07:05:00.109Z", |
|
| 518 | - "time_zone" => "UTC" |
|
| 516 | + "start_time" => "2016-10-17T07:05:00.109Z", |
|
| 517 | + "stop_time" => "2016-10-17T07:05:00.109Z", |
|
| 518 | + "time_zone" => "UTC" |
|
| 519 | 519 | ), |
| 520 | 520 | "status" => "active", |
| 521 | 521 | "variations" => array( |
| 522 | - array( |
|
| 522 | + array( |
|
| 523 | 523 | "actions" => array( |
| 524 | - array( |
|
| 524 | + array( |
|
| 525 | 525 | "changes" => array( |
| 526 | - array( |
|
| 526 | + array( |
|
| 527 | 527 | "type" => "custom_code", |
| 528 | 528 | "allow_additional_redirect" => true, |
| 529 | 529 | "async" => true, |
| 530 | 530 | "css_selector" => "a[href*=\"optimizely\"]", |
| 531 | 531 | "dependencies" => array( |
| 532 | - 24, |
|
| 533 | - 26 |
|
| 532 | + 24, |
|
| 533 | + 26 |
|
| 534 | 534 | ), |
| 535 | 535 | "destination" => "https://app.optimizely.com/", |
| 536 | 536 | "extension_id" => 1234, |
@@ -538,17 +538,17 @@ discard block |
||
| 538 | 538 | "src" => 524, |
| 539 | 539 | "value" => "window.someGlobalFunction();", |
| 540 | 540 | "id" => "string" |
| 541 | - ) |
|
| 541 | + ) |
|
| 542 | 542 | ), |
| 543 | 543 | "page_id" => 0 |
| 544 | - ) |
|
| 544 | + ) |
|
| 545 | 545 | ), |
| 546 | 546 | "archived" => true, |
| 547 | 547 | "key" => "blue_button_variation", |
| 548 | 548 | "name" => "Blue Button", |
| 549 | 549 | "variation_id" => 0, |
| 550 | 550 | "weight" => 0 |
| 551 | - ) |
|
| 551 | + ) |
|
| 552 | 552 | ), |
| 553 | 553 | "created" => "2016-10-17T07:05:00.109Z", |
| 554 | 554 | "id" => 3000, |
@@ -562,72 +562,72 @@ discard block |
||
| 562 | 562 | $experimentsService = new Experiments($optimizelyApiClientMock); |
| 563 | 563 | |
| 564 | 564 | $experiment = new Experiment(array( |
| 565 | - "audience_ids" => array( |
|
| 565 | + "audience_ids" => array( |
|
| 566 | 566 | 0 |
| 567 | - ), |
|
| 568 | - "changes" => array( |
|
| 567 | + ), |
|
| 568 | + "changes" => array( |
|
| 569 | 569 | array( |
| 570 | - "type" => "custom_code", |
|
| 571 | - "allow_additional_redirect" => true, |
|
| 572 | - "async" => true, |
|
| 573 | - "css_selector" => "a[href*=\"optimizely\"]", |
|
| 574 | - "dependencies" => array( |
|
| 570 | + "type" => "custom_code", |
|
| 571 | + "allow_additional_redirect" => true, |
|
| 572 | + "async" => true, |
|
| 573 | + "css_selector" => "a[href*=\"optimizely\"]", |
|
| 574 | + "dependencies" => array( |
|
| 575 | 575 | 24, |
| 576 | 576 | 26 |
| 577 | - ), |
|
| 578 | - "destination" => "https://app.optimizely.com/", |
|
| 579 | - "extension_id" => 1234, |
|
| 580 | - "preserve_parameters" => true, |
|
| 581 | - "src" => 524, |
|
| 582 | - "value" => "window.someGlobalFunction();" |
|
| 577 | + ), |
|
| 578 | + "destination" => "https://app.optimizely.com/", |
|
| 579 | + "extension_id" => 1234, |
|
| 580 | + "preserve_parameters" => true, |
|
| 581 | + "src" => 524, |
|
| 582 | + "value" => "window.someGlobalFunction();" |
|
| 583 | 583 | ) |
| 584 | - ), |
|
| 585 | - "description" => "AB Test to see if the Blue Button converts more visitors", |
|
| 586 | - "holdback" => 0, |
|
| 587 | - "key" => "home_page_experiment", |
|
| 588 | - "metrics" => array( |
|
| 584 | + ), |
|
| 585 | + "description" => "AB Test to see if the Blue Button converts more visitors", |
|
| 586 | + "holdback" => 0, |
|
| 587 | + "key" => "home_page_experiment", |
|
| 588 | + "metrics" => array( |
|
| 589 | 589 | array( |
| 590 | - "kind" => "string" |
|
| 590 | + "kind" => "string" |
|
| 591 | 591 | ) |
| 592 | - ), |
|
| 593 | - "name" => "Blue Button Experiment", |
|
| 594 | - "schedule" => array( |
|
| 592 | + ), |
|
| 593 | + "name" => "Blue Button Experiment", |
|
| 594 | + "schedule" => array( |
|
| 595 | 595 | "start_time" => "2016-10-17T07:04:59.731Z", |
| 596 | 596 | "stop_time" => "2016-10-17T07:04:59.731Z", |
| 597 | 597 | "time_zone" => "UTC" |
| 598 | - ), |
|
| 599 | - "status" => "active", |
|
| 600 | - "variations" => array( |
|
| 598 | + ), |
|
| 599 | + "status" => "active", |
|
| 600 | + "variations" => array( |
|
| 601 | 601 | array( |
| 602 | - "actions" => array( |
|
| 602 | + "actions" => array( |
|
| 603 | 603 | array( |
| 604 | - "changes" => array( |
|
| 604 | + "changes" => array( |
|
| 605 | 605 | array( |
| 606 | - "type" => "custom_code", |
|
| 607 | - "allow_additional_redirect" => true, |
|
| 608 | - "async" => true, |
|
| 609 | - "css_selector" => "a[href*=\"optimizely\"]", |
|
| 610 | - "dependencies" => array( |
|
| 606 | + "type" => "custom_code", |
|
| 607 | + "allow_additional_redirect" => true, |
|
| 608 | + "async" => true, |
|
| 609 | + "css_selector" => "a[href*=\"optimizely\"]", |
|
| 610 | + "dependencies" => array( |
|
| 611 | 611 | 24, |
| 612 | 612 | 26 |
| 613 | - ), |
|
| 614 | - "destination" => "https://app.optimizely.com/", |
|
| 615 | - "extension_id" => 1234, |
|
| 616 | - "preserve_parameters" => true, |
|
| 617 | - "src" => 524, |
|
| 618 | - "value" => "window.someGlobalFunction();" |
|
| 613 | + ), |
|
| 614 | + "destination" => "https://app.optimizely.com/", |
|
| 615 | + "extension_id" => 1234, |
|
| 616 | + "preserve_parameters" => true, |
|
| 617 | + "src" => 524, |
|
| 618 | + "value" => "window.someGlobalFunction();" |
|
| 619 | 619 | ) |
| 620 | - ), |
|
| 621 | - "page_id" => 0 |
|
| 620 | + ), |
|
| 621 | + "page_id" => 0 |
|
| 622 | 622 | ) |
| 623 | - ), |
|
| 624 | - "archived" => true, |
|
| 625 | - "key" => "blue_button_variation", |
|
| 626 | - "name" => "Blue Button", |
|
| 627 | - "variation_id" => 0, |
|
| 628 | - "weight" => 0 |
|
| 623 | + ), |
|
| 624 | + "archived" => true, |
|
| 625 | + "key" => "blue_button_variation", |
|
| 626 | + "name" => "Blue Button", |
|
| 627 | + "variation_id" => 0, |
|
| 628 | + "weight" => 0 |
|
| 629 | + ) |
|
| 629 | 630 | ) |
| 630 | - ) |
|
| 631 | 631 | )); |
| 632 | 632 | |
| 633 | 633 | $result = $experimentsService->update(1000, $experiment, true, true); |