Building a user tracking dashboard for Confluence administrators

As Confluence admin, you are responsible for administrating your Confluence instance and keeping track of users and their activities.

But how do we go about doing that? Using Reporting's built-in Suppliers as well as a few choice macros we can build a dashboard so that you can easily track the activity of your users.

Using Reporting, we'll build a dynamic table that will display each user in a particular Confluence user group, their last login details, which other groups they belong to, the number of pages they authored, what pages they authored, and what pages they modified.

The end result will look something like this:


Check it out!

Visit live demo site



Ingredients

Confluence apps

You will need Reporting installed on your Confluence.

Suppliers

You will also need to use the following Suppliers:


Full source code

The following source code is shared using Confluence Storage Format, the XHTML-based format that Confluence uses to store the content of pages, page templates, blueprints, blog posts and comments.

For more information on how to use this source code on your Confluence, read the following article:

⚙️ Expand

Building this use case

Setting up the report columns

We start by setting up the report columns.

  1. First, create a Report Table macro. This will be the main structure of our report, which is a table.

  2. Next, define what to report using a User Reporter macro. Nest this block inside the Report Table macro.

  3. Edit the User Reporter macro, and type "confluence-users" in User Groups parameter. This means Reporting will only fetch users from the "confluence-users" group. You can specify a different group name based on existing groups you have in your Confluence instance.

User Profile

This will add the user profile picture into the dashboard. 

  1. Within the Report Table macro, insert a Report Column macro underneath the User Reporter macro. Name this column "User Profile".

  2. Insert a Report Image macro inside this Report Column macro.

  3. Edit the Report Image macro, name the Key parameter "user:picture".
    Set verticalalign parameter to "middle", Height and Width parameters to "100px".

User Name

This will allow Reporting to fetch the user's profile and provide a link to their personal space.

  1. Insert a Report Column macro, name this column "User name"

  2. Insert a Report Info macro inside this Report Column macro.

  3. Edit the Report Info macro, name the Key parameter "user:name to" and check the Link To parameter.

Last Login

This column returns the user's last login date.

  1. Insert a Report Column macro and name this column "Last login date".

  2. Insert a Report Info macro inside this Report Column macro.

  3. Edit the Report Info macro and name the Key parameter "user:last login date".

Groups

This column returns the groups in which the user belongs.

  1. Insert a Report Column macro, name this column "Group".

  2. Insert a Report Info macro inside this Report Column macro.

  3. Edit the Report Info macro, name the Key parameter "user:groups".

# of Pages Authored

This column returns the number of pages created by the user.

  1. Insert a Report Column macro and name this column "# of Pages Authored".

  2. Insert a Report Info macro inside this Report Column macro.

  3. Edit the Report Info macro, name the Key parameter "user:authored pages count".

Pages Authored

This column returns the pages which was created by the user.

  1. Insert a Report Column macro, name this column "Pages Authored".

  2. Insert a Report Info macro inside this Report Column macro.

  3. Edit the Report Info macro, name the Key parameter "user:authored pages count".

Pages Modified

This column returns the pages which was recently modified by the user.

  1. Finally, insert a Report Info macro inside this Report Column macro.

  2. Edit the Report Info macro, name the Key parameter "user:recently modified content".

Macro structure

Tips