Wednesday, November 9, 2011

Confluence Wiki Knowhow: Tracking Document Views of Docs Outside Confluence

Background


Did you ever have the need to count views of electronic documents - say Word documents, PDF, Excels - in your company? When these documents are located on some file share it may be possible, but I would not know how to do that. In our company we are using an Atlassian Confluence Wiki (see: http://www.atlassian.com/software/confluence/overview) which offers a feature to track views of wiki pages and views of documents attached to a wiki page via the {tracking-info} macro.

Unfortunately, this macro cannot count views of documents located outside the Confluence Wiki.

What to Achieve?

I knew that it would not be possible to register the clicks on the documents when the user opens it directly in its native location; meaning: the user opens a file browser goes to the directory and opens the document directly using the file browser. However, I thought I could count the document accesses via the wiki. I wanted to find a user friendly way to open the document via a wiki page without having the need to save the document as attachment in the wiki, because this would need a lot of change in mind of the authors of the documents who are used to store them on a share.

Ideas

My first idea was to create a "facade" wiki page with a link to the document in its storage location. When communicating with the rest of the organization I would then send the link to the facade-page and then I could count the views of this page. This would have worked for sure, but what about other links to the document on other wiki pages? To realize document view counting from other pages, these would have the need to link the facade-page. This means that an end user needs to click twice on the (user perspective) same link: once in the link of the initial page and a second time on the link of the document residing on the facade-page - very enerving for a user...

Solution

Then I found a better solution (which works in Windows environment):
  • I create a shortcut from the url of the document location
  • This shortcut can be stored as attachment on a wiki page
  • On the page linking the document, use the link to the shortcut-attachment
  • To count the views, I use the tracking-info macro and count the views of the shortcut

Et voila - this works fine and is transparent to the enduser.