Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Reporting + Chart combinations for a wiki space dashboard

When I started managing a wiki space, I wanted to find out which sections, or branches of the page tree, were growing the fastest and might need more oversight. But I didn't have any analytics. What next?

Fortunately, I was able to use ServiceRocket's Reporting add-on to generate a workable report. When combined with Confluence's Chart macro, it’s even easier to see where pages are being added. And it all updates dynamically. Here's how I did it.

examples_by_parent.png

The basic setup is two pages: one page with a table of numbers populated by the Reporting macro, and one page with a Chart macro, using the Include Page macro to pull the table of numbers in. (This reduced the complexity of the dashboard page where the chart would be located. See DIY metrics for a wiki space dashboard.)

"The data from Reporting" page

Here a simple table contains the results of my Reporting output. For this demo I used some example pages from my test wiki which had child pages.

reporting_data_image.png

Each cell contained the following:

  • Report Block macro

  • Inside that, Content Reporter macro

    • Parameters: Types = page, Scope = Page1>descendants, Match All Criteria = checked

  • Inside Content Reporter, Date Filter macro

    • Parameters: Key = content:creation date, After Value = 01-Jan-2019), Before Value = 01-Feb-2019 (for January's numbers)

  • Inside Report Block, after Content Reporter, Report Header macro

  • Inside Report Header, Report Info macro

    • Parameters: Key = report:query>collection:size (this would result in a single number that counted the items meeting the criteria)

  • After Report Header (still inside Report Block), Report Body macro (necessary for proper report operation)

  • After Report Body, Report Empty macro

    • Containing a 0 (zero). (If the report returned no results, the Chart macro would find a 0.)

Here’s how it looks in the Confluence editor.

confluence_editor.png

Here's the wiki markup.

 

{report-block:atlassian-macro-output-type=INLINE}
{content-reporter:scope=Content and format examples>descendants|types=page}{date-filter:content:creation date|afterValue=01-Jan-2019|beforeValue=01-Feb-2019|format=dd-MMM-yyyy}{content-reporter}
{report-header}{report-info:report:query>collection:size}{report-header}
{report-body}
{report-body}
{report-empty}0{report-empty}
{report-block}

(For my purposes, I used a “wiki markup without migration” macro to made copy and paste easier.)

wiki_markup_without_migration.png

I saved the page and numbers were generated in each cell! Great! After ensuring the page names and time frames were correct, it was time to build the chart.

"Chart macro with data from Reporting page"

Here’s the markup for the Confluence Chart macro at the beginning of the article.

{chart:dateFormat=dd-MM-yyyy|orientation=vertical|rangeAxisTickUnit=1|subTitle=In 2019|timePeriod=Month|timeSeries=true|title=Example pages created by parent|type=line|width=600|xLabel=Month|yLabel=Pages}
{include:The data from Reporting}{chart}

After I had the report and chart working to my satisfaction, I integrated it into the wiki dashboard.

A few notes,

  • Changed page names must be manually updated in the wiki markup or incorrect numbers will result

  • I spot-checked a couple of results against the page tree to make sure Reporting was returning the results I expected

  • I don’t believe previously created, then deleted, pages are included in the reports

  • The Wikifier RT tool is useful for converting Confluence editor format to wiki markup

I used the same technique to create a couple of other charts, such as average number of versions of pages in a section (turnover), and number of unique page creators by time period. They need some refinement, but are proof of concept that these macros can play together in a useful way. If anyone has ideas for other Reporting/Chart combinations I would like to hear about it.

average_versions.png

unique_page_creators.png

0 comments

Comment

Log in or Sign up to comment
TAGS
Community showcase
Published in Confluence

Announcing Team Calendars in Confluence Data Center

Hi Community! We're thrilled to share that Team Calendars for Confluence is now a built-in feature for Confluence Data Center releases 7.11 and beyond.  A long time favorite,  Team Cale...

59 views 0 3
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you