diff --git a/core/AssetManager/UIAssetFetcher/JScriptUIAssetFetcher.php b/core/AssetManager/UIAssetFetcher/JScriptUIAssetFetcher.php
index a5461a905f3..700e2432f4d 100644
--- a/core/AssetManager/UIAssetFetcher/JScriptUIAssetFetcher.php
+++ b/core/AssetManager/UIAssetFetcher/JScriptUIAssetFetcher.php
@@ -52,7 +52,11 @@ protected function retrieveFileLocations()
protected function addThemeFiles()
{
- if(in_array($this->getTheme()->getThemeName(), $this->plugins)) {
+ $theme = $this->getTheme();
+ if(!$theme) {
+ return;
+ }
+ if(in_array($theme->getThemeName(), $this->plugins)) {
$jsInThemes = $this->getTheme()->getJavaScriptFiles();
diff --git a/core/Plugin/Manager.php b/core/Plugin/Manager.php
index 2258c30ab5b..924954b4a69 100644
--- a/core/Plugin/Manager.php
+++ b/core/Plugin/Manager.php
@@ -16,6 +16,7 @@
use Piwik\Filesystem;
use Piwik\Option;
use Piwik\Plugin;
+use Piwik\SettingsServer;
use Piwik\Singleton;
use Piwik\Theme;
use Piwik\Tracker;
diff --git a/piwik.php b/piwik.php
index ac7be69072e..f3327f666f0 100644
--- a/piwik.php
+++ b/piwik.php
@@ -90,6 +90,7 @@
} else {
$vendorDirectory = PIWIK_INCLUDE_PATH . '/../..';
}
+require_once $vendorDirectory . '/autoload.php';
require_once $vendorDirectory . '/mustangostang/spyc/Spyc.php';
require_once $vendorDirectory . '/piwik/device-detector/DeviceDetector.php';
diff --git a/plugins/Events/lang/en.json b/plugins/Events/lang/en.json
index 12a193e0a5c..2e625c873e8 100644
--- a/plugins/Events/lang/en.json
+++ b/plugins/Events/lang/en.json
@@ -13,14 +13,16 @@
"TotalValue": "Total value",
"MinValue": "Minimum value",
"MaxValue": "Maximum value",
+ "AvgValue": "Average value",
"EventsWithValue": "Events with a value",
"TotalEventsDocumentation": "Total number of events",
- "TotalValueDocumentation": "Total value of events (this is the sum of event values)",
- "MinValueDocumentation": "Minimum value for this event",
- "MaxValueDocumentation": "Maximum value for this event",
+ "TotalValueDocumentation": "The sum of event values",
+ "MinValueDocumentation": "The minimum value for this event",
+ "MaxValueDocumentation": "The maximum value for this event",
+ "AvgValueDocumentation": "The average of all values for this event",
"EventsWithValueDocumentation": "Number of events where an Event value was set",
"NameNotSet": "(Event Name not set)",
- "EventValueTooltip": "Total Event value based on %s events %s between %s and %s.",
+ "EventValueTooltip": "Total Event value is the sum of %s events values %s between minimum of %s and maximum of %s.",
"AvgEventValue": "Average Event value is: %s",
"TopEvents": "Top Events",
"ViewEvents": "View Events"
diff --git a/tests/PHPUnit/Integration/expected/test_CustomEvents_Events.getAction_lastN__API.getProcessedReport_day.xml b/tests/PHPUnit/Integration/expected/test_CustomEvents_Events.getAction_lastN__API.getProcessedReport_day.xml
index a841bb9207d..ef944810433 100644
--- a/tests/PHPUnit/Integration/expected/test_CustomEvents_Events.getAction_lastN__API.getProcessedReport_day.xml
+++ b/tests/PHPUnit/Integration/expected/test_CustomEvents_Events.getAction_lastN__API.getProcessedReport_day.xml
@@ -13,13 +13,15 @@
Total valueMinimum valueMaximum value
+ Average valueEvents with a valueTotal number of events
- Total value of events (sum of event values)
- Minimum value for this event
- Maximum value for this event
+ The sum of event values
+ The minimum value for this event
+ The maximum value for this event
+ The average of all values for this eventNumber of events where an Event value was setgetNameFromActionId
@@ -33,6 +35,7 @@
Total valueMinimum valueMaximum value
+ Average valueEvents with a value
@@ -44,6 +47,7 @@
000
+ 0
@@ -52,6 +56,7 @@
000
+ 0
@@ -60,6 +65,7 @@
000
+ 0
@@ -68,6 +74,7 @@
000
+ 0
@@ -76,6 +83,7 @@
000
+ 0
@@ -84,6 +92,7 @@
000
+ 0
@@ -92,6 +101,7 @@
57.32010
+ 9.55
@@ -100,6 +110,7 @@
000
+ 0
@@ -108,6 +119,7 @@
19.3209.66
+ 9.66
@@ -116,6 +128,7 @@
000
+ 0
@@ -124,6 +137,7 @@
000
+ 0
@@ -132,6 +146,7 @@
000
+ 0
diff --git a/tests/PHPUnit/Integration/expected/test_CustomEvents_Events.getCategory_lastN__API.getProcessedReport_day.xml b/tests/PHPUnit/Integration/expected/test_CustomEvents_Events.getCategory_lastN__API.getProcessedReport_day.xml
index cf80d472661..b503ab72928 100644
--- a/tests/PHPUnit/Integration/expected/test_CustomEvents_Events.getCategory_lastN__API.getProcessedReport_day.xml
+++ b/tests/PHPUnit/Integration/expected/test_CustomEvents_Events.getCategory_lastN__API.getProcessedReport_day.xml
@@ -13,13 +13,15 @@
Total valueMinimum valueMaximum value
+ Average valueEvents with a valueTotal number of events
- Total value of events (sum of event values)
- Minimum value for this event
- Maximum value for this event
+ The sum of event values
+ The minimum value for this event
+ The maximum value for this event
+ The average of all values for this eventNumber of events where an Event value was setgetActionFromCategoryId
@@ -33,6 +35,7 @@
Total valueMinimum valueMaximum value
+ Average valueEvents with a value
@@ -44,6 +47,7 @@
19.3209.66
+ 9.66
@@ -52,6 +56,7 @@
38010
+ 9.5
@@ -60,6 +65,7 @@
19.3209.66
+ 9.66
diff --git a/tests/PHPUnit/Integration/expected/test_CustomEvents_Events.getName_lastN__API.getProcessedReport_day.xml b/tests/PHPUnit/Integration/expected/test_CustomEvents_Events.getName_lastN__API.getProcessedReport_day.xml
index 24e3960c05f..33594b42a4a 100644
--- a/tests/PHPUnit/Integration/expected/test_CustomEvents_Events.getName_lastN__API.getProcessedReport_day.xml
+++ b/tests/PHPUnit/Integration/expected/test_CustomEvents_Events.getName_lastN__API.getProcessedReport_day.xml
@@ -13,13 +13,15 @@
Total valueMinimum valueMaximum value
+ Average valueEvents with a valueTotal number of events
- Total value of events (sum of event values)
- Minimum value for this event
- Maximum value for this event
+ The sum of event values
+ The minimum value for this event
+ The maximum value for this event
+ The average of all values for this eventNumber of events where an Event value was setgetActionFromNameId
@@ -33,6 +35,7 @@
Total valueMinimum valueMaximum value
+ Average valueEvents with a value
@@ -44,6 +47,7 @@
19.3209.66
+ 9.66
@@ -52,6 +56,7 @@
38010
+ 9.5
@@ -60,6 +65,7 @@
000
+ 0
@@ -68,6 +74,7 @@
19.3209.66
+ 9.66
@@ -76,6 +83,7 @@
000
+ 0
@@ -84,6 +92,7 @@
000
+ 0
@@ -92,6 +101,7 @@
000
+ 0