diff options
author | Stefan Giehl <stefan@matomo.org> | 2022-02-14 17:26:47 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-14 17:26:47 +0300 |
commit | 40fbb28ae88cf5455ebd03e295693d7395a47667 (patch) | |
tree | 68d3cbe42455286145b8efc694ae6406467bb9af /plugins/Live | |
parent | e56b1bec2c1889028a89ce5adfeb5a5808e9b0c6 (diff) |
Segmented visits log might show incorrect title (#18792)
Diffstat (limited to 'plugins/Live')
-rw-r--r-- | plugins/Live/javascripts/SegmentedVisitorLog.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/plugins/Live/javascripts/SegmentedVisitorLog.js b/plugins/Live/javascripts/SegmentedVisitorLog.js index 65d0121edc..cec8e020a2 100644 --- a/plugins/Live/javascripts/SegmentedVisitorLog.js +++ b/plugins/Live/javascripts/SegmentedVisitorLog.js @@ -110,7 +110,15 @@ var SegmentedVisitorLog = function() { // remove title returned from the server var title = box.find('h2[piwik-enriched-headline]'); - var defaultTitle = title.text(); + + // if the enriched headline has been already parsed, there might be additional content, + // so we prefer using the original title, which is placed in div with class "title" + // @see plugins/CoreHome/vue/src/EnrichedHeadline/EnrichedHeadline.vue + if (title.find('.title')) { + var defaultTitle = title.find('.title').text(); + } else { + var defaultTitle = title.text(); + } if (title.length) { title.remove(); |