قرینه از
https://github.com/matomo-org/matomo.git
synced 2025-08-22 06:57:53 +00:00

* [Coding Style] Enable rule PSR12.Files.FileHeader * Apply CS * Replace Piwik with Matomo in file headers * Unify file headers (position, no. of lines, https links) * Rebuild dist files * Apply CS * Fix system test that relies on line numbers in a file that had the file header updated --------- Co-authored-by: Stefan Giehl <stefan@matomo.org>
70 خطوط
2.3 KiB
PHP
70 خطوط
2.3 KiB
PHP
<?php
|
|
|
|
/**
|
|
* Matomo - free/libre analytics platform
|
|
*
|
|
* @link https://matomo.org
|
|
* @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
|
*/
|
|
|
|
namespace Piwik\Plugins\Actions\Reports;
|
|
|
|
use Piwik\Piwik;
|
|
use Piwik\Plugin\ViewDataTable;
|
|
use Piwik\Plugins\Actions\Columns\Keyword;
|
|
use Piwik\Plugins\Actions\Columns\Metrics\AveragePageGenerationTime;
|
|
use Piwik\Plugins\Actions\Columns\Metrics\AverageTimeOnPage;
|
|
use Piwik\Plugins\Actions\Columns\Metrics\BounceRate;
|
|
use Piwik\Plugins\Actions\Columns\Metrics\ExitRate;
|
|
|
|
class GetSiteSearchKeywords extends SiteSearchBase
|
|
{
|
|
protected function init()
|
|
{
|
|
parent::init();
|
|
$this->dimension = new Keyword();
|
|
$this->name = Piwik::translate('Actions_WidgetSearchKeywords');
|
|
$this->documentation = Piwik::translate('Actions_SiteSearchKeywordsDocumentation') . '<br/><br/>' . Piwik::translate('Actions_SiteSearchIntro');
|
|
$this->metrics = array('nb_visits', 'nb_pages_per_search');
|
|
$this->processedMetrics = array(
|
|
new AverageTimeOnPage(),
|
|
new BounceRate(),
|
|
new ExitRate(),
|
|
new AveragePageGenerationTime()
|
|
);
|
|
$this->order = 15;
|
|
$this->subcategoryId = 'Actions_SubmenuSitesearch';
|
|
}
|
|
|
|
public function getMetrics()
|
|
{
|
|
return array(
|
|
'nb_visits' => Piwik::translate('Actions_ColumnSearches'),
|
|
'nb_pages_per_search' => Piwik::translate('Actions_ColumnPagesPerSearch'),
|
|
);
|
|
}
|
|
|
|
public function getProcessedMetrics()
|
|
{
|
|
return array(
|
|
'exit_rate' => Piwik::translate('Actions_ColumnSearchExits'),
|
|
);
|
|
}
|
|
|
|
protected function getMetricsDocumentation()
|
|
{
|
|
return array(
|
|
'nb_visits' => Piwik::translate('Actions_ColumnSearchesDocumentation'),
|
|
'nb_pages_per_search' => Piwik::translate('Actions_ColumnPagesPerSearchDocumentation'),
|
|
'exit_rate' => Piwik::translate('Actions_ColumnSearchExitsDocumentation'),
|
|
);
|
|
}
|
|
|
|
public function configureView(ViewDataTable $view)
|
|
{
|
|
$view->config->columns_to_display = array('label', 'nb_visits', 'nb_pages_per_search', 'exit_rate');
|
|
|
|
$this->addSiteSearchDisplayProperties($view);
|
|
}
|
|
}
|