mirror of
https://github.com/DanielSiepmann/tracking.git
synced 2024-11-10 17:46:10 +01:00
60 lines
1.9 KiB
YAML
60 lines
1.9 KiB
YAML
services:
|
|
_defaults:
|
|
autowire: true
|
|
autoconfigure: true
|
|
public: false
|
|
|
|
DanielSiepmann\Tracking\:
|
|
resource: '../Classes/*'
|
|
|
|
# Virtual services
|
|
|
|
DanielSiepmann\Tracking\DI\DatabaseConnection\Pageview:
|
|
factory:
|
|
- '@TYPO3\CMS\Core\Database\ConnectionPool'
|
|
- 'getConnectionForTable'
|
|
arguments:
|
|
- 'tx_tracking_pageview'
|
|
DanielSiepmann\Tracking\DI\QueryBuilder\PageView:
|
|
factory:
|
|
- '@TYPO3\CMS\Core\Database\ConnectionPool'
|
|
- 'getQueryBuilderForTable'
|
|
arguments:
|
|
- 'tx_tracking_pageview'
|
|
|
|
# Existing classes
|
|
|
|
DanielSiepmann\Tracking\Domain\Repository\Pageview:
|
|
public: true
|
|
arguments:
|
|
- '@DanielSiepmann\Tracking\DI\DatabaseConnection\Pageview'
|
|
|
|
DanielSiepmann\Tracking\Middleware\Pageview:
|
|
public: true
|
|
arguments:
|
|
$rule: >
|
|
not (context.getAspect("backend.user").isLoggedIn())
|
|
and not (request.getHeader("User-Agent")[0] matches "/^Wget|TYPO3|TYPO3 linkvalidator/")
|
|
and not (request.getHeader("User-Agent")[0] matches "/Googlebot|Bingbot|bingbot|Slurp|DuckDuckBot|Baiduspider|YandexBot|Sogou|Exabot|NextCloud-News|Feedly|XING FeedReader|CCBot|SemrushBot|SEOkicks|Twitterbot|Seekport Crawler|SemanticScholarBot|curl/")
|
|
|
|
# Dashboard Widgets
|
|
|
|
DanielSiepmann\Tracking\Dashboard\Widgets\PageViewsBar:
|
|
class: 'DanielSiepmann\Tracking\Dashboard\Widgets\PageViewsBar'
|
|
arguments:
|
|
- 'pageViewsBar'
|
|
- '@DanielSiepmann\Tracking\DI\QueryBuilder\PageView'
|
|
tags:
|
|
- name: 'dashboard.widget'
|
|
identifier: 'pageViewsBar'
|
|
widgetGroups: 'tracking'
|
|
|
|
DanielSiepmann\Tracking\Dashboard\Widgets\PageViewsPerPageDoughnut:
|
|
class: 'DanielSiepmann\Tracking\Dashboard\Widgets\PageViewsPerPageDoughnut'
|
|
arguments:
|
|
- 'pageViewsPerPageDoughnut'
|
|
- '@DanielSiepmann\Tracking\DI\QueryBuilder\PageView'
|
|
tags:
|
|
- name: 'dashboard.widget'
|
|
identifier: 'pageViewsPerPageDoughnut'
|
|
widgetGroups: 'tracking'
|