Skip to main content
Skip table of contents

Viewtracker Macro

This macro was used to track and display views on Confluence Pages. We recommend using the new Analytics report macros instead.

  • Tracking is now implemented by default and this macro might no longer be needed.

  • Please note it generates a view when the page is refreshed. It may cause duplicate views on newer instances.

Track and gain valuable insight into who is visiting your Confluence pages. The Viewtracker macro provides more information than just counting page hits. It provides important user behavior details: Who has viewed the current Confluence page, and how often has the page been visited? The info is displayed in a collapsed version that can be opened by clicking on the arrow sign.

Note: Use the Viewtracker macro to track page views per user if Auto Tracking is disabled. This macro generates a "view" every time the Confluence page is loaded.

Use the built-in “Content Report” to gain insights on the current page. Or use the Viewtracker Report macro to gain insights on another page.


Screenshots

Viewtracker Macro collapsed (default):

Viewtracker Macro expanded:



Parameters of the Macro

Name

Description

Type

This is a required field

Default

Values

Hide
hide

Allows you to hide the tracked results.

boolean

(error)

false


Expandable
expandable

Enables the expansion of the list. If the Extended Privacy Mode is activated or the data is hidden from the user, the Viewtracker macro is not expandable.

boolean

(error)

true


Render User Names
renderusernames

Enables the creation of links to user profile pages in the list. Disable for better performance.

boolean

(error)

true


Sort
sort

Sorts the list by date or name.

enum

(error)

date

date, name

Time frame
timeframe

Specifies the time frame for displaying the tracked data. The time frame can either be a specific date or the number of days (for example: 12 would display all elements tracked in the last twelve days). By default, all tracked elements are displayed.

string

(error)



Date format
dateformat

Define the format of the date specified in timeframe if it is in a different format than the default Confluence format (defined in the formatting/international settings). Specify a format that matches the simple date format.

string

(error)



Examples

Simply place the Viewtracker macro on a Confluence page or blog post:

CODE
{viewtracker}

Only display views tracked in the last 10 days:

CODE
{viewtracker:timeframe=10}

Only display views tracked after 01/01/2000 (if MM/dd/yyyy is your default format in Confluence):

CODE
{viewtracker:timeframe=01/01/2000}

or to specify it in a different format:

CODE
{viewtracker:timeframe=01.01.2000|dateformat=dd.MM.yyyy}

JavaScript errors detected

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

If this problem persists, please contact our support.