Display 10 most popular pages
I want to display 10 most popular pages of the space. (Popular of the month or ever)
---------------------
When I use tracking-table macro, I have 10 pages with 0 visitors:
{tracking-table:space=R1D|scope=R1D:Home > descendents | maxResults=10 | types=page| sort=View Count}
{tracking-column:value=Title}
{tracking-column:value=View Count}
{tracking-table}
Can I sort in revert order in tracking-table macro?
------------------
When I use popular macro, the counts are reset every time the page is saved.
{popular:timespan=1m|events=view|max=20|style=list|display=icon,title,count}
Very often i have:
No popular content.
---------------------
Thanks
---------------------
When I use tracking-table macro, I have 10 pages with 0 visitors:
{tracking-table:space=R1D|scope=R1D:Home > descendents | maxResults=10 | types=page| sort=View Count}
{tracking-column:value=Title}
{tracking-column:value=View Count}
{tracking-table}
Can I sort in revert order in tracking-table macro?
------------------
When I use popular macro, the counts are reset every time the page is saved.
{popular:timespan=1m|events=view|max=20|style=list|display=icon,title,count}
Very often i have:
No popular content.
---------------------
Thanks
1
person has this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
The best answer from the company
-
It's been a while since I used the {tracking-table}, so it's possible there are a few bugs. Generally we recommend using the Reporting Plugin to output this data - it's much more flexible. The report would look something like this:
{report-table:maxResults=10}
{local-reporter:page:descendents|source=R1D:Home}
{number-sort=track:view count}
{local-reporter}
{report-column:title=Title}{report-info:title|link=true}{report-column}
{report-column:title=View Count}{report-info:track:view count}{report-column}
{report-empty}_No content coudl be found._{report-empty}
{report-table}
Check out {report-table} and Tracking Data Supplier for more details.
The company says
this answers the question
-
Inappropriate?It's been a while since I used the {tracking-table}, so it's possible there are a few bugs. Generally we recommend using the Reporting Plugin to output this data - it's much more flexible. The report would look something like this:
{report-table:maxResults=10}
{local-reporter:page:descendents|source=R1D:Home}
{number-sort=track:view count}
{local-reporter}
{report-column:title=Title}{report-info:title|link=true}{report-column}
{report-column:title=View Count}{report-info:track:view count}{report-column}
{report-empty}_No content coudl be found._{report-empty}
{report-table}
Check out {report-table} and Tracking Data Supplier for more details.
The company says
this answers the question
-
Thanks! -
Inappropriate?When I use the code above (swapping out only the space id and the home page name) I get an error:
Unknown macro: {number-sort=track}
{report-table:maxResults=10}
{local-reporter:page:descendents|source=chnlarchitecture:Architecture}
{number-sort=track:view count}
{local-reporter}
{report-column:title=Title}{report-info:title|link=true}{report-column}
{report-column:title=View Count}{report-info:track:view count}{report-column}
{report-empty}_No content could be found._{report-empty}
{report-table}
If I remove this line
{number-sort=track:view count}
The page renders with no error. I found {number-sort} in the reporting plugin and that is installed and enabled, and the Tracking Plugin is also installed and enabled. It appears that somehow it doesn't know what "track" means. Is there some other plugin I'm missing, or is my syntax wrong (or incomplete)?
A few other questions on getting the display the way I prefer:
- Is there a way to concatenate the hit-count with the page name as a number in parentheses? ie "page name here (4)"
- Is there a way to control formatting, so for example I can make it a bulleted list rather than a table, change the font and color etc?
- is there a way to get this to count hits on blog posts in a space rather than pages? Originally I thought it didn't work because my space has no other pages, just the home page and blog posts. It kept showing the "no content" message until I got the idea to add another page and test that.
I’m hopeful
-
Inappropriate?Sorry Eric, I had a typo in my example. It should be {number-sort:track:view count} (":" not "=").
To answer your other questions:
- Is there a way to concatenate the hit-count with the page name as a number in parentheses? ie "page name here (4)"
Yes. Just do something like this in the one report-column/report-body:
{report-column:title=Page}{report-info:page:title|link=true} ({report-info:track:view count}){report-column}
- Is there a way to control formatting, so for example I can make it a bulleted list rather than a table, change the font and color etc?
You can use {report-list} to generate lists, or {report-block} to generate a free-form output.
To change fonts/colours etc, you will need either the {color} macro or other CSS-related stuff like {div} and {style}, which come from the Confluence Formatting Plugin by Adaptavist. You can specify a CSS class on each of the report-table/list/block macros, and then specify that style using a {style} macro.
- is there a way to get this to count hits on blog posts in a space rather than pages? Originally I thought it didn't work because my space has no other pages, just the home page and blog posts. It kept showing the "no content" message until I got the idea to add another page and test that.
I can't recall if Tracking actually counts blog views. I think it does, but you'll have to test it. But to report on the list of blog views, you will need to use the {content-reporter} instead of {local-reporter}, something like this:
{content-reporter:type=news|space=@self}
{number-sort:track:view count}
{content-reporter}
Hope that helps.
-
Inappropriate?Thanks, that was very helpful. At this point I still need to work on formatting, but it's working properly now. Except for the hit-count on blogposts, they are all still showing up as zero (I have posted that question on the Tracking Plugin thread).
I’m appreciative
Loading Profile...



EMPLOYEE
