@@ -42,26 +42,26 @@ |
||
| 42 | 42 | $campaign = new Campaign(array( |
| 43 | 43 | "project_id" => $projectId, |
| 44 | 44 | "changes" => array( |
| 45 | - array( |
|
| 45 | + array( |
|
| 46 | 46 | "type" => "custom_code", |
| 47 | 47 | "value" => "window.someGlobalFunction();" |
| 48 | - ) |
|
| 48 | + ) |
|
| 49 | 49 | ), |
| 50 | 50 | "experiment_ids" => array( |
| 51 | - 0 |
|
| 51 | + 0 |
|
| 52 | 52 | ), |
| 53 | 53 | "holdback" => 0, |
| 54 | 54 | "metrics" => array( |
| 55 | - array( |
|
| 55 | + array( |
|
| 56 | 56 | "aggregator" => "sum", |
| 57 | 57 | "event_id" => 0, |
| 58 | 58 | "field" => "revenue", |
| 59 | 59 | "scope" => "session" |
| 60 | - ) |
|
| 60 | + ) |
|
| 61 | 61 | ), |
| 62 | 62 | "name" => "Landing Page Optimization", |
| 63 | 63 | "page_ids" => array( |
| 64 | - $pageId, |
|
| 64 | + $pageId, |
|
| 65 | 65 | ), |
| 66 | 66 | "status" => "not_started", |
| 67 | 67 | "type" => "a/b" |
@@ -17,14 +17,14 @@ discard block |
||
| 17 | 17 | use WebMarketingROI\OptimizelyPHP\Resource\v2\Campaign; |
| 18 | 18 | |
| 19 | 19 | // Init class autloading. |
| 20 | -include dirname(__FILE__) . '/../../vendor/autoload.php'; |
|
| 20 | +include dirname(__FILE__).'/../../vendor/autoload.php'; |
|
| 21 | 21 | |
| 22 | 22 | // Include Utils.php - a file containing helper functions |
| 23 | -include dirname(__FILE__) . '/../Utils.php'; |
|
| 23 | +include dirname(__FILE__).'/../Utils.php'; |
|
| 24 | 24 | |
| 25 | 25 | // Read project ID from command line. |
| 26 | -if ($argc!=3) { |
|
| 27 | - die('Expected 2 command-line argument, while got ' . $argc-1); |
|
| 26 | +if ($argc != 3) { |
|
| 27 | + die('Expected 2 command-line argument, while got '.$argc - 1); |
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | $projectId = $argv[1]; |
@@ -81,6 +81,6 @@ discard block |
||
| 81 | 81 | |
| 82 | 82 | // Save access token for later use |
| 83 | 83 | $accessToken = $optimizelyClient->getAccessToken(); |
| 84 | -file_put_contents(dirname(__FILE__) . '/../access_token.json', json_encode($accessToken)); |
|
| 84 | +file_put_contents(dirname(__FILE__).'/../access_token.json', json_encode($accessToken)); |
|
| 85 | 85 | |
| 86 | 86 | echo "Done!\n"; |