We’ve noticed some weird unexpected behaviour with piwik when the page title has a /
in the page title.
The expected behaviour is that the page would show on a single line in the Page titles
page here , but what actually happens is that piwik is creating a collapsible section from the first part of the title and the contents is the second part of the title; similar to what you see here
Lukas
(Lukas Winkler)
October 26, 2017, 12:18pm
2
Hi,
There is already a github issue about this topic:
opened 03:31AM - 20 Feb 12 UTC
closed 07:10PM - 29 Nov 18 UTC
Bug
Currently, if the html page <title> is "Test / Hello", Piwik will report in A… ctions > Page Titles the directory "Test", clickable to open the sub page "Hello".
This is confusing for users, because often, slash characters in the page title, does not imply a notion of hierarchy.
However, [as we document it on the JS tracking doc](http://piwik.org/docs/javascript-tracking/#toc-customize-the-page-name-displayed-in-piwik), it is possible to set the document title to a given value and use this technique to classify page titles in a given hierarchy, eg. "Article / Sport / XYZ".
Because by default Page titles do not contain hierarchy, I propose that:
- when setDocumentTitle is called, we do split the page title based on the slash character
- In the default Javascript tracking code, when setDocumentTitle is not used, we do NOT split the page titles and never create the sub category.
- Implementation wise, we could eg. have a different named argument when setdocumentTitle is called ("title") VS when the default <title> value is used (parameter currently named "action_name").
This was [reported in this post](http://forum.piwik.org/read.php?3,85953), #1532, #3364, and I often got frustrated myself with this problem.
Many thanks Lukas.
Serves me right I should have checked out the open issues on Github.
Lukas
(Lukas Winkler)
October 26, 2017, 1:43pm
4
Hi,
No problem. It is sometimes hard to find a github issue if you don’t know what keywords to use.