@@ -9,7 +9,7 @@ |
||
9 | 9 | $credentials = file_get_contents(dirname(__FILE__) . '/auth_credentials.json'); |
10 | 10 | if ($credentials===false) { |
11 | 11 | die ("Couldn't read OAuth credentials from auth_credentials.json. Make sure " . |
12 | - "the file exists (if not, copy from auth_credentials.json.dist)."); |
|
12 | + "the file exists (if not, copy from auth_credentials.json.dist)."); |
|
13 | 13 | } |
14 | 14 | |
15 | 15 | $credentials = json_decode($credentials, true); |
@@ -32,73 +32,73 @@ |
||
32 | 32 | $project = new Experiment(array( |
33 | 33 | "project_id" => 1000, |
34 | 34 | "audience_ids" => array( |
35 | - 1234, |
|
36 | - 1212, |
|
37 | - 1432 |
|
35 | + 1234, |
|
36 | + 1212, |
|
37 | + 1432 |
|
38 | 38 | ), |
39 | 39 | "campaign_id" => 2000, |
40 | 40 | "changes" => array( |
41 | - array( |
|
41 | + array( |
|
42 | 42 | "type" => "custom_code", |
43 | 43 | "allow_additional_redirect" => true, |
44 | 44 | "async" => true, |
45 | 45 | "css_selector" => "a[href*=\"optimizely\"]", |
46 | 46 | "dependencies" => array( |
47 | - 24, |
|
48 | - 26 |
|
47 | + 24, |
|
48 | + 26 |
|
49 | 49 | ), |
50 | 50 | "destination" => "https://app.optimizely.com/", |
51 | 51 | "extension_id" => 1234, |
52 | 52 | "preserve_parameters" => true, |
53 | 53 | "src" => 524, |
54 | 54 | "value" => "window.someGlobalFunction();" |
55 | - ) |
|
55 | + ) |
|
56 | 56 | ), |
57 | 57 | "description" => "string", |
58 | 58 | "holdback" => 5000, |
59 | 59 | "key" => "home_page_experiment", |
60 | 60 | "metrics" => array( |
61 | - array( |
|
61 | + array( |
|
62 | 62 | "kind" => "string" |
63 | - ) |
|
63 | + ) |
|
64 | 64 | ), |
65 | 65 | "name" => "Blue Button Experiment", |
66 | 66 | "schedule" => array( |
67 | - "start_time" => "2016-10-17T07:04:59.724Z", |
|
68 | - "stop_time" => "2016-10-17T07:04:59.724Z", |
|
69 | - "time_zone" => "UTC" |
|
67 | + "start_time" => "2016-10-17T07:04:59.724Z", |
|
68 | + "stop_time" => "2016-10-17T07:04:59.724Z", |
|
69 | + "time_zone" => "UTC" |
|
70 | 70 | ), |
71 | 71 | "status" => "active", |
72 | 72 | "variations" => array( |
73 | - array( |
|
73 | + array( |
|
74 | 74 | "actions" => array( |
75 | - array( |
|
75 | + array( |
|
76 | 76 | "changes" => array( |
77 | - array( |
|
77 | + array( |
|
78 | 78 | "type" => "custom_code", |
79 | 79 | "allow_additional_redirect" => true, |
80 | 80 | "async" => true, |
81 | 81 | "css_selector" => "a[href*=\"optimizely\"]", |
82 | 82 | "dependencies" => array( |
83 | - 24, |
|
84 | - 26 |
|
83 | + 24, |
|
84 | + 26 |
|
85 | 85 | ), |
86 | 86 | "destination" => "https://app.optimizely.com/", |
87 | 87 | "extension_id" => 1234, |
88 | 88 | "preserve_parameters" => true, |
89 | 89 | "src" => 524, |
90 | 90 | "value" => "window.someGlobalFunction();" |
91 | - ) |
|
91 | + ) |
|
92 | 92 | ), |
93 | 93 | "page_id" => 0 |
94 | - ) |
|
94 | + ) |
|
95 | 95 | ), |
96 | 96 | "archived" => true, |
97 | 97 | "key" => "blue_button_variation", |
98 | 98 | "name" => "Blue Button", |
99 | 99 | "variation_id" => 0, |
100 | 100 | "weight" => 0 |
101 | - ) |
|
101 | + ) |
|
102 | 102 | ) |
103 | 103 | )); |
104 | 104 |
@@ -24,8 +24,8 @@ discard block |
||
24 | 24 | "category" => "add_to_cart", |
25 | 25 | "description" => "Item added to cart", |
26 | 26 | "event_filter" => array( |
27 | - "filter_type" => "target_selector", |
|
28 | - "selector" => ".menu-options" |
|
27 | + "filter_type" => "target_selector", |
|
28 | + "selector" => ".menu-options" |
|
29 | 29 | ), |
30 | 30 | "event_type" => "custom", |
31 | 31 | "key" => "add_to_cart", |
@@ -61,8 +61,8 @@ discard block |
||
61 | 61 | "category" => "add_to_cart", |
62 | 62 | "description" => "Item added to cart", |
63 | 63 | "event_filter" => array( |
64 | - "filter_type" => "target_selector", |
|
65 | - "selector" => ".menu-options" |
|
64 | + "filter_type" => "target_selector", |
|
65 | + "selector" => ".menu-options" |
|
66 | 66 | ), |
67 | 67 | "event_type" => "custom", |
68 | 68 | "key" => "add_to_cart", |
@@ -92,37 +92,37 @@ discard block |
||
92 | 92 | |
93 | 93 | $optimizelyApiClientMock->method('sendApiRequest') |
94 | 94 | ->willReturn(array( |
95 | - "event_filter" => array( |
|
95 | + "event_filter" => array( |
|
96 | 96 | "filter_type" => "target_selector", |
97 | 97 | "selector" => ".menu-options" |
98 | - ), |
|
99 | - "name" => "Add to Cart", |
|
100 | - "archived" => true, |
|
101 | - "category" => "add_to_cart", |
|
102 | - "description" => "string", |
|
103 | - "event_type" => "click", |
|
104 | - "key" => "add_to_cart", |
|
105 | - "created" => "2016-10-18T05:07:04.153Z", |
|
106 | - "id" => 0, |
|
107 | - "is_classic" => false, |
|
108 | - "is_editable" => true, |
|
109 | - "page_id" => 0, |
|
110 | - "project_id" => 1000 |
|
98 | + ), |
|
99 | + "name" => "Add to Cart", |
|
100 | + "archived" => true, |
|
101 | + "category" => "add_to_cart", |
|
102 | + "description" => "string", |
|
103 | + "event_type" => "click", |
|
104 | + "key" => "add_to_cart", |
|
105 | + "created" => "2016-10-18T05:07:04.153Z", |
|
106 | + "id" => 0, |
|
107 | + "is_classic" => false, |
|
108 | + "is_editable" => true, |
|
109 | + "page_id" => 0, |
|
110 | + "project_id" => 1000 |
|
111 | 111 | )); |
112 | 112 | |
113 | 113 | $eventsService = new Events($optimizelyApiClientMock); |
114 | 114 | |
115 | 115 | $event = new ClickEvent(array( |
116 | - "event_filter" => array( |
|
116 | + "event_filter" => array( |
|
117 | 117 | "filter_type" => "target_selector", |
118 | 118 | "selector" => ".menu-options" |
119 | - ), |
|
120 | - "name" => "Add to Cart", |
|
121 | - "archived" => true, |
|
122 | - "category" => "add_to_cart", |
|
123 | - "description" => "string", |
|
124 | - "event_type" => "click", |
|
125 | - "key" => "add_to_cart" |
|
119 | + ), |
|
120 | + "name" => "Add to Cart", |
|
121 | + "archived" => true, |
|
122 | + "category" => "add_to_cart", |
|
123 | + "description" => "string", |
|
124 | + "event_type" => "click", |
|
125 | + "key" => "add_to_cart" |
|
126 | 126 | )); |
127 | 127 | |
128 | 128 | $createdEvent = $eventsService->createClickEvent(0, $event); |
@@ -180,37 +180,37 @@ discard block |
||
180 | 180 | |
181 | 181 | $optimizelyApiClientMock->method('sendApiRequest') |
182 | 182 | ->willReturn(array( |
183 | - "event_filter" => array( |
|
183 | + "event_filter" => array( |
|
184 | 184 | "filter_type" => "target_selector", |
185 | 185 | "selector" => ".menu-options" |
186 | - ), |
|
187 | - "name" => "Add to Cart", |
|
188 | - "archived" => true, |
|
189 | - "category" => "add_to_cart", |
|
190 | - "description" => "string", |
|
191 | - "event_type" => "click", |
|
192 | - "key" => "add_to_cart", |
|
193 | - "created" => "2016-10-18T05:07:04.153Z", |
|
194 | - "id" => 0, |
|
195 | - "is_classic" => false, |
|
196 | - "is_editable" => true, |
|
197 | - "page_id" => 0, |
|
198 | - "project_id" => 1000 |
|
186 | + ), |
|
187 | + "name" => "Add to Cart", |
|
188 | + "archived" => true, |
|
189 | + "category" => "add_to_cart", |
|
190 | + "description" => "string", |
|
191 | + "event_type" => "click", |
|
192 | + "key" => "add_to_cart", |
|
193 | + "created" => "2016-10-18T05:07:04.153Z", |
|
194 | + "id" => 0, |
|
195 | + "is_classic" => false, |
|
196 | + "is_editable" => true, |
|
197 | + "page_id" => 0, |
|
198 | + "project_id" => 1000 |
|
199 | 199 | )); |
200 | 200 | |
201 | 201 | $eventsService = new Events($optimizelyApiClientMock); |
202 | 202 | |
203 | 203 | $event = new ClickEvent(array( |
204 | - "event_filter" => array( |
|
204 | + "event_filter" => array( |
|
205 | 205 | "filter_type" => "target_selector", |
206 | 206 | "selector" => ".menu-options" |
207 | - ), |
|
208 | - "name" => "Add to Cart", |
|
209 | - "archived" => true, |
|
210 | - "category" => "add_to_cart", |
|
211 | - "description" => "string", |
|
212 | - "event_type" => "click", |
|
213 | - "key" => "add_to_cart" |
|
207 | + ), |
|
208 | + "name" => "Add to Cart", |
|
209 | + "archived" => true, |
|
210 | + "category" => "add_to_cart", |
|
211 | + "description" => "string", |
|
212 | + "event_type" => "click", |
|
213 | + "key" => "add_to_cart" |
|
214 | 214 | )); |
215 | 215 | |
216 | 216 | $updatedEvent = $eventsService->updateClickEvent(0, 0, $event); |
@@ -21,15 +21,15 @@ discard block |
||
21 | 21 | "project_id" => 1000, |
22 | 22 | "archived" => false, |
23 | 23 | "conditions" => array( |
24 | - "and", |
|
25 | - array( |
|
24 | + "and", |
|
25 | + array( |
|
26 | 26 | "type" => "language", |
27 | 27 | "value" => "es" |
28 | - ), |
|
29 | - array( |
|
28 | + ), |
|
29 | + array( |
|
30 | 30 | "type" => "location", |
31 | 31 | "value" => "US-CA-SANFRANCISCO" |
32 | - ) |
|
32 | + ) |
|
33 | 33 | ), |
34 | 34 | "description" => "People that speak spanish and are in San Francisco", |
35 | 35 | "name" => "Spanish speaking San Franciscans", |
@@ -61,15 +61,15 @@ discard block |
||
61 | 61 | "project_id" => 1000, |
62 | 62 | "archived" => false, |
63 | 63 | "conditions" => array( |
64 | - "and", |
|
65 | - array( |
|
64 | + "and", |
|
65 | + array( |
|
66 | 66 | "type" => "language", |
67 | 67 | "value" => "es" |
68 | - ), |
|
69 | - array( |
|
68 | + ), |
|
69 | + array( |
|
70 | 70 | "type" => "location", |
71 | 71 | "value" => "US-CA-SANFRANCISCO" |
72 | - ) |
|
72 | + ) |
|
73 | 73 | ), |
74 | 74 | "description" => "People that speak spanish and are in San Francisco", |
75 | 75 | "name" => "Spanish speaking San Franciscans", |
@@ -99,15 +99,15 @@ discard block |
||
99 | 99 | "project_id" => 1000, |
100 | 100 | "archived" => false, |
101 | 101 | "conditions" => array( |
102 | - "and", |
|
103 | - array( |
|
102 | + "and", |
|
103 | + array( |
|
104 | 104 | "type" => "language", |
105 | 105 | "value" => "es" |
106 | - ), |
|
107 | - array( |
|
106 | + ), |
|
107 | + array( |
|
108 | 108 | "type" => "location", |
109 | 109 | "value" => "US-CA-SANFRANCISCO" |
110 | - ) |
|
110 | + ) |
|
111 | 111 | ), |
112 | 112 | "description" => "People that speak spanish and are in San Francisco", |
113 | 113 | "name" => "Spanish speaking San Franciscans", |
@@ -123,15 +123,15 @@ discard block |
||
123 | 123 | "project_id" => 1000, |
124 | 124 | "archived" => false, |
125 | 125 | "conditions" => array( |
126 | - "and", |
|
127 | - array( |
|
126 | + "and", |
|
127 | + array( |
|
128 | 128 | "type" => "language", |
129 | 129 | "value" => "es" |
130 | - ), |
|
131 | - array( |
|
130 | + ), |
|
131 | + array( |
|
132 | 132 | "type" => "location", |
133 | 133 | "value" => "US-CA-SANFRANCISCO" |
134 | - ) |
|
134 | + ) |
|
135 | 135 | ), |
136 | 136 | "description" => "People that speak spanish and are in San Francisco", |
137 | 137 | "name" => "Spanish speaking San Franciscans", |
@@ -156,15 +156,15 @@ discard block |
||
156 | 156 | "project_id" => 1000, |
157 | 157 | "archived" => false, |
158 | 158 | "conditions" => array( |
159 | - "and", |
|
160 | - array( |
|
159 | + "and", |
|
160 | + array( |
|
161 | 161 | "type" => "language", |
162 | 162 | "value" => "es" |
163 | - ), |
|
164 | - array( |
|
163 | + ), |
|
164 | + array( |
|
165 | 165 | "type" => "location", |
166 | 166 | "value" => "US-CA-SANFRANCISCO" |
167 | - ) |
|
167 | + ) |
|
168 | 168 | ), |
169 | 169 | "description" => "People that speak spanish and are in San Francisco", |
170 | 170 | "name" => "Spanish speaking San Franciscans", |
@@ -180,15 +180,15 @@ discard block |
||
180 | 180 | "project_id" => 1000, |
181 | 181 | "archived" => false, |
182 | 182 | "conditions" => array( |
183 | - "and", |
|
184 | - array( |
|
183 | + "and", |
|
184 | + array( |
|
185 | 185 | "type" => "language", |
186 | 186 | "value" => "es" |
187 | - ), |
|
188 | - array( |
|
187 | + ), |
|
188 | + array( |
|
189 | 189 | "type" => "location", |
190 | 190 | "value" => "US-CA-SANFRANCISCO" |
191 | - ) |
|
191 | + ) |
|
192 | 192 | ), |
193 | 193 | "description" => "People that speak spanish and are in San Francisco", |
194 | 194 | "name" => "Spanish speaking San Franciscans", |
@@ -11,7 +11,7 @@ |
||
11 | 11 | $credentials = file_get_contents(dirname(__FILE__) . '/../../../auth_credentials.json'); |
12 | 12 | if ($credentials===false) { |
13 | 13 | $this->fail("Couldn't read OAuth credentials from auth_credentials.json. Make sure " . |
14 | - "the file exists (if not, copy from auth_credentials.json.dist)."); |
|
14 | + "the file exists (if not, copy from auth_credentials.json.dist)."); |
|
15 | 15 | } |
16 | 16 | |
17 | 17 | $credentials = json_decode($credentials, true); |
@@ -21,14 +21,14 @@ discard block |
||
21 | 21 | array( |
22 | 22 | "project_id" => 1000, |
23 | 23 | "changes" => array( |
24 | - array( |
|
24 | + array( |
|
25 | 25 | "type" => "custom_code", |
26 | 26 | "allow_additional_redirect" => true, |
27 | 27 | "async" => true, |
28 | 28 | "css_selector" => "a[href*=\"optimizely\"]", |
29 | 29 | "dependencies" => array( |
30 | - 24, |
|
31 | - 26 |
|
30 | + 24, |
|
31 | + 26 |
|
32 | 32 | ), |
33 | 33 | "destination" => "https://app.optimizely.com/", |
34 | 34 | "extension_id" => 1234, |
@@ -36,30 +36,30 @@ discard block |
||
36 | 36 | "src" => 524, |
37 | 37 | "value" => "window.someGlobalFunction();", |
38 | 38 | "id" => "string" |
39 | - ) |
|
39 | + ) |
|
40 | 40 | ), |
41 | 41 | "created" => "2016-10-18T03:27:04.123Z", |
42 | 42 | "earliest" => "2016-10-18T03:27:04.123Z", |
43 | 43 | "experiment_ids" => array( |
44 | - 0 |
|
44 | + 0 |
|
45 | 45 | ), |
46 | 46 | "holdback" => 0, |
47 | 47 | "last_modified" => "2016-10-18T03:27:04.123Z", |
48 | 48 | "latest" => "2016-10-18T03:27:04.123Z", |
49 | 49 | "metrics" => array( |
50 | - array( |
|
50 | + array( |
|
51 | 51 | "kind" => "string", |
52 | 52 | "id" => 0 |
53 | - ) |
|
53 | + ) |
|
54 | 54 | ), |
55 | 55 | "name" => "Landing Page Optimization", |
56 | 56 | "page_ids" => array( |
57 | - 0 |
|
57 | + 0 |
|
58 | 58 | ), |
59 | 59 | "status" => "active", |
60 | 60 | "type" => "a/b", |
61 | 61 | "id" => 2000 |
62 | - ) |
|
62 | + ) |
|
63 | 63 | ) |
64 | 64 | ); |
65 | 65 | |
@@ -83,14 +83,14 @@ discard block |
||
83 | 83 | ->willReturn(array( |
84 | 84 | "project_id" => 1000, |
85 | 85 | "changes" => array( |
86 | - array( |
|
86 | + array( |
|
87 | 87 | "type" => "custom_code", |
88 | 88 | "allow_additional_redirect" => true, |
89 | 89 | "async" => true, |
90 | 90 | "css_selector" => "a[href*=\"optimizely\"]", |
91 | 91 | "dependencies" => array( |
92 | - 24, |
|
93 | - 26 |
|
92 | + 24, |
|
93 | + 26 |
|
94 | 94 | ), |
95 | 95 | "destination" => "https://app.optimizely.com/", |
96 | 96 | "extension_id" => 1234, |
@@ -98,25 +98,25 @@ discard block |
||
98 | 98 | "src" => 524, |
99 | 99 | "value" => "window.someGlobalFunction();", |
100 | 100 | "id" => "string" |
101 | - ) |
|
101 | + ) |
|
102 | 102 | ), |
103 | 103 | "created" => "2016-10-18T03:27:04.139Z", |
104 | 104 | "earliest" => "2016-10-18T03:27:04.139Z", |
105 | 105 | "experiment_ids" => array( |
106 | - 0 |
|
106 | + 0 |
|
107 | 107 | ), |
108 | 108 | "holdback" => 0, |
109 | 109 | "last_modified" => "2016-10-18T03:27:04.139Z", |
110 | 110 | "latest" => "2016-10-18T03:27:04.139Z", |
111 | 111 | "metrics" => array( |
112 | - array( |
|
112 | + array( |
|
113 | 113 | "kind" => "string", |
114 | 114 | "id" => 0 |
115 | - ) |
|
115 | + ) |
|
116 | 116 | ), |
117 | 117 | "name" => "Landing Page Optimization", |
118 | 118 | "page_ids" => array( |
119 | - 0 |
|
119 | + 0 |
|
120 | 120 | ), |
121 | 121 | "status" => "active", |
122 | 122 | "type" => "a/b", |
@@ -144,47 +144,47 @@ discard block |
||
144 | 144 | "confidence_threshold" => 0, |
145 | 145 | "end_time" => "2016-10-18T03:27:04.147Z", |
146 | 146 | "metrics" => array( |
147 | - array( |
|
147 | + array( |
|
148 | 148 | "event" => "string", |
149 | 149 | "event_name" => "string", |
150 | 150 | "measure" => "conversions", |
151 | 151 | "metric_id" => "string", |
152 | 152 | "priority" => 0, |
153 | 153 | "results" => array( |
154 | - "campaign" => array( |
|
154 | + "campaign" => array( |
|
155 | 155 | "experiment_id" => 0, |
156 | 156 | "is_baseline" => true, |
157 | 157 | "lift" => array( |
158 | - "confidence_interval" => array( |
|
158 | + "confidence_interval" => array( |
|
159 | 159 | 0.010399560300730457, |
160 | 160 | 0.0850821459929161 |
161 | - ), |
|
162 | - "is_most_conclusive" => true, |
|
163 | - "is_significant" => true, |
|
164 | - "significance" => 0, |
|
165 | - "value" => 0, |
|
166 | - "visitors_remaining" => 0 |
|
161 | + ), |
|
162 | + "is_most_conclusive" => true, |
|
163 | + "is_significant" => true, |
|
164 | + "significance" => 0, |
|
165 | + "value" => 0, |
|
166 | + "visitors_remaining" => 0 |
|
167 | 167 | ), |
168 | 168 | "name" => "Blue Button", |
169 | 169 | "rate" => 0, |
170 | 170 | "scope" => "variation", |
171 | 171 | "total_increase" => array( |
172 | - "confidence_interval" => array( |
|
172 | + "confidence_interval" => array( |
|
173 | 173 | 0.010399560300730457, |
174 | 174 | 0.0850821459929161 |
175 | - ), |
|
176 | - "is_most_conclusive" => true, |
|
177 | - "is_significant" => true, |
|
178 | - "significance" => 0, |
|
179 | - "value" => 0, |
|
180 | - "visitors_remaining" => 0 |
|
175 | + ), |
|
176 | + "is_most_conclusive" => true, |
|
177 | + "is_significant" => true, |
|
178 | + "significance" => 0, |
|
179 | + "value" => 0, |
|
180 | + "visitors_remaining" => 0 |
|
181 | 181 | ), |
182 | 182 | "value" => 0, |
183 | 183 | "variation_id" => "string" |
184 | - ) |
|
184 | + ) |
|
185 | 185 | ), |
186 | 186 | "unit" => "session" |
187 | - ) |
|
187 | + ) |
|
188 | 188 | ), |
189 | 189 | "start_time" => "2016-10-18T03:27:04.148Z" |
190 | 190 | )); |
@@ -209,14 +209,14 @@ discard block |
||
209 | 209 | ->willReturn(array( |
210 | 210 | "project_id" => 1000, |
211 | 211 | "changes" => array( |
212 | - array( |
|
212 | + array( |
|
213 | 213 | "type" => "custom_code", |
214 | 214 | "allow_additional_redirect" => true, |
215 | 215 | "async" => true, |
216 | 216 | "css_selector" => "a[href*=\"optimizely\"]", |
217 | 217 | "dependencies" => array( |
218 | - 24, |
|
219 | - 26 |
|
218 | + 24, |
|
219 | + 26 |
|
220 | 220 | ), |
221 | 221 | "destination" => "https://app.optimizely.com/", |
222 | 222 | "extension_id" => 1234, |
@@ -224,25 +224,25 @@ discard block |
||
224 | 224 | "src" => 524, |
225 | 225 | "value" => "window.someGlobalFunction();", |
226 | 226 | "id" => "string" |
227 | - ) |
|
227 | + ) |
|
228 | 228 | ), |
229 | 229 | "created" => "2016-10-18T03:27:04.155Z", |
230 | 230 | "earliest" => "2016-10-18T03:27:04.155Z", |
231 | 231 | "experiment_ids" => array( |
232 | - 0 |
|
232 | + 0 |
|
233 | 233 | ), |
234 | 234 | "holdback" => 0, |
235 | 235 | "last_modified" => "2016-10-18T03:27:04.155Z", |
236 | 236 | "latest" => "2016-10-18T03:27:04.155Z", |
237 | 237 | "metrics" => array( |
238 | - array( |
|
238 | + array( |
|
239 | 239 | "kind" => "string", |
240 | 240 | "id" => 0 |
241 | - ) |
|
241 | + ) |
|
242 | 242 | ), |
243 | 243 | "name" => "Landing Page Optimization", |
244 | 244 | "page_ids" => array( |
245 | - 0 |
|
245 | + 0 |
|
246 | 246 | ), |
247 | 247 | "status" => "active", |
248 | 248 | "type" => "a/b", |
@@ -254,38 +254,38 @@ discard block |
||
254 | 254 | $campaign = new Campaign(array( |
255 | 255 | "project_id" => 1000, |
256 | 256 | "changes" => array( |
257 | - array( |
|
257 | + array( |
|
258 | 258 | "type" => "custom_code", |
259 | 259 | "allow_additional_redirect" => true, |
260 | 260 | "async" => true, |
261 | 261 | "css_selector" => "a[href*=\"optimizely\"]", |
262 | 262 | "dependencies" => array( |
263 | - 24, |
|
264 | - 26 |
|
263 | + 24, |
|
264 | + 26 |
|
265 | 265 | ), |
266 | 266 | "destination" => "https://app.optimizely.com/", |
267 | 267 | "extension_id" => 1234, |
268 | 268 | "preserve_parameters" => true, |
269 | 269 | "src" => 524, |
270 | 270 | "value" => "window.someGlobalFunction();" |
271 | - ) |
|
271 | + ) |
|
272 | 272 | ), |
273 | 273 | "created" => "2016-10-18T03:27:04.067Z", |
274 | 274 | "earliest" => "2016-10-18T03:27:04.067Z", |
275 | 275 | "experiment_ids" => array( |
276 | - 0 |
|
276 | + 0 |
|
277 | 277 | ), |
278 | 278 | "holdback" => 0, |
279 | 279 | "last_modified" => "2016-10-18T03:27:04.067Z", |
280 | 280 | "latest" => "2016-10-18T03:27:04.067Z", |
281 | 281 | "metrics" => array( |
282 | - array( |
|
282 | + array( |
|
283 | 283 | "kind" => "string" |
284 | - ) |
|
284 | + ) |
|
285 | 285 | ), |
286 | 286 | "name" => "Landing Page Optimization", |
287 | 287 | "page_ids" => array( |
288 | - 0 |
|
288 | + 0 |
|
289 | 289 | ), |
290 | 290 | "status" => "active", |
291 | 291 | "type" => "a/b" |
@@ -308,14 +308,14 @@ discard block |
||
308 | 308 | ->willReturn(array( |
309 | 309 | "project_id" => 1000, |
310 | 310 | "changes" => array( |
311 | - array( |
|
311 | + array( |
|
312 | 312 | "type" => "custom_code", |
313 | 313 | "allow_additional_redirect" => true, |
314 | 314 | "async" => true, |
315 | 315 | "css_selector" => "a[href*=\"optimizely\"]", |
316 | 316 | "dependencies" => array( |
317 | - 24, |
|
318 | - 26 |
|
317 | + 24, |
|
318 | + 26 |
|
319 | 319 | ), |
320 | 320 | "destination" => "https://app.optimizely.com/", |
321 | 321 | "extension_id" => 1234, |
@@ -323,25 +323,25 @@ discard block |
||
323 | 323 | "src" => 524, |
324 | 324 | "value" => "window.someGlobalFunction();", |
325 | 325 | "id" => "string" |
326 | - ) |
|
326 | + ) |
|
327 | 327 | ), |
328 | 328 | "created" => "2016-10-18T03:27:04.155Z", |
329 | 329 | "earliest" => "2016-10-18T03:27:04.155Z", |
330 | 330 | "experiment_ids" => array( |
331 | - 0 |
|
331 | + 0 |
|
332 | 332 | ), |
333 | 333 | "holdback" => 0, |
334 | 334 | "last_modified" => "2016-10-18T03:27:04.155Z", |
335 | 335 | "latest" => "2016-10-18T03:27:04.155Z", |
336 | 336 | "metrics" => array( |
337 | - array( |
|
337 | + array( |
|
338 | 338 | "kind" => "string", |
339 | 339 | "id" => 0 |
340 | - ) |
|
340 | + ) |
|
341 | 341 | ), |
342 | 342 | "name" => "Landing Page Optimization", |
343 | 343 | "page_ids" => array( |
344 | - 0 |
|
344 | + 0 |
|
345 | 345 | ), |
346 | 346 | "status" => "active", |
347 | 347 | "type" => "a/b", |
@@ -353,38 +353,38 @@ discard block |
||
353 | 353 | $campaign = new Campaign(array( |
354 | 354 | "project_id" => 1000, |
355 | 355 | "changes" => array( |
356 | - array( |
|
356 | + array( |
|
357 | 357 | "type" => "custom_code", |
358 | 358 | "allow_additional_redirect" => true, |
359 | 359 | "async" => true, |
360 | 360 | "css_selector" => "a[href*=\"optimizely\"]", |
361 | 361 | "dependencies" => array( |
362 | - 24, |
|
363 | - 26 |
|
362 | + 24, |
|
363 | + 26 |
|
364 | 364 | ), |
365 | 365 | "destination" => "https://app.optimizely.com/", |
366 | 366 | "extension_id" => 1234, |
367 | 367 | "preserve_parameters" => true, |
368 | 368 | "src" => 524, |
369 | 369 | "value" => "window.someGlobalFunction();" |
370 | - ) |
|
370 | + ) |
|
371 | 371 | ), |
372 | 372 | "created" => "2016-10-18T03:27:04.067Z", |
373 | 373 | "earliest" => "2016-10-18T03:27:04.067Z", |
374 | 374 | "experiment_ids" => array( |
375 | - 0 |
|
375 | + 0 |
|
376 | 376 | ), |
377 | 377 | "holdback" => 0, |
378 | 378 | "last_modified" => "2016-10-18T03:27:04.067Z", |
379 | 379 | "latest" => "2016-10-18T03:27:04.067Z", |
380 | 380 | "metrics" => array( |
381 | - array( |
|
381 | + array( |
|
382 | 382 | "kind" => "string" |
383 | - ) |
|
383 | + ) |
|
384 | 384 | ), |
385 | 385 | "name" => "Landing Page Optimization", |
386 | 386 | "page_ids" => array( |
387 | - 0 |
|
387 | + 0 |
|
388 | 388 | ), |
389 | 389 | "status" => "active", |
390 | 390 | "type" => "a/b" |
@@ -109,16 +109,16 @@ discard block |
||
109 | 109 | "platform" => "web", |
110 | 110 | "status" => "active", |
111 | 111 | "web_snippet" => array( |
112 | - "enable_force_variation" => false, |
|
113 | - "exclude_disabled_experiments" => false, |
|
114 | - "exclude_names" => true, |
|
115 | - "include_jquery" => true, |
|
116 | - "ip_anonymization" => false, |
|
117 | - "ip_filter" => "^206\\.23\\.100\\.([5-9][0-9]|1([0-4][0-9]|50))$", |
|
118 | - "library" => "jquery-1.11.3-trim", |
|
119 | - "project_javascript" => "alert(\"Active Experiment\")", |
|
120 | - "code_revision" => 0, |
|
121 | - "js_file_size" => 63495 |
|
112 | + "enable_force_variation" => false, |
|
113 | + "exclude_disabled_experiments" => false, |
|
114 | + "exclude_names" => true, |
|
115 | + "include_jquery" => true, |
|
116 | + "ip_anonymization" => false, |
|
117 | + "ip_filter" => "^206\\.23\\.100\\.([5-9][0-9]|1([0-4][0-9]|50))$", |
|
118 | + "library" => "jquery-1.11.3-trim", |
|
119 | + "project_javascript" => "alert(\"Active Experiment\")", |
|
120 | + "code_revision" => 0, |
|
121 | + "js_file_size" => 63495 |
|
122 | 122 | ), |
123 | 123 | "created" => "2016-10-17T07:04:59.991Z", |
124 | 124 | "id" => 1000, |
@@ -137,14 +137,14 @@ discard block |
||
137 | 137 | "platform" => "web", |
138 | 138 | "status" => "active", |
139 | 139 | "web_snippet" => array( |
140 | - "enable_force_variation" => false, |
|
141 | - "exclude_disabled_experiments" => false, |
|
142 | - "exclude_names" => true, |
|
143 | - "include_jquery" => true, |
|
144 | - "ip_anonymization" => false, |
|
145 | - "ip_filter" => "^206\\.23\\.100\\.([5-9][0-9]|1([0-4][0-9]|50))$", |
|
146 | - "library" => "jquery-1.11.3-trim", |
|
147 | - "project_javascript" => "alert(\"Active Experiment\")" |
|
140 | + "enable_force_variation" => false, |
|
141 | + "exclude_disabled_experiments" => false, |
|
142 | + "exclude_names" => true, |
|
143 | + "include_jquery" => true, |
|
144 | + "ip_anonymization" => false, |
|
145 | + "ip_filter" => "^206\\.23\\.100\\.([5-9][0-9]|1([0-4][0-9]|50))$", |
|
146 | + "library" => "jquery-1.11.3-trim", |
|
147 | + "project_javascript" => "alert(\"Active Experiment\")" |
|
148 | 148 | ) |
149 | 149 | )); |
150 | 150 | |
@@ -173,16 +173,16 @@ discard block |
||
173 | 173 | "platform" => "web", |
174 | 174 | "status" => "active", |
175 | 175 | "web_snippet" => array( |
176 | - "enable_force_variation" => false, |
|
177 | - "exclude_disabled_experiments" => false, |
|
178 | - "exclude_names" => true, |
|
179 | - "include_jquery" => true, |
|
180 | - "ip_anonymization" => false, |
|
181 | - "ip_filter" => "^206\\.23\\.100\\.([5-9][0-9]|1([0-4][0-9]|50))$", |
|
182 | - "library" => "jquery-1.11.3-trim", |
|
183 | - "project_javascript" => "alert(\"Active Experiment\")", |
|
184 | - "code_revision" => 0, |
|
185 | - "js_file_size" => 63495 |
|
176 | + "enable_force_variation" => false, |
|
177 | + "exclude_disabled_experiments" => false, |
|
178 | + "exclude_names" => true, |
|
179 | + "include_jquery" => true, |
|
180 | + "ip_anonymization" => false, |
|
181 | + "ip_filter" => "^206\\.23\\.100\\.([5-9][0-9]|1([0-4][0-9]|50))$", |
|
182 | + "library" => "jquery-1.11.3-trim", |
|
183 | + "project_javascript" => "alert(\"Active Experiment\")", |
|
184 | + "code_revision" => 0, |
|
185 | + "js_file_size" => 63495 |
|
186 | 186 | ), |
187 | 187 | "created" => "2016-10-17T07:04:59.999Z", |
188 | 188 | "id" => 1000, |
@@ -199,14 +199,14 @@ discard block |
||
199 | 199 | "name" => "Test Project", |
200 | 200 | "status" => "active", |
201 | 201 | "web_snippet" => array( |
202 | - "enable_force_variation" => false, |
|
203 | - "exclude_disabled_experiments" => false, |
|
204 | - "exclude_names" => true, |
|
205 | - "include_jquery" => true, |
|
206 | - "ip_anonymization" => false, |
|
207 | - "ip_filter" => "^206\\.23\\.100\\.([5-9][0-9]|1([0-4][0-9]|50))$", |
|
208 | - "library" => "jquery-1.11.3-trim", |
|
209 | - "project_javascript" => "alert(\"Active Experiment\")" |
|
202 | + "enable_force_variation" => false, |
|
203 | + "exclude_disabled_experiments" => false, |
|
204 | + "exclude_names" => true, |
|
205 | + "include_jquery" => true, |
|
206 | + "ip_anonymization" => false, |
|
207 | + "ip_filter" => "^206\\.23\\.100\\.([5-9][0-9]|1([0-4][0-9]|50))$", |
|
208 | + "library" => "jquery-1.11.3-trim", |
|
209 | + "project_javascript" => "alert(\"Active Experiment\")" |
|
210 | 210 | ) |
211 | 211 | )); |
212 | 212 | |
@@ -236,14 +236,14 @@ discard block |
||
236 | 236 | "platform" => "web", |
237 | 237 | "status" => "active", |
238 | 238 | "web_snippet" => array( |
239 | - "enable_force_variation" => false, |
|
240 | - "exclude_disabled_experiments" => false, |
|
241 | - "exclude_names" => true, |
|
242 | - "include_jquery" => true, |
|
243 | - "ip_anonymization" => false, |
|
244 | - "ip_filter" => "^206\\.23\\.100\\.([5-9][0-9]|1([0-4][0-9]|50))$", |
|
245 | - "library" => "jquery-1.11.3-trim", |
|
246 | - "project_javascript" => "alert(\"Active Experiment\")" |
|
239 | + "enable_force_variation" => false, |
|
240 | + "exclude_disabled_experiments" => false, |
|
241 | + "exclude_names" => true, |
|
242 | + "include_jquery" => true, |
|
243 | + "ip_anonymization" => false, |
|
244 | + "ip_filter" => "^206\\.23\\.100\\.([5-9][0-9]|1([0-4][0-9]|50))$", |
|
245 | + "library" => "jquery-1.11.3-trim", |
|
246 | + "project_javascript" => "alert(\"Active Experiment\")" |
|
247 | 247 | ) |
248 | 248 | )); |
249 | 249 |
@@ -13,47 +13,47 @@ discard block |
||
13 | 13 | "confidence_threshold" => 0, |
14 | 14 | "end_time" => "2016-10-14T05:08:42.966Z", |
15 | 15 | "metrics" => array( |
16 | - array( |
|
16 | + array( |
|
17 | 17 | "event" => "string", |
18 | 18 | "event_name" => "string", |
19 | 19 | "measure" => "conversions", |
20 | 20 | "metric_id" => "string", |
21 | 21 | "priority" => 0, |
22 | 22 | "results" => array( |
23 | - "campaign" => array( |
|
23 | + "campaign" => array( |
|
24 | 24 | "experiment_id" => 0, |
25 | 25 | "is_baseline" => true, |
26 | 26 | "lift" => array( |
27 | - "confidence_interval" => array( |
|
27 | + "confidence_interval" => array( |
|
28 | 28 | 0.010399560300730457, |
29 | 29 | 0.0850821459929161 |
30 | - ), |
|
31 | - "is_most_conclusive" => true, |
|
32 | - "is_significant" => true, |
|
33 | - "significance" => 0, |
|
34 | - "value" => 0, |
|
35 | - "visitors_remaining" => 0 |
|
30 | + ), |
|
31 | + "is_most_conclusive" => true, |
|
32 | + "is_significant" => true, |
|
33 | + "significance" => 0, |
|
34 | + "value" => 0, |
|
35 | + "visitors_remaining" => 0 |
|
36 | 36 | ), |
37 | 37 | "name" => "Blue Button", |
38 | 38 | "rate" => 0, |
39 | 39 | "scope" => "variation", |
40 | 40 | "total_increase" => array( |
41 | - "confidence_interval" => array( |
|
41 | + "confidence_interval" => array( |
|
42 | 42 | 0.010399560300730457, |
43 | 43 | 0.0850821459929161 |
44 | - ), |
|
45 | - "is_most_conclusive" => true, |
|
46 | - "is_significant" => true, |
|
47 | - "significance" => 0, |
|
48 | - "value" => 0, |
|
49 | - "visitors_remaining" => 0 |
|
44 | + ), |
|
45 | + "is_most_conclusive" => true, |
|
46 | + "is_significant" => true, |
|
47 | + "significance" => 0, |
|
48 | + "value" => 0, |
|
49 | + "visitors_remaining" => 0 |
|
50 | 50 | ), |
51 | 51 | "value" => 0, |
52 | 52 | "variation_id" => "string" |
53 | - ) |
|
53 | + ) |
|
54 | 54 | ), |
55 | 55 | "unit" => "session" |
56 | - ) |
|
56 | + ) |
|
57 | 57 | ), |
58 | 58 | "start_time" => "2016-10-14T05:08:42.967Z" |
59 | 59 | ); |
@@ -71,47 +71,47 @@ discard block |
||
71 | 71 | "confidence_threshold" => 0, |
72 | 72 | "end_time" => "2016-10-14T05:08:42.966Z", |
73 | 73 | "metrics" => array( |
74 | - array( |
|
74 | + array( |
|
75 | 75 | "event" => "string", |
76 | 76 | "event_name" => "string", |
77 | 77 | "measure" => "conversions", |
78 | 78 | "metric_id" => "string", |
79 | 79 | "priority" => 0, |
80 | 80 | "results" => array( |
81 | - "campaign" => array( |
|
81 | + "campaign" => array( |
|
82 | 82 | "experiment_id" => 0, |
83 | 83 | "is_baseline" => true, |
84 | 84 | "lift" => array( |
85 | - "confidence_interval" => array( |
|
85 | + "confidence_interval" => array( |
|
86 | 86 | 0.010399560300730457, |
87 | 87 | 0.0850821459929161 |
88 | - ), |
|
89 | - "is_most_conclusive" => true, |
|
90 | - "is_significant" => true, |
|
91 | - "significance" => 0, |
|
92 | - "value" => 0, |
|
93 | - "visitors_remaining" => 0 |
|
88 | + ), |
|
89 | + "is_most_conclusive" => true, |
|
90 | + "is_significant" => true, |
|
91 | + "significance" => 0, |
|
92 | + "value" => 0, |
|
93 | + "visitors_remaining" => 0 |
|
94 | 94 | ), |
95 | 95 | "name" => "Blue Button", |
96 | 96 | "rate" => 0, |
97 | 97 | "scope" => "variation", |
98 | 98 | "total_increase" => array( |
99 | - "confidence_interval" => array( |
|
99 | + "confidence_interval" => array( |
|
100 | 100 | 0.010399560300730457, |
101 | 101 | 0.0850821459929161 |
102 | - ), |
|
103 | - "is_most_conclusive" => true, |
|
104 | - "is_significant" => true, |
|
105 | - "significance" => 0, |
|
106 | - "value" => 0, |
|
107 | - "visitors_remaining" => 0 |
|
102 | + ), |
|
103 | + "is_most_conclusive" => true, |
|
104 | + "is_significant" => true, |
|
105 | + "significance" => 0, |
|
106 | + "value" => 0, |
|
107 | + "visitors_remaining" => 0 |
|
108 | 108 | ), |
109 | 109 | "value" => 0, |
110 | 110 | "variation_id" => "string" |
111 | - ) |
|
111 | + ) |
|
112 | 112 | ), |
113 | 113 | "unit" => "session" |
114 | - ) |
|
114 | + ) |
|
115 | 115 | ), |
116 | 116 | "start_time" => "2016-10-14T05:08:42.967Z" |
117 | 117 | ); |
@@ -59,38 +59,38 @@ discard block |
||
59 | 59 | $options = array( |
60 | 60 | "project_id" => 1000, |
61 | 61 | "changes" => array( |
62 | - array( |
|
62 | + array( |
|
63 | 63 | "type" => "custom_code", |
64 | 64 | "allow_additional_redirect" => true, |
65 | 65 | "async" => true, |
66 | 66 | "css_selector" => "a[href*=\"optimizely\"]", |
67 | 67 | "dependencies" => array( |
68 | - 24, |
|
69 | - 26 |
|
68 | + 24, |
|
69 | + 26 |
|
70 | 70 | ), |
71 | 71 | "destination" => "https://app.optimizely.com/", |
72 | 72 | "extension_id" => 1234, |
73 | 73 | "preserve_parameters" => true, |
74 | 74 | "src" => 524, |
75 | 75 | "value" => "window.someGlobalFunction();" |
76 | - ) |
|
76 | + ) |
|
77 | 77 | ), |
78 | 78 | "created" => "2016-10-14T05:08:42.822Z", |
79 | 79 | "earliest" => "2016-10-14T05:08:42.822Z", |
80 | 80 | "experiment_ids" => array( |
81 | - 0 |
|
81 | + 0 |
|
82 | 82 | ), |
83 | 83 | "holdback" => 0, |
84 | 84 | "last_modified" => "2016-10-14T05:08:42.822Z", |
85 | 85 | "latest" => "2016-10-14T05:08:42.822Z", |
86 | 86 | "metrics" => array( |
87 | - array( |
|
87 | + array( |
|
88 | 88 | "kind" => "string" |
89 | - ) |
|
89 | + ) |
|
90 | 90 | ), |
91 | 91 | "name" => "Landing Page Optimization", |
92 | 92 | "page_ids" => array( |
93 | - 0 |
|
93 | + 0 |
|
94 | 94 | ), |
95 | 95 | "status" => "active", |
96 | 96 | "type" => "a/b" |
@@ -112,38 +112,38 @@ discard block |
||
112 | 112 | $options = array( |
113 | 113 | "project_id" => 1000, |
114 | 114 | "changes" => array( |
115 | - array( |
|
115 | + array( |
|
116 | 116 | "type" => "custom_code", |
117 | 117 | "allow_additional_redirect" => true, |
118 | 118 | "async" => true, |
119 | 119 | "css_selector" => "a[href*=\"optimizely\"]", |
120 | 120 | "dependencies" => array( |
121 | - 24, |
|
122 | - 26 |
|
121 | + 24, |
|
122 | + 26 |
|
123 | 123 | ), |
124 | 124 | "destination" => "https://app.optimizely.com/", |
125 | 125 | "extension_id" => 1234, |
126 | 126 | "preserve_parameters" => true, |
127 | 127 | "src" => 524, |
128 | 128 | "value" => "window.someGlobalFunction();" |
129 | - ) |
|
129 | + ) |
|
130 | 130 | ), |
131 | 131 | "created" => "2016-10-14T05:08:42.822Z", |
132 | 132 | "earliest" => "2016-10-14T05:08:42.822Z", |
133 | 133 | "experiment_ids" => array( |
134 | - 0 |
|
134 | + 0 |
|
135 | 135 | ), |
136 | 136 | "holdback" => 0, |
137 | 137 | "last_modified" => "2016-10-14T05:08:42.822Z", |
138 | 138 | "latest" => "2016-10-14T05:08:42.822Z", |
139 | 139 | "metrics" => array( |
140 | - array( |
|
140 | + array( |
|
141 | 141 | "kind" => "string" |
142 | - ) |
|
142 | + ) |
|
143 | 143 | ), |
144 | 144 | "name" => "Landing Page Optimization", |
145 | 145 | "page_ids" => array( |
146 | - 0 |
|
146 | + 0 |
|
147 | 147 | ), |
148 | 148 | "status" => "active", |
149 | 149 | "type" => "a/b" |