diff options
author | Stefan Giehl <stefan@matomo.org> | 2019-09-05 01:58:05 +0300 |
---|---|---|
committer | Thomas Steur <tsteur@users.noreply.github.com> | 2019-09-05 01:58:05 +0300 |
commit | 338c74a59c522dfed7e7c0909a736b2022330a66 (patch) | |
tree | e350b66b00ec74649698ce3461df503322406c5c /plugins/DevicesDetection | |
parent | 9b3a14f242d7751097072aae3310d7d564361bb9 (diff) |
Show detected bots in device detection (#14853)
Diffstat (limited to 'plugins/DevicesDetection')
-rw-r--r-- | plugins/DevicesDetection/Controller.php | 1 | ||||
-rw-r--r-- | plugins/DevicesDetection/lang/en.json | 1 | ||||
-rw-r--r-- | plugins/DevicesDetection/templates/detection.twig | 7 |
3 files changed, 9 insertions, 0 deletions
diff --git a/plugins/DevicesDetection/Controller.php b/plugins/DevicesDetection/Controller.php index a26964e034..2a355bc555 100644 --- a/plugins/DevicesDetection/Controller.php +++ b/plugins/DevicesDetection/Controller.php @@ -32,6 +32,7 @@ class Controller extends \Piwik\Plugin\Controller $uaParser->parse(); $view->userAgent = $userAgent; + $view->bot_info = $uaParser->getBot(); $view->browser_name = $uaParser->getClient('name'); $view->browser_short_name = $uaParser->getClient('short_name'); $view->browser_version = $uaParser->getClient('version'); diff --git a/plugins/DevicesDetection/lang/en.json b/plugins/DevicesDetection/lang/en.json index 33789201e6..1f7a1a1694 100644 --- a/plugins/DevicesDetection/lang/en.json +++ b/plugins/DevicesDetection/lang/en.json @@ -1,5 +1,6 @@ { "DevicesDetection": { + "BotDetected": "This User-Agent is detected as %1$s. Visits with this user agent will not be tracked in Matomo by default.", "BrowserEngine": "Browser engine", "BrowserEngineDocumentation": "This report shows your visitors' browsers broken down into browser engines. %s The most important information for web developers is what kind of rendering engine their visitors are using. The labels contain the names of the engines followed by the most common browser using that engine in brackets.", "BrowserEngines": "Browser engines", diff --git a/plugins/DevicesDetection/templates/detection.twig b/plugins/DevicesDetection/templates/detection.twig index 7c10c0abe1..399e6434c5 100644 --- a/plugins/DevicesDetection/templates/detection.twig +++ b/plugins/DevicesDetection/templates/detection.twig @@ -50,6 +50,12 @@ <input type="submit" value="{{ 'General_Refresh'|translate }}" class="btn" /> </form> + {% if bot_info %} + + <h3>{{ 'DevicesDetection_BotDetected'|translate(bot_info.name) }}</h3> + + {% else %} + <h3>{{ 'DevicesDetection_ColumnOperatingSystem'|translate|e('html_attr') }}</h3> <table class="detection" piwik-content-table> <tbody> @@ -103,6 +109,7 @@ </tr></tbody> </table> + {% endif %} </div> <div class="ui-confirm" id="deviceDetectionItemList"> |