Skip to main content
Skip table of contents

Viewtracker Supplier Examples


Example

Create a report of all pages in a space and display the name of the page, total views, total users and a list of all users:

CODE
{report-table}
{content-reporter:types=page}{content-reporter}
{report-column:title=Page}{report-info:title|link=true}{report-column}
{report-column:title=Total Views}{report-info:viewtracker:totalviews}{report-column}
{report-column:title=Total Users}{report-info:viewtracker:totalusers}{report-column}
{report-column:title=Users List}{report-info:viewtracker:allusers|render=wiki}{report-column}
{report-table}

Result

In this example the page "Knowledge" does not contain the viewtracker plugin.



Advanced Examples

Show the last 5 pageviews of all children:

Reporting Plugin 4.x or higher
CODE
 {report-table:maxResults=5}
  {expanding-reporter:viewtracker:all|as=view}
    {local-reporter:page:children}
    {date-sort:viewdate|order=descending}
  {expanding-reporter}

  {report-column:title=Date}{report-info:expanded:view > viewdate}{report-column}
  {report-column:title=Page}{report-info:expanded:item|link=true}{report-column}
  {report-column:title=User}{report-info:expanded:view > username|link=true}{report-column}
  {report-empty}_No views tracked._{report-empty}
{report-table}


Result


Show all pageviews of all spaces (except pageviews by user "admin") since 1 Oct 2010 grouped by user:

Reporting Plugin 4.x or higher
CODE
{report-table}
{grouping-reporter:expanded:view > username|as=User}
  {grouping-stats:expanded:view > viewdate|as=Viewdate}
  {expanding-reporter:viewtracker:all|as=view}
    {content-reporter:space=@all}
    {user-filter:username|users=-admin}
    {date-filter:viewdate|minValue=1-Oct-2010|format=dd-MMM-yyyy}
    {text-sort:username}
  {expanding-reporter}
{grouping-reporter}

{report-column:title=User}{report-info:grouped:User|link=true}{report-column}
{report-column:title=Last View}{report-info:grouped:Viewdate > stats:max value}{report-column}
{report-column:title=Pages Viewed}{report-on:@items}{report-info:item|link=true}{report-on}{report-column}

{report-empty}_No views tracked._{report-empty}
{report-table}


Result



JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.