Skip to main content
Skip table of contents

Viewtracker Reports with Reporting for Confluence

Notes:


Enable Custom Space Reports

To enable the Custom Space Reports, you need to activate them in the administration of Viewtracker (Activate Custom Space Usage Reports).


Introduction Reporting Plugin

→ Documentation

Overview

Report Frames

Macro

Description

Example

report-block

Will display the report results in a series of blocks.


CODE
{report-block}
  {xxx-reporter}
 
  {report-body}
  This content is repeated for each item.
  {report-body}
 
  {report-empty}This is displayed if no results are returned by the reporter.{report-empty}
{report-block}


report-table

Displays each item of a reporter as a table row.


CODE
{report-table}
  {xxx-reporter}
 
  {report-column:title=Key 1}{report-info:item:key 1}{report-column}
  {report-column:title=Key 2}{report-info:item:key 2}{report-column}
 
  {report-empty}This is displayed if no results are returned by the reporter.{report-empty}
{report-table}


report-list

Displays each item of reporter as a list item.


CODE
{report-list:depth=[1,2...all]|outline=true/false|style=[disc, decimal, etc]}
  {xxx-reporter}
 
  {report-body}
  This content is repeated for each item.
  {report-body}
 
  {report-empty}This is displayed if no results are returned by the reporter.{report-empty}
{report-list}



Reporters

list not exhaustive

Macro

Description

Example

content-reporter

Reports on Confluence content (pages, news, comments, attachments, etc).

The content can be filtered by space, type, scope or labels, as well as any custom filters specified in the body of the macro.

List the 5 most recent blogposts from all spaces:

CODE
{report-block:maxResults=5}
  {content-reporter:spaces=@all|types=news}
    {date-sort:content:modification date|order=descending}
  {content-reporter}
 
  {report-body}
    {report-info:content:title|link=true}
    {report-info:content:excerpt|render=wiki}
    Posted on {report-info:modification date|format=EEEE, MMMM d, yyyy} by {report-info:content:modifier|link=true}
  {report-body}
 
  {report-empty}No news items are available.{report-empty}
{report-block}

local-reporter

Allows reporting on the current page or reported item.

This reporter will display the contents of any sub-item of either the current item or that specified by the source parameter, identified using the prefix:key value.

Listing attachments from current page:

CODE
{report-table}
  {local-reporter:content:attachments}
    {text-sort:attachment:title}
  {local-reporter}
 
  {report-column:title=File Name}{report-info:attachment:title|link=true}{report-column}
  {report-column:title=Comment}{report-info:attachment:comment}{report-column}
  {report-column:title=Size}{report-info:attachment:nice file size}{report-column}
 
  {report-empty}_No files have been attached to this page._{report-empty}
{report-table}

expanding-reporter

This is a reporter which can expand on items returned from another, contained reporter.

This reporter will expand on a list of sub-items in the original report.

Output the children of the current page with comments, as well as the first 50 characters of each comment, in reverse date order:

CODE
{report-table}
  {expanding-reporter:content:all comments|as=comment}
    {local-reporter:content:children}
    {text-sort:comment:page > content:title}
    {date-sort:content:creation date|order=descending}
  {expanding-reporter}
 
  {report-column:title=Page}{report-info:expanded:item > content:title|link=true}{report-column}
  {report-column:title=Comment Summary}{report-info:expanded:comment > content:body > text:first 50|render=wiki}{report-column}
{report-table}

grouping-reporter

Allows results of another reporter to be grouped by any keychain value in each item.

This reporter provides group-by and statistical analysis capabilities for reports. It processes the results of the contained reporter and performs grouping and (optionally) statistical analysis with the companion grouping-stats macro.

Number of blogposts grouped by creator:

CODE
{report-table}
  {grouping-reporter:content:creator|as=Creator}
    {content-reporter:space=@all|type=news}
      {text-sort:content:creator > user:name}
    {content-reporter}
  {grouping-reporter}

  {report-column:title=User Name}{report-info:grouped:Creator}{report-column}
  {report-column:title=# of news items created}{report-info:grouped:@items > collection:size|format=#,##0}{report-column}
 
  {report-empty}_No blogs posted by anyone_{report-empty}
{report-table}

Sorters

list not exhaustive

Macro

Description

Example

date-sort

This will sort the results by the specified date key value.

Views absteigend sortieren:

CODE
{date-sort:viewdate|order=descending}


text-sort

This will sort the results by the specified text key value.

Views nach Benutzername aufsteigend sortieren:

CODE
{text-sort:username}



Filters

list not exhaustive

Macro

Description

Views

user-filter

Filters out results based on a user property. Users can be filtered by a combination of specific user names, group membership and space permissions.

Alle getrackten Views ausser von User "admin":

CODE
{user-filter:username|users=-admin}


number-filter

This filter will ensure that the specified  prefix:key  value is a number, and that it matches the required criteria.

Nur Seiten mit getrackten Views auflisten:

CODE
{number-filter:viewtracker:totalviews|required=true}


date-filter

This filter will ensure that the specified  prefix:key  value is a date, and that it matches the required criteria.

Alle Views seit 1.Okt 2010:

CODE
{date-filter:viewdate|minValue=1-Oct-2010|format=dd-MMM-yyyy}



Suppliers

list not exhaustive


Introduction Viewtracker Supplier

→ Documentation

Suppliers provide information that can be used by the Reporting app and Viewtracker.


Report Example

“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

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

Report Example

“Show the last 5 pageviews of all children”

Code

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

Report Example

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

Code

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.