mirror of
https://github.com/DanielSiepmann/tracking.git
synced 2024-11-25 06:36:12 +01:00
Daniel Siepmann
33685d1735
Allow Integrator to define rules to track views of records. This allows to add tracking to extensions like tx_news. Integrators are able to define matching rules on current request. If a request matches, the record is stored as individual view beside existing pageview. Relates: #14
85 lines
3.1 KiB
PHP
85 lines
3.1 KiB
PHP
<?php
|
|
|
|
return [
|
|
'ctrl' => [
|
|
'label' => 'record',
|
|
'label_alt' => 'crdate',
|
|
'label_alt_force' => true,
|
|
'default_sortby' => 'crdate DESC',
|
|
'tstamp' => 'tstamp',
|
|
'crdate' => 'crdate',
|
|
'cruser_id' => 'cruser_id',
|
|
'languageField' => 'sys_language_uid',
|
|
'title' => 'LLL:EXT:tracking/Resources/Private/Language/locallang_tca.xlf:table.recordview',
|
|
'searchFields' => 'uid, url',
|
|
'iconfile' => 'EXT:core/Resources/Public/Icons/T3Icons/apps/apps-pagetree-page-default.svg',
|
|
],
|
|
'types' => [
|
|
'0' => [
|
|
'showitem' => 'sys_language_uid, pid, record, url, user_agent, operating_system, crdate',
|
|
],
|
|
],
|
|
'columns' => [
|
|
'pid' => [
|
|
'label' => 'LLL:EXT:tracking/Resources/Private/Language/locallang_tca.xlf:table.recordview.pid',
|
|
'config' => [
|
|
// TYPO3 v10 does no longer allow to resolve PID relations, e.g. via select or group
|
|
// This will break internal PID handling.
|
|
'type' => 'input',
|
|
'readOnly' => true,
|
|
],
|
|
],
|
|
'crdate' => [
|
|
'label' => 'LLL:EXT:tracking/Resources/Private/Language/locallang_tca.xlf:table.recordview.crdate',
|
|
'config' => [
|
|
'type' => 'input',
|
|
'eval' => 'datetime',
|
|
],
|
|
],
|
|
'sys_language_uid' => [
|
|
'label' => 'LLL:EXT:tracking/Resources/Private/Language/locallang_tca.xlf:table.recordview.sys_language',
|
|
'config' => [
|
|
'type' => 'select',
|
|
'renderType' => 'selectSingle',
|
|
'foreign_table' => 'sys_language',
|
|
'items' => [
|
|
['LLL:EXT:tracking/Resources/Private/Language/locallang_tca.xlf:table.recordview.sys_language.0', 0],
|
|
],
|
|
'readOnly' => true,
|
|
]
|
|
],
|
|
'user_agent' => [
|
|
'label' => 'LLL:EXT:tracking/Resources/Private/Language/locallang_tca.xlf:table.recordview.user_agent',
|
|
'config' => [
|
|
'type' => 'input',
|
|
'readOnly' => true,
|
|
],
|
|
],
|
|
'operating_system' => [
|
|
'label' => 'LLL:EXT:tracking/Resources/Private/Language/locallang_tca.xlf:table.recordview.operating_system',
|
|
'config' => [
|
|
'type' => 'input',
|
|
'readOnly' => true,
|
|
],
|
|
],
|
|
'url' => [
|
|
'label' => 'LLL:EXT:tracking/Resources/Private/Language/locallang_tca.xlf:table.recordview.url',
|
|
'config' => [
|
|
'readOnly' => true,
|
|
'type' => 'input',
|
|
'size' => 50,
|
|
],
|
|
],
|
|
'record' => [
|
|
'label' => 'LLL:EXT:tracking/Resources/Private/Language/locallang_tca.xlf:table.recordview.record',
|
|
'config' => [
|
|
'type' => 'group',
|
|
'allowed' => 'tt_content,sys_category,pages',
|
|
'internal_type' => 'db',
|
|
'maxitems' => 1,
|
|
'minitems' => 1,
|
|
'size' => 1,
|
|
],
|
|
],
|
|
],
|
|
];
|