update Piwik to version 2.16 (fixes #91)
This commit is contained in:
parent
296343bf3b
commit
d885a4baa9
5833 changed files with 418860 additions and 226988 deletions
|
|
@ -1,13 +1,8 @@
|
|||
<Files "*">
|
||||
<IfModule mod_access.c>
|
||||
Deny from all
|
||||
</IfModule>
|
||||
<IfModule !mod_access_compat>
|
||||
<IfModule mod_authz_host.c>
|
||||
Deny from all
|
||||
</IfModule>
|
||||
</IfModule>
|
||||
<IfModule mod_access_compat>
|
||||
Deny from all
|
||||
</IfModule>
|
||||
<IfVersion < 2.4>
|
||||
Deny from all
|
||||
</IfVersion>
|
||||
<IfVersion >= 2.4>
|
||||
Require all denied
|
||||
</IfVersion>
|
||||
</Files>
|
||||
|
|
|
|||
12
www/analytics/config/environment/dev.php
Normal file
12
www/analytics/config/environment/dev.php
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
'Piwik\Cache\Backend' => DI\object('Piwik\Cache\Backend\ArrayCache'),
|
||||
|
||||
'Piwik\Translation\Loader\LoaderInterface' => DI\object('Piwik\Translation\Loader\LoaderCache')
|
||||
->constructor(DI\get('Piwik\Translation\Loader\DevelopmentLoader')),
|
||||
'Piwik\Translation\Loader\DevelopmentLoader' => DI\object()
|
||||
->constructor(DI\get('Piwik\Translation\Loader\JsonFileLoader')),
|
||||
|
||||
);
|
||||
97
www/analytics/config/environment/test.php
Normal file
97
www/analytics/config/environment/test.php
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
<?php
|
||||
|
||||
use Interop\Container\ContainerInterface;
|
||||
use Piwik\Common;
|
||||
use Piwik\Tests\Framework\Mock\FakeAccess;
|
||||
use Piwik\Tests\Framework\Mock\TestConfig;
|
||||
|
||||
return array(
|
||||
|
||||
// Disable logging
|
||||
'Psr\Log\LoggerInterface' => DI\object('Psr\Log\NullLogger'),
|
||||
|
||||
'Piwik\Cache\Backend' => function () {
|
||||
return \Piwik\Cache::buildBackend('file');
|
||||
},
|
||||
'cache.eager.cache_id' => 'eagercache-test-',
|
||||
|
||||
// Disable loading core translations
|
||||
'Piwik\Translation\Translator' => DI\decorate(function ($previous, ContainerInterface $c) {
|
||||
$loadRealTranslations = $c->get('test.vars.loadRealTranslations');
|
||||
if (!$loadRealTranslations) {
|
||||
return new \Piwik\Translation\Translator($c->get('Piwik\Translation\Loader\LoaderInterface'), $directories = array());
|
||||
} else {
|
||||
return $previous;
|
||||
}
|
||||
}),
|
||||
|
||||
'Piwik\Config' => DI\decorate(function ($previous, ContainerInterface $c) {
|
||||
$testingEnvironment = $c->get('Piwik\Tests\Framework\TestingEnvironmentVariables');
|
||||
|
||||
$dontUseTestConfig = $c->get('test.vars.dontUseTestConfig');
|
||||
if (!$dontUseTestConfig) {
|
||||
$settingsProvider = $c->get('Piwik\Application\Kernel\GlobalSettingsProvider');
|
||||
return new TestConfig($settingsProvider, $testingEnvironment, $allowSave = false, $doSetTestEnvironment = true);
|
||||
} else {
|
||||
return $previous;
|
||||
}
|
||||
}),
|
||||
|
||||
'Piwik\Access' => DI\decorate(function ($previous, ContainerInterface $c) {
|
||||
$testUseMockAuth = $c->get('test.vars.testUseMockAuth');
|
||||
if ($testUseMockAuth) {
|
||||
$idSitesAdmin = $c->get('test.vars.idSitesAdminAccess');
|
||||
$access = new FakeAccess();
|
||||
if (!empty($idSitesAdmin)) {
|
||||
FakeAccess::$superUser = false;
|
||||
FakeAccess::$idSitesAdmin = $idSitesAdmin;
|
||||
FakeAccess::$identity = 'adminUserLogin';
|
||||
} else {
|
||||
FakeAccess::$superUser = true;
|
||||
FakeAccess::$superUserLogin = 'superUserLogin';
|
||||
}
|
||||
return $access;
|
||||
} else {
|
||||
return $previous;
|
||||
}
|
||||
}),
|
||||
|
||||
'observers.global' => DI\add(array(
|
||||
|
||||
array('AssetManager.getStylesheetFiles', function (&$stylesheets) {
|
||||
$useOverrideCss = \Piwik\Container\StaticContainer::get('test.vars.useOverrideCss');
|
||||
if ($useOverrideCss) {
|
||||
$stylesheets[] = 'tests/resources/screenshot-override/override.css';
|
||||
}
|
||||
}),
|
||||
|
||||
array('AssetManager.getJavaScriptFiles', function (&$jsFiles) {
|
||||
$useOverrideJs = \Piwik\Container\StaticContainer::get('test.vars.useOverrideJs');
|
||||
if ($useOverrideJs) {
|
||||
$jsFiles[] = 'tests/resources/screenshot-override/override.js';
|
||||
}
|
||||
}),
|
||||
|
||||
array('Updater.checkForUpdates', function () {
|
||||
try {
|
||||
@\Piwik\Filesystem::deleteAllCacheOnUpdate();
|
||||
} catch (Exception $ex) {
|
||||
// pass
|
||||
}
|
||||
}),
|
||||
|
||||
array('Test.Mail.send', function (\Zend_Mail $mail) {
|
||||
$outputFile = PIWIK_INCLUDE_PATH . '/tmp/' . Common::getRequestVar('module', '') . '.' . Common::getRequestVar('action', '') . '.mail.json';
|
||||
$outputContent = str_replace("=\n", "", $mail->getBodyText($textOnly = true));
|
||||
$outputContent = str_replace("=0A", "\n", $outputContent);
|
||||
$outputContent = str_replace("=3D", "=", $outputContent);
|
||||
$outputContents = array(
|
||||
'from' => $mail->getFrom(),
|
||||
'to' => $mail->getRecipients(),
|
||||
'subject' => $mail->getSubject(),
|
||||
'contents' => $outputContent
|
||||
);
|
||||
file_put_contents($outputFile, json_encode($outputContents));
|
||||
}),
|
||||
)),
|
||||
);
|
||||
62
www/analytics/config/environment/ui-test.php
Normal file
62
www/analytics/config/environment/ui-test.php
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
<?php
|
||||
|
||||
use Piwik\Container\StaticContainer;
|
||||
|
||||
return array(
|
||||
|
||||
// UI tests will remove the port from all URLs to the test server. if a test
|
||||
// requires the ports in UI tests (eg, Overlay), add the api/controller methods
|
||||
// to one of these blacklists
|
||||
'tests.ui.url_normalizer_blacklist.api' => array(),
|
||||
'tests.ui.url_normalizer_blacklist.controller' => array(),
|
||||
|
||||
'Piwik\Config' => \DI\decorate(function (\Piwik\Config $config) {
|
||||
$config->General['cors_domains'][] = '*';
|
||||
$config->General['trusted_hosts'][] = $config->tests['http_host'];
|
||||
$config->General['trusted_hosts'][] = $config->tests['http_host'] . ':' . $config->tests['port'];
|
||||
return $config;
|
||||
}),
|
||||
|
||||
'observers.global' => \DI\add(array(
|
||||
|
||||
// removes port from all URLs to the test Piwik server so UI tests will pass no matter
|
||||
// what port is used
|
||||
array('Request.dispatch.end', function (&$result) {
|
||||
$request = $_GET + $_POST;
|
||||
|
||||
$apiblacklist = StaticContainer::get('tests.ui.url_normalizer_blacklist.api');
|
||||
if (!empty($request['method'])
|
||||
&& in_array($request['method'], $apiblacklist)
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
$controllerActionblacklist = StaticContainer::get('tests.ui.url_normalizer_blacklist.controller');
|
||||
if (!empty($request['module'])
|
||||
&& !empty($request['action'])
|
||||
) {
|
||||
$controllerAction = $request['module'] . '.' . $request['action'];
|
||||
if (in_array($controllerAction, $controllerActionblacklist)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$config = \Piwik\Config::getInstance();
|
||||
$host = $config->tests['http_host'];
|
||||
$port = $config->tests['port'];
|
||||
|
||||
if (!empty($port)) {
|
||||
// remove the port from URLs if any so UI tests won't fail if the port isn't 80
|
||||
$result = str_replace($host . ':' . $port, $host, $result);
|
||||
}
|
||||
|
||||
// remove PIWIK_INCLUDE_PATH from result so tests don't change based on the machine used
|
||||
$result = str_replace(realpath(PIWIK_INCLUDE_PATH), '', $result);
|
||||
}),
|
||||
|
||||
array('Controller.ExampleRssWidget.rssPiwik.end', function (&$result, $parameters) {
|
||||
$result = "";
|
||||
}),
|
||||
)),
|
||||
|
||||
);
|
||||
|
|
@ -18,25 +18,46 @@ password =
|
|||
dbname =
|
||||
tables_prefix =
|
||||
port = 3306
|
||||
adapter = PDO_MYSQL
|
||||
adapter = PDO\MYSQL
|
||||
type = InnoDB
|
||||
schema = Mysql
|
||||
|
||||
; if charset is set to utf8, Piwik will ensure that it is storing its data using UTF8 charset.
|
||||
; it will add a sql query SET at each page view.
|
||||
; Piwik should work correctly without this setting.
|
||||
;charset = utf8
|
||||
; Piwik should work correctly without this setting but we recommend to have a charset set.
|
||||
charset = utf8
|
||||
|
||||
[database_tests]
|
||||
host = localhost
|
||||
username = root
|
||||
username = "@USERNAME@"
|
||||
password =
|
||||
dbname = piwik_tests
|
||||
tables_prefix = piwiktests_
|
||||
port = 3306
|
||||
adapter = PDO_MYSQL
|
||||
adapter = PDO\MYSQL
|
||||
type = InnoDB
|
||||
schema = Mysql
|
||||
charset = utf8
|
||||
|
||||
[tests]
|
||||
; needed in order to run tests.
|
||||
; if Piwik is available at http://localhost/dev/piwik/ replace @REQUEST_URI@ with /dev/piwik/
|
||||
; note: the REQUEST_URI should not contain "plugins" or "tests" in the PATH
|
||||
http_host = localhost
|
||||
remote_addr = "127.0.0.1"
|
||||
request_uri = "@REQUEST_URI@"
|
||||
port =
|
||||
|
||||
; access key and secret as listed in AWS -> IAM -> Users
|
||||
aws_accesskey = ""
|
||||
aws_secret = ""
|
||||
; key pair name as listed in AWS -> EC2 -> Key Pairs. Key name should be different per user.
|
||||
aws_keyname = ""
|
||||
; PEM file can be downloaded after creating a new key pair in AWS -> EC2 -> Key Pairs
|
||||
aws_pem_file = "<path to pem file>"
|
||||
aws_securitygroups[] = "default"
|
||||
aws_region = "us-east-1"
|
||||
aws_ami = "ami-ac24bac4"
|
||||
aws_instance_type = "c3.large"
|
||||
|
||||
[log]
|
||||
; possible values for log: screen, database, file
|
||||
|
|
@ -44,20 +65,36 @@ log_writers[] = screen
|
|||
|
||||
; log level, everything logged w/ this level or one of greater severity
|
||||
; will be logged. everything else will be ignored. possible values are:
|
||||
; NONE, ERROR, WARN, INFO, DEBUG, VERBOSE
|
||||
; ERROR, WARN, INFO, DEBUG
|
||||
log_level = WARN
|
||||
|
||||
; if set to 1, only requests done in CLI mode (eg. the archive.php cron run) will be logged
|
||||
; NOTE: log_only_when_debug_parameter will also be checked for
|
||||
log_only_when_cli = 0
|
||||
|
||||
; if set to 1, only requests with "&debug" parameter will be logged
|
||||
; NOTE: log_only_when_cli will also be checked for
|
||||
log_only_when_debug_parameter = 0
|
||||
|
||||
; if configured to log in a file, log entries will be made to this file
|
||||
logger_file_path = tmp/logs/piwik.log
|
||||
|
||||
[Cache]
|
||||
; available backends are 'file', 'array', 'null', 'redis', 'chained'
|
||||
; 'array' will cache data only during one request
|
||||
; 'null' will not cache anything at all
|
||||
; 'file' will cache on the filesystem
|
||||
; 'redis' will cache on a Redis server, use this if you are running Piwik with multiple servers. Further configuration in [RedisCache] is needed
|
||||
; 'chained' will chain multiple cache backends. Further configuration in [ChainedCache] is needed
|
||||
backend = chained
|
||||
|
||||
[ChainedCache]
|
||||
; The chained cache will always try to read from the fastest backend first (the first listed one) to avoid requesting
|
||||
; the same cache entry from the slowest backend multiple times in one request.
|
||||
backends[] = array
|
||||
backends[] = file
|
||||
|
||||
[RedisCache]
|
||||
; Redis server configuration.
|
||||
host = "127.0.0.1"
|
||||
port = 6379
|
||||
timeout = 0.0
|
||||
password = ""
|
||||
database = 14
|
||||
; In case you are using queued tracking: Make sure to configure a different database! Otherwise queued requests might
|
||||
; be flushed
|
||||
|
||||
[Debug]
|
||||
; if set to 1, the archiving process will always be triggered, even if the archive has already been computed
|
||||
|
|
@ -72,40 +109,68 @@ always_archive_data_range = 0;
|
|||
; NOTE: you must also set [log] log_writers[] = "screen" to enable the profiler to print on screen
|
||||
enable_sql_profiler = 0
|
||||
|
||||
; if set to 1, a Piwik tracking code will be included in the Piwik UI footer and will track visits, pages, etc. to idsite = 1
|
||||
; this is useful for Piwik developers as an easy way to create data in their local Piwik
|
||||
track_visits_inside_piwik_ui = 0
|
||||
|
||||
; if set to 1, javascript files will be included individually and neither merged nor minified.
|
||||
; this option must be set to 1 when adding, removing or modifying javascript files
|
||||
disable_merged_assets = 0
|
||||
|
||||
; If set to 1, all requests to piwik.php will be forced to be 'new visitors'
|
||||
tracker_always_new_visitor = 0
|
||||
|
||||
; Allow automatic upgrades to Beta or RC releases
|
||||
allow_upgrades_to_beta = 0
|
||||
; if set to 1, all SQL queries will be logged using the DEBUG log level
|
||||
log_sql_queries = 0
|
||||
|
||||
[DebugTests]
|
||||
; Set to 1 by default. If you set to 0, the standalone plugins (with their own git repositories)
|
||||
; will not be loaded when executing tests.
|
||||
enable_load_standalone_plugins_during_tests = 1
|
||||
; When set to 1, standalone plugins (those with their own git repositories)
|
||||
; will be loaded when executing tests.
|
||||
enable_load_standalone_plugins_during_tests = 0
|
||||
|
||||
[Development]
|
||||
; Enables the development mode where we avoid most caching to make sure code changes will be directly applied as
|
||||
; some caches are only invalidated after an update otherwise. When enabled it'll also performs some validation checks.
|
||||
; For instance if you register a method in a widget we will verify whether the method actually exists and is public.
|
||||
; If not, we will show you a helpful warning to make it easy to find simple typos etc.
|
||||
enabled = 0
|
||||
|
||||
; if set to 1, javascript files will be included individually and neither merged nor minified.
|
||||
; this option must be set to 1 when adding, removing or modifying javascript files
|
||||
; Note that for quick debugging, instead of using below setting, you can add `&disable_merged_assets=1` to the Piwik URL
|
||||
disable_merged_assets = 0
|
||||
|
||||
[General]
|
||||
; the following settings control whether Unique Visitors will be processed for different period types.
|
||||
|
||||
; the following settings control whether Unique Visitors `nb_uniq_visitors` and Unique users `nb_users` will be processed for different period types.
|
||||
; year and range periods are disabled by default, to ensure optimal performance for high traffic Piwik instances
|
||||
; if you set it to 1 and want the Unique Visitors to be re-processed for reports in the past, drop all piwik_archive_* tables
|
||||
; it is recommended to always enable Unique Visitors processing for 'day' periods
|
||||
; it is recommended to always enable Unique Visitors and Unique Users processing for 'day' periods
|
||||
enable_processing_unique_visitors_day = 1
|
||||
enable_processing_unique_visitors_week = 1
|
||||
enable_processing_unique_visitors_month = 1
|
||||
enable_processing_unique_visitors_year = 0
|
||||
enable_processing_unique_visitors_range = 0
|
||||
|
||||
; controls whether Unique Visitors will be processed for groups of websites. these metrics describe the number
|
||||
; of unique visitors across the entire set of websites, so if a visitor visited two websites in the group, she
|
||||
; would still only be counted as one. only relevant when using plugins that group sites together
|
||||
enable_processing_unique_visitors_multiple_sites = 0
|
||||
|
||||
; The list of periods that are available in the Piwik calendar
|
||||
; Example use case: custom date range requests are processed in real time,
|
||||
; so they may take a few minutes on very high traffic website: you may remove "range" below to disable this period
|
||||
enabled_periods_UI = "day,week,month,year,range"
|
||||
enabled_periods_API = "day,week,month,year,range"
|
||||
|
||||
; whether to enable subquery cache for Custom Segment archiving queries
|
||||
enable_segments_subquery_cache = 0
|
||||
; Any segment subquery that matches more than segments_subquery_cache_limit IDs will not be cached,
|
||||
; and the original subquery executed instead.
|
||||
segments_subquery_cache_limit = 100000
|
||||
; TTL: Time to live for cache files, in seconds. Default to 60 minutes
|
||||
segments_subquery_cache_ttl = 3600
|
||||
|
||||
; when set to 1, all requests to Piwik will return a maintenance message without connecting to the DB
|
||||
; this is useful when upgrading using the shell command, to prevent other users from accessing the UI while Upgrade is in progress
|
||||
maintenance_mode = 0
|
||||
|
||||
; Defines the release channel that shall be used. Currently available values are:
|
||||
; "latest_stable", "latest_beta", "latest_2x_stable", "latest_2x_beta"
|
||||
release_channel = "latest_stable"
|
||||
|
||||
; character used to automatically create categories in the Actions > Pages, Outlinks and Downloads reports
|
||||
; for example a URL like "example.com/blog/development/first-post" will create
|
||||
; the page first-post in the subcategory development which belongs to the blog category
|
||||
|
|
@ -143,10 +208,36 @@ browser_archiving_disabled_enforce = 0
|
|||
; By default, users can create Segments which are to be processed in Real-time.
|
||||
; Setting this to 0 will force all newly created Custom Segments to be "Pre-processed (faster, requires archive.php cron)"
|
||||
; This can be useful if you want to prevent users from adding much load on the server.
|
||||
; Note: any existing Segment set to "processed in Real time", will still be set to Real-time.
|
||||
; this will only affect custom segments added or modified after this setting is changed.
|
||||
; Notes:
|
||||
; * any existing Segment set to "processed in Real time", will still be set to Real-time.
|
||||
; this will only affect custom segments added or modified after this setting is changed.
|
||||
; * when set to 0 then any user with at least 'view' access will be able to create pre-processed segments.
|
||||
enable_create_realtime_segments = 1
|
||||
|
||||
; Whether to enable the "Suggest values for segment" in the Segment Editor panel.
|
||||
; Set this to 0 in case your Piwik database is very big, and suggested values may not appear in time
|
||||
enable_segment_suggested_values = 1
|
||||
|
||||
; By default, any user with a "view" access for a website can create segment assigned to this website.
|
||||
; Set this to "admin" or "superuser" to require that users should have at least this access to create new segments.
|
||||
; Note: anonymous user (even if it has view access) is not allowed to create or edit segment.
|
||||
; Possible values are "view", "admin", "superuser"
|
||||
adding_segment_requires_access = "view"
|
||||
|
||||
; Whether it is allowed for users to add segments that affect all websites or not. If there are many websites
|
||||
; this admin option can be used to prevent users from performing an action that will have a major impact
|
||||
; on Piwik performance.
|
||||
allow_adding_segments_for_all_websites = 1
|
||||
|
||||
; When archiving segments for the first time, this determines the oldest date that will be archived.
|
||||
; This option can be used to avoid archiving (for isntance) the lastN years for every new segment.
|
||||
; Valid option values include: "beginning_of_time" (start date of archiving will not be changed)
|
||||
; "segment_last_edit_time" (start date of archiving will be the earliest last edit date found,
|
||||
; if none is found, the created date is used)
|
||||
; "segment_creation_time" (start date of archiving will be the creation date of the segment)
|
||||
; lastN where N is an integer (eg "last10" to archive for 10 days before the segment creation date)
|
||||
process_new_segments_from = "beginning_of_time"
|
||||
|
||||
; this action name is used when the URL ends with a slash /
|
||||
; it is useful to have an actual string to write in the UI
|
||||
action_default_name = index
|
||||
|
|
@ -158,6 +249,11 @@ default_language = en
|
|||
; default number of elements in the datatable
|
||||
datatable_default_limit = 10
|
||||
|
||||
; Each datatable report has a Row Limit selector at the bottom right.
|
||||
; By default you can select from 5 to 500 rows. You may customise the values below
|
||||
; -1 will be displayed as 'all' and it will export all rows (filter_limit=-1)
|
||||
datatable_row_limits = "5,10,25,50,100,250,500,-1"
|
||||
|
||||
; default number of rows returned in API responses
|
||||
; this value is overwritten by the '# Rows to display' selector.
|
||||
; if set to -1, a click on 'Export as' will export all rows independently of the current '# Rows to display'.
|
||||
|
|
@ -175,21 +271,32 @@ default_day = yesterday
|
|||
default_period = day
|
||||
|
||||
; Time in seconds after which an archive will be computed again. This setting is used only for today's statistics.
|
||||
; Defaults to 10 seconds so that by default, Piwik provides real time reporting.
|
||||
; This setting is overriden in the UI, under "General Settings".
|
||||
; This setting is only used if it hasn't been overriden via the UI yet, or if enable_general_settings_admin=0
|
||||
time_before_today_archive_considered_outdated = 10
|
||||
time_before_today_archive_considered_outdated = 150
|
||||
|
||||
; This setting is overriden in the UI, under "General Settings".
|
||||
; The default value is to allow browsers to trigger the Piwik archiving process.
|
||||
; This setting is only used if it hasn't been overriden via the UI yet, or if enable_general_settings_admin=0
|
||||
enable_browser_archiving_triggering = 1
|
||||
|
||||
; By default, Piwik will force archiving of range periods from browser requests, even if enable_browser_archiving_triggering
|
||||
; is set to 0. This can sometimes create too much of a demand on system resources. Setting this option to 0 and setting
|
||||
; enable_browser_archiving_triggering to 0 will make sure ranges are not archived on browser request. Since the cron
|
||||
; archiver does not archive ranges, you must either disable ranges or make sure the ranges users' want to see will be
|
||||
; processed somehow.
|
||||
archiving_range_force_on_browser_request = 1
|
||||
|
||||
; By default Piwik runs OPTIMIZE TABLE SQL queries to free spaces after deleting some data.
|
||||
; If your Piwik tracks millions of pages, the OPTIMIZE TABLE queries might run for hours (seen in "SHOW FULL PROCESSLIST \g")
|
||||
; so you can disable these special queries here:
|
||||
enable_sql_optimize_queries = 1
|
||||
|
||||
; By default Piwik is purging complete date range archives to free spaces after deleting some data.
|
||||
; If you are pre-processing custom ranges using CLI task to make them easily available in UI,
|
||||
; you can prevent this action from happening by setting this parameter to value bigger than 1
|
||||
purge_date_range_archives_after_X_days = 1
|
||||
|
||||
; MySQL minimum required version
|
||||
; note: timezone support added in 4.1.3
|
||||
minimum_mysql_version = 4.1
|
||||
|
|
@ -200,7 +307,7 @@ minimum_pgsql_version = 8.3
|
|||
; Minimum adviced memory limit in php.ini file (see memory_limit value)
|
||||
minimum_memory_limit = 128
|
||||
|
||||
; Minimum memory limit enforced when archived via misc/cron/archive.php
|
||||
; Minimum memory limit enforced when archived via ./console core:archive
|
||||
minimum_memory_limit_when_archiving = 768
|
||||
|
||||
; Piwik will check that usernames and password have a minimum length, and will check that characters are "allowed"
|
||||
|
|
@ -217,14 +324,15 @@ session_save_handler = files
|
|||
|
||||
; If set to 1, Piwik will automatically redirect all http:// requests to https://
|
||||
; If SSL / https is not correctly configured on the server, this will break Piwik
|
||||
; If you set this to 1, and your SSL configuration breaks later on, you can always edit this back to 0
|
||||
; If you set this to 1, and your SSL configuration breaks later on, you can always edit this back to 0
|
||||
; it is recommended for security reasons to always use Piwik over https
|
||||
force_ssl = 0
|
||||
|
||||
; login cookie name
|
||||
login_cookie_name = piwik_auth
|
||||
|
||||
; login cookie expiration (14 days)
|
||||
; By default, the auth cookie is set only for the duration of session.
|
||||
; if "Remember me" is checked, the auth cookie will be valid for 14 days by default
|
||||
login_cookie_expire = 1209600
|
||||
|
||||
; The path on the server in which the cookie will be available on.
|
||||
|
|
@ -237,6 +345,12 @@ login_password_recovery_email_address = "password-recovery@{DOMAIN}"
|
|||
; name that appears as a Sender in the password recovery email
|
||||
login_password_recovery_email_name = Piwik
|
||||
|
||||
; email address that appears as a Repy-to in the password recovery email
|
||||
; if specified, {DOMAIN} will be replaced by the current Piwik domain
|
||||
login_password_recovery_replyto_email_address = "no-reply@{DOMAIN}"
|
||||
; name that appears as a Reply-to in the password recovery email
|
||||
login_password_recovery_replyto_email_name = "No-reply"
|
||||
|
||||
; By default when user logs out he is redirected to Piwik "homepage" usually the Login form.
|
||||
; Uncomment the next line to set a URL to redirect the user to after he logs out of Piwik.
|
||||
; login_logout_url = http://...
|
||||
|
|
@ -255,10 +369,21 @@ language_cookie_name = piwik_lang
|
|||
; standard email address displayed when sending emails
|
||||
noreply_email_address = "noreply@{DOMAIN}"
|
||||
|
||||
; standard email name displayed when sending emails. If not set, a default name will be used.
|
||||
noreply_email_name = ""
|
||||
|
||||
; feedback email address;
|
||||
; when testing, use your own email address or "nobody"
|
||||
feedback_email_address = "feedback@piwik.org"
|
||||
|
||||
; using to set reply_to in reports e-mail to login of report creator
|
||||
scheduled_reports_replyto_is_user_email_and_alias = 0
|
||||
|
||||
; scheduled reports truncate limit
|
||||
; the report will be rendered with the first 23 rows and will aggregate other rows in a summary row
|
||||
; 23 rows table fits in one portrait page
|
||||
scheduled_reports_truncate = 23
|
||||
|
||||
; during archiving, Piwik will limit the number of results recorded, for performance reasons
|
||||
; maximum number of rows for any of the Referrers tables (keywords, search engines, campaigns, etc.)
|
||||
datatable_archiving_maximum_rows_referrers = 1000
|
||||
|
|
@ -347,9 +472,20 @@ enable_trusted_host_check = 1
|
|||
;trusted_hosts[] = example.com
|
||||
;trusted_hosts[] = stats.example.com
|
||||
|
||||
; The release server is an essential part of the Piwik infrastructure/ecosystem
|
||||
; to provide the latest software version.
|
||||
latest_version_url = http://builds.piwik.org/latest.zip
|
||||
; List of Cross-origin resource sharing domains (eg domain or subdomain names) when generating absolute URLs.
|
||||
; Described here: http://en.wikipedia.org/wiki/Cross-origin_resource_sharing
|
||||
;
|
||||
; Examples:
|
||||
;cors_domains[] = http://example.com
|
||||
;cors_domains[] = http://stats.example.com
|
||||
;
|
||||
; Or you may allow cross domain requests for all domains with:
|
||||
;cors_domains[] = *
|
||||
|
||||
; If you use this Piwik instance over multiple hostnames, Piwik will need to know
|
||||
; a unique instance_id for this instance, so that Piwik can serve the right custom logo and tmp/* assets,
|
||||
; independently of the hostname Piwik is currently running under.
|
||||
; instance_id = stats.example.com
|
||||
|
||||
; The API server is an essential part of the Piwik infrastructure/ecosystem to
|
||||
; provide services to Piwik installations, e.g., getLatestVersion and
|
||||
|
|
@ -362,6 +498,10 @@ api_service_url = http://api.piwik.org
|
|||
; eg. $period=range&date=previous10 becomes $period=day&date=previous10. Use this setting to override the $period value.
|
||||
graphs_default_period_to_plot_when_period_range = day
|
||||
|
||||
; When the ImageGraph plugin is activated, enabling this option causes the image graphs to show the evolution
|
||||
; within the selected period instead of the evolution across the last n periods.
|
||||
graphs_show_evolution_within_selected_period = 0
|
||||
|
||||
; The Overlay plugin shows the Top X following pages, Top X downloads and Top X outlinks which followed
|
||||
; a view of the current page. The value X can be set here.
|
||||
overlay_following_pages_limit = 300
|
||||
|
|
@ -411,7 +551,29 @@ enable_auto_update = 1
|
|||
; If set to 0 it also disables the "sent plugin update emails" feature in general and the related setting in the UI.
|
||||
enable_update_communication = 1
|
||||
|
||||
; This controls whether the pivotBy query parameter can be used with any dimension or just subtable
|
||||
; dimensions. If set to 1, it will fetch a report with a segment for each row of the table being pivoted.
|
||||
; At present, this is very inefficient, so it is disabled by default.
|
||||
pivot_by_filter_enable_fetch_by_segment = 0
|
||||
|
||||
; This controls the default maximum number of columns to display in a pivot table. Since a pivot table displays
|
||||
; a table's rows as columns, the number of columns can become very large, which will affect webpage layouts.
|
||||
; Set to -1 to specify no limit. Note: The pivotByColumnLimit query parameter can be used to override this default
|
||||
; on a per-request basis;
|
||||
pivot_by_filter_default_column_limit = 10
|
||||
|
||||
; If set to 0 it will disable Piwik Pro advertisements in some places. For example in the installation screen, the
|
||||
; Piwik Pro Ad widget will be removed etc.
|
||||
piwik_pro_ads_enabled = 1
|
||||
|
||||
[Tracker]
|
||||
|
||||
; Piwik uses "Privacy by default" model. When one of your users visit multiple of your websites tracked in this Piwik,
|
||||
; Piwik will create for this user a fingerprint that will be different across the multiple websites.
|
||||
; If you want to track unique users across websites (for example when using the InterSites plugin) you may set this setting to 1.
|
||||
; Note: setting this to 0 increases your users' privacy.
|
||||
enable_fingerprinting_across_websites = 0
|
||||
|
||||
; Piwik uses first party cookies by default. If set to 1,
|
||||
; the visit ID cookie will be set on the Piwik server domain as well
|
||||
; this is useful when you want to do cross websites analysis
|
||||
|
|
@ -421,14 +583,14 @@ use_third_party_id_cookie = 0
|
|||
; Once enabled (set to 1) messages will be logged to all loggers defined in "[log] log_writers" config.
|
||||
debug = 0
|
||||
|
||||
; There is a feature in the Tracking API that lets you create new visit at any given time, for example if you know that a different user/customer is using
|
||||
; the app then you would want to tell Piwik to create a new visit (even though both users are using the same browser/computer).
|
||||
; To prevent abuse and easy creation of fake visits, this feature requires admin token_auth by default
|
||||
; If you wish to use this feature using the Javascript tracker, you can set the setting new_visit_api_requires_admin=0, and in Javascript write:
|
||||
; _paq.push(['appendToTrackingUrl', 'new_visit=1']);
|
||||
new_visit_api_requires_admin = 1
|
||||
; This option is an alternative to the debug option above. When set to 1, you can debug tracker request by adding
|
||||
; a debug=1 query paramater in the URL. All other HTTP requests will not have debug enabled. For security reasons this
|
||||
; option should be only enabled if really needed and only for a short time frame. Otherwise anyone can set debug=1 and
|
||||
; see the log output as well.
|
||||
debug_on_demand = 0
|
||||
|
||||
; This setting should only be set to 1 in an intranet setting, where most users have the same configuration (browsers, OS)
|
||||
; This setting is described in this FAQ: http://piwik.org/faq/how-to/faq_175/
|
||||
; Note: generally this should only be set to 1 in an intranet setting, where most users have the same configuration (browsers, OS)
|
||||
; and the same IP. If left to 0 in this setting, all visitors will be counted as one single visitor.
|
||||
trust_visitors_cookies = 0
|
||||
|
||||
|
|
@ -436,9 +598,9 @@ trust_visitors_cookies = 0
|
|||
; This is used only if use_third_party_id_cookie = 1
|
||||
cookie_name = _pk_uid
|
||||
|
||||
; by default, the Piwik tracking cookie expires in 2 years
|
||||
; by default, the Piwik tracking cookie expires in 13 months (365 + 28 days)
|
||||
; This is used only if use_third_party_id_cookie = 1
|
||||
cookie_expire = 63072000
|
||||
cookie_expire = 33955200;
|
||||
|
||||
; The path on the server in which the cookie will be available on.
|
||||
; Defaults to empty. See spec in http://curl.haxx.se/rfc/cookie_spec.html
|
||||
|
|
@ -466,7 +628,7 @@ default_time_one_page_visit = 0
|
|||
; The mapping is defined in core/DataFiles/LanguageToCountry.php,
|
||||
enable_language_to_country_guess = 1
|
||||
|
||||
; When the misc/cron/archive.php cron hasn't been setup, we still need to regularly run some maintenance tasks.
|
||||
; When the `./console core:archive` cron hasn't been setup, we still need to regularly run some maintenance tasks.
|
||||
; Visits to the Tracker will try to trigger Scheduled Tasks (eg. scheduled PDF/HTML reports by email).
|
||||
; Scheduled tasks will only run if 'Enable Piwik Archiving from Browser' is enabled in the General Settings.
|
||||
; Tasks run once every hour maximum, they might not run every hour if traffic is low.
|
||||
|
|
@ -479,13 +641,27 @@ ignore_visits_cookie_name = piwik_ignore
|
|||
; Comma separated list of variable names that will be read to define a Campaign name, for example CPC campaign
|
||||
; Example: If a visitor first visits 'index.php?piwik_campaign=Adwords-CPC' then it will be counted as a campaign referrer named 'Adwords-CPC'
|
||||
; Includes by default the GA style campaign parameters
|
||||
campaign_var_name = "pk_campaign,piwik_campaign,utm_campaign,utm_source,utm_medium"
|
||||
campaign_var_name = "pk_cpn,pk_campaign,piwik_campaign,utm_campaign,utm_source,utm_medium"
|
||||
|
||||
; Comma separated list of variable names that will be read to track a Campaign Keyword
|
||||
; Example: If a visitor first visits 'index.php?piwik_campaign=Adwords-CPC&piwik_kwd=My killer keyword' ;
|
||||
; then it will be counted as a campaign referrer named 'Adwords-CPC' with the keyword 'My killer keyword'
|
||||
; Includes by default the GA style campaign keyword parameter utm_term
|
||||
campaign_keyword_var_name = "pk_kwd,piwik_kwd,pk_keyword,utm_term"
|
||||
campaign_keyword_var_name = "pk_kwd,pk_keyword,piwik_kwd,utm_term"
|
||||
|
||||
; if set to 1, actions that contain different campaign information from the visitor's ongoing visit will
|
||||
; be treated as the start of a new visit. This will include situations when campaign information was absent before,
|
||||
; but is present now.
|
||||
create_new_visit_when_campaign_changes = 1
|
||||
|
||||
; if set to 1, actions that contain different website referrer information from the visitor's ongoing visit
|
||||
; will be treated as the start of a new visit. This will include situations when website referrer information was
|
||||
; absent before, but is present now.
|
||||
create_new_visit_when_website_referrer_changes = 0
|
||||
|
||||
; ONLY CHANGE THIS VALUE WHEN YOU DO NOT USE PIWIK ARCHIVING, SINCE THIS COULD CAUSE PARTIALLY MISSING ARCHIVE DATA
|
||||
; Whether to force a new visit at midnight for every visitor. Default 1.
|
||||
create_new_visit_after_midnight = 1
|
||||
|
||||
; maximum length of a Page Title or a Page URL recorded in the log_action.name table
|
||||
page_maximum_length = 1024;
|
||||
|
|
@ -494,9 +670,16 @@ page_maximum_length = 1024;
|
|||
; TTL: Time to live for cache files, in seconds. Default to 5 minutes.
|
||||
tracker_cache_file_ttl = 300
|
||||
|
||||
; Whether Bulk tracking requests to the Tracking API requires the token_auth to be set.
|
||||
bulk_requests_require_authentication = 0
|
||||
|
||||
; Whether Bulk tracking requests will be wrapped within a DB Transaction.
|
||||
; This greatly increases performance of Log Analytics and in general any Bulk Tracking API requests.
|
||||
bulk_requests_use_transaction = 1
|
||||
|
||||
; DO NOT USE THIS SETTING ON PUBLICLY AVAILABLE PIWIK SERVER
|
||||
; !!! Security risk: if set to 0, it would allow anyone to push data to Piwik with custom dates in the past/future and even with fake IPs!
|
||||
; When using the Tracking API, to override either the datetime and/or the visitor IP,
|
||||
; When using the Tracking API, to override either the datetime and/or the visitor IP,
|
||||
; token_auth with an "admin" access is required. If you set this setting to 0, the token_auth will not be required anymore.
|
||||
; DO NOT USE THIS SETTING ON PUBLIC PIWIK SERVERS
|
||||
tracking_requests_require_authentication = 1
|
||||
|
|
@ -509,7 +692,7 @@ tracking_requests_require_authentication = 1
|
|||
; for which all reports should be Archived during the cron execution
|
||||
; All segment values MUST be URL encoded.
|
||||
;Segments[]="visitorType==new"
|
||||
;Segments[]="visitorType==returning"
|
||||
;Segments[]="visitorType==returning,visitorType==returningCustomer"
|
||||
|
||||
; If you define Custom Variables for your visitor, for example set the visit type
|
||||
;Segments[]="customVariableName1==VisitType;customVariableValue1==Customer"
|
||||
|
|
@ -554,9 +737,12 @@ username = ; Proxy username: optional; if specified, password is mandatory
|
|||
password = ; Proxy password: optional; if specified, username is mandatory
|
||||
|
||||
[Plugins]
|
||||
; list of plugins (in order they will be loaded) that are activated by default in the Piwik platform
|
||||
Plugins[] = CorePluginsAdmin
|
||||
Plugins[] = CoreAdminHome
|
||||
Plugins[] = CoreHome
|
||||
Plugins[] = WebsiteMeasurable
|
||||
Plugins[] = Diagnostics
|
||||
Plugins[] = CoreVisualizations
|
||||
Plugins[] = Proxy
|
||||
Plugins[] = API
|
||||
|
|
@ -568,8 +754,10 @@ Plugins[] = Actions
|
|||
Plugins[] = Dashboard
|
||||
Plugins[] = MultiSites
|
||||
Plugins[] = Referrers
|
||||
Plugins[] = UserSettings
|
||||
Plugins[] = UserLanguage
|
||||
Plugins[] = DevicesDetection
|
||||
Plugins[] = Goals
|
||||
Plugins[] = Ecommerce
|
||||
Plugins[] = SEO
|
||||
Plugins[] = Events
|
||||
Plugins[] = UserCountry
|
||||
|
|
@ -579,8 +767,8 @@ Plugins[] = VisitTime
|
|||
Plugins[] = VisitorInterest
|
||||
Plugins[] = ExampleAPI
|
||||
Plugins[] = ExampleRssWidget
|
||||
Plugins[] = Provider
|
||||
Plugins[] = Feedback
|
||||
Plugins[] = Monolog
|
||||
|
||||
Plugins[] = Login
|
||||
Plugins[] = UsersManager
|
||||
|
|
@ -599,29 +787,31 @@ Plugins[] = MobileMessaging
|
|||
Plugins[] = Overlay
|
||||
Plugins[] = SegmentEditor
|
||||
Plugins[] = Insights
|
||||
|
||||
Plugins[] = Morpheus
|
||||
Plugins[] = Contents
|
||||
Plugins[] = BulkTracking
|
||||
Plugins[] = Resolution
|
||||
Plugins[] = DevicePlugins
|
||||
Plugins[] = Heartbeat
|
||||
Plugins[] = Intl
|
||||
Plugins[] = PiwikPro
|
||||
|
||||
[PluginsInstalled]
|
||||
PluginsInstalled[] = Diagnostics
|
||||
PluginsInstalled[] = Login
|
||||
PluginsInstalled[] = CoreAdminHome
|
||||
PluginsInstalled[] = UsersManager
|
||||
PluginsInstalled[] = SitesManager
|
||||
PluginsInstalled[] = Installation
|
||||
|
||||
[Plugins_Tracker]
|
||||
Plugins_Tracker[] = Provider
|
||||
Plugins_Tracker[] = Goals
|
||||
Plugins_Tracker[] = PrivacyManager
|
||||
Plugins_Tracker[] = UserCountry
|
||||
Plugins_Tracker[] = Login
|
||||
PluginsInstalled[] = Monolog
|
||||
PluginsInstalled[] = Intl
|
||||
|
||||
[APISettings]
|
||||
; Any key/value pair can be added in this section, they will be available via the REST call
|
||||
; index.php?module=API&method=API.getSettings
|
||||
; index.php?module=API&method=API.getSettings
|
||||
; This can be used to expose values from Piwik, to control for example a Mobile app tracking
|
||||
SDK_batch_size = 10
|
||||
SDK_interval_value = 30
|
||||
|
||||
; NOTE: do not directly edit this file! See notice at the top
|
||||
|
||||
|
||||
|
|
|
|||
85
www/analytics/config/global.php
Normal file
85
www/analytics/config/global.php
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
<?php
|
||||
|
||||
use Interop\Container\ContainerInterface;
|
||||
use Interop\Container\Exception\NotFoundException;
|
||||
use Piwik\Cache\Eager;
|
||||
use Piwik\SettingsServer;
|
||||
|
||||
return array(
|
||||
|
||||
'path.root' => PIWIK_USER_PATH,
|
||||
|
||||
'path.tmp' => function (ContainerInterface $c) {
|
||||
$root = $c->get('path.root');
|
||||
|
||||
// TODO remove that special case and instead have plugins override 'path.tmp' to add the instance id
|
||||
if ($c->has('ini.General.instance_id')) {
|
||||
$instanceId = $c->get('ini.General.instance_id');
|
||||
$instanceId = $instanceId ? '/' . $instanceId : '';
|
||||
} else {
|
||||
$instanceId = '';
|
||||
}
|
||||
|
||||
return $root . '/tmp' . $instanceId;
|
||||
},
|
||||
|
||||
'path.cache' => DI\string('{path.tmp}/cache/tracker/'),
|
||||
|
||||
'Piwik\Cache\Eager' => function (ContainerInterface $c) {
|
||||
$backend = $c->get('Piwik\Cache\Backend');
|
||||
$cacheId = $c->get('cache.eager.cache_id');
|
||||
|
||||
if (SettingsServer::isTrackerApiRequest()) {
|
||||
$eventToPersist = 'Tracker.end';
|
||||
$cacheId .= 'tracker';
|
||||
} else {
|
||||
$eventToPersist = 'Request.dispatch.end';
|
||||
$cacheId .= 'ui';
|
||||
}
|
||||
|
||||
$cache = new Eager($backend, $cacheId);
|
||||
\Piwik\Piwik::addAction($eventToPersist, function () use ($cache) {
|
||||
$cache->persistCacheIfNeeded(43200);
|
||||
});
|
||||
|
||||
return $cache;
|
||||
},
|
||||
'Piwik\Cache\Backend' => function (ContainerInterface $c) {
|
||||
try {
|
||||
$backend = $c->get('ini.Cache.backend');
|
||||
} catch (NotFoundException $ex) {
|
||||
$backend = 'chained'; // happens if global.ini.php is not available
|
||||
}
|
||||
|
||||
return \Piwik\Cache::buildBackend($backend);
|
||||
},
|
||||
'cache.eager.cache_id' => function () {
|
||||
return 'eagercache-' . str_replace(array('.', '-'), '', \Piwik\Version::VERSION) . '-';
|
||||
},
|
||||
|
||||
'Psr\Log\LoggerInterface' => DI\object('Psr\Log\NullLogger'),
|
||||
|
||||
'Piwik\Translation\Loader\LoaderInterface' => DI\object('Piwik\Translation\Loader\LoaderCache')
|
||||
->constructor(DI\get('Piwik\Translation\Loader\JsonFileLoader')),
|
||||
|
||||
'observers.global' => array(),
|
||||
|
||||
'Piwik\EventDispatcher' => DI\object()->constructorParameter('observers', DI\get('observers.global')),
|
||||
|
||||
'Zend_Validate_EmailAddress' => function () {
|
||||
return new \Zend_Validate_EmailAddress(array(
|
||||
'hostname' => new \Zend_Validate_Hostname(array(
|
||||
'tld' => false,
|
||||
))));
|
||||
},
|
||||
|
||||
'Piwik\Tracker\VisitorRecognizer' => DI\object()
|
||||
->constructorParameter('trustCookiesOnly', DI\get('ini.Tracker.trust_visitors_cookies'))
|
||||
->constructorParameter('visitStandardLength', DI\get('ini.Tracker.visit_standard_length'))
|
||||
->constructorParameter('lookbackNSecondsCustom', DI\get('ini.Tracker.window_look_back_for_visitor'))
|
||||
->constructorParameter('trackerAlwaysNewVisitor', DI\get('ini.Debug.tracker_always_new_visitor')),
|
||||
|
||||
'Piwik\Tracker\Settings' => DI\object()
|
||||
->constructorParameter('isSameFingerprintsAcrossWebsites', DI\get('ini.Tracker.enable_fingerprinting_across_websites')),
|
||||
|
||||
);
|
||||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue