Download plugins/Actions/Columns/EntryPageTitle.php from Leon4gr45/matomo: direct link, hf CLI and curl.
- Browser
- Download file 1.57 kB
-
https://huggingface.co/spaces/Leon4gr45/matomo/resolve/main/plugins/Actions/Columns/EntryPageTitle.php
- Command line
-
hf download hf://spaces/Leon4gr45/matomo/plugins/Actions/Columns/EntryPageTitle.php
-
curl -L -o EntryPageTitle.php https://huggingface.co/spaces/Leon4gr45/matomo/resolve/main/plugins/Actions/Columns/EntryPageTitle.php
1.57 kB
| /** | |
| * 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\Columns; | |
| use Piwik\Columns\Discriminator; | |
| use Piwik\Columns\Join\ActionNameJoin; | |
| use Piwik\Plugin\Dimension\VisitDimension; | |
| use Piwik\Tracker\Action; | |
| use Piwik\Tracker\Request; | |
| use Piwik\Tracker\TableLogAction; | |
| use Piwik\Tracker\Visitor; | |
| class EntryPageTitle extends VisitDimension | |
| { | |
| protected $columnName = 'visit_entry_idaction_name'; | |
| protected $columnType = 'INTEGER(10) UNSIGNED NULL'; | |
| protected $type = self::TYPE_TEXT; | |
| protected $segmentName = 'entryPageTitle'; | |
| protected $suggestedValuesApi = 'Actions.getEntryPageTitles'; | |
| protected $nameSingular = 'Actions_ColumnEntryPageTitle'; | |
| protected $namePlural = 'Actions_WidgetEntryPageTitles'; | |
| protected $category = 'General_Actions'; | |
| protected $sqlFilter = [TableLogAction::class, 'getOptimizedIdActionSqlMatch']; | |
| public function getDbColumnJoin() | |
| { | |
| return new ActionNameJoin(); | |
| } | |
| public function getDbDiscriminator() | |
| { | |
| return new Discriminator('log_action', 'type', Action::TYPE_PAGE_TITLE); | |
| } | |
| /** | |
| * @param Action|null $action | |
| * @return mixed | |
| */ | |
| public function onNewVisit(Request $request, Visitor $visitor, $action) | |
| { | |
| $idActionName = false; | |
| if (!empty($action)) { | |
| $idActionName = $action->getIdActionNameForEntryAndExitIds(); | |
| } | |
| return (int) $idActionName; | |
| } | |
| } | |