From a642a0846d7405a0605fcfa7cba2095e7e1a9604 Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Mon, 28 Sep 2020 12:48:15 +0200 Subject: [PATCH] Add default and docs to not track preview Preview is also active if a preview link is shared via EXT:workspace. Those views should probably not be tracked, just like active backend sessions. --- Configuration/Services.yaml | 1 + Documentation/Pageview.rst | 1 + Documentation/Recordview.rst | 1 + 3 files changed, 3 insertions(+) diff --git a/Configuration/Services.yaml b/Configuration/Services.yaml index 2f57338..627726d 100644 --- a/Configuration/Services.yaml +++ b/Configuration/Services.yaml @@ -58,6 +58,7 @@ services: arguments: $rule: > not (context.getAspect("backend.user").isLoggedIn()) + and not (context.getAspect("frontend.preview").isPreview()) and not (request.getHeader("User-Agent")[0] matches "/^TYPO3|TYPO3 linkvalidator/") and not (request.getHeader("User-Agent")[0] matches "/Wget|curl|Go-http-client/") 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|ia_archiver|PaperLiBot|TrendsmapResolver|AhrefsBot|Nuzzel/") diff --git a/Documentation/Pageview.rst b/Documentation/Pageview.rst index 7f39692..443d007 100644 --- a/Documentation/Pageview.rst +++ b/Documentation/Pageview.rst @@ -42,6 +42,7 @@ Let us examine an concrete example:: arguments: $rule: > not (context.getAspect("backend.user").isLoggedIn()) + and not (context.getAspect("frontend.preview").isPreview()) and not (request.getHeader("User-Agent")[0] matches "/^TYPO3|TYPO3 linkvalidator/") and not (request.getHeader("User-Agent")[0] matches "/^Codeception Testing/") and not (request.getHeader("User-Agent")[0] matches "/Wget|curl|Go-http-client/") diff --git a/Documentation/Recordview.rst b/Documentation/Recordview.rst index 950b3aa..6ed76e4 100644 --- a/Documentation/Recordview.rst +++ b/Documentation/Recordview.rst @@ -55,6 +55,7 @@ Let us examine an concrete example:: matches: > request.getQueryParams()["tx_news_pi1"] && request.getQueryParams()["tx_news_pi1"]["news"] > 0 and not (context.getAspect("backend.user").isLoggedIn()) + and not (context.getAspect("frontend.preview").isPreview()) and not (request.getHeader("User-Agent")[0] matches "/^TYPO3|TYPO3 linkvalidator/") and not (request.getHeader("User-Agent")[0] matches "/Wget|curl|Go-http-client/") and not (request.getHeader("User-Agent")[0] matches "/bot|spider|Slurp|Sogou|NextCloud-News|Feedly|XING FeedReader|SEOkicks|Seekport Crawler|ia_archiver|TrendsmapResolver|Nuzzel/")