Getting the view or download count using the Tracking Data Supplier

Scenario

This guide shows you how to get the view or download count for attachments using Reporting and the Tracking Data Supplier.

(warning) This example requires the Reporting app to also be installed on your Confluence instance.


Result


Recipe

Ingredients

Add-ons

Tracking, Reporting

Platform

Server

Level

INTERMEDIATE

Estimated time

10 minutes

Macros

Suppliers

Storage format

Macro structure

You can recreate the example in the editor view:

Steps

  1. Create a Report Table macro.

  2. Within the Report Table macro, create a Content Reporter macro.
    Set the Spaces parameter to "@self".
    Set the Types parameter to "attachment".
    Set the Match All Criteria parameter to true.

  3. Within the Content Reporter macro, create a Text Filter macro.
    Set the Key parameter to "attachment:title".
    Set the Include parameter to ".*docx.*". This is to filter attachments to only .docx files.

  4. Within the Report Table macro, and under the Content Reporter macro, create a Report Column macro.
    Set the Title parameter to "Attachment Title".

  5. Within the Report Column macro, create a Report Info macro.
    Set the Key parameter to "attachment:title".
    Set the Link To Item parameter to True.

  6. Create another Report Column macro under the other one.
    Set the Title parameter to "Download Count".

  7. Within the Report Column macro, create a Report Info macro.
    Set the Key parameter to "attachment:title".