Having installed Google Analytics on Confluence, you need to ensure that you're not lost in a world of pretty metrics.

Make sure that your new analytics toy produces something solid and actionable. Anything less is just a shiny curiosity that your organisation will soon fail to engage with.

This article presents 4 useful tips that really show the power of the analytics data available. Each one can help improve the success of your Confluence installation.

1. Use the Content Drilldown report to segment traffic by site

Want to know which sites are generating the most traffic? The Content Drilldown report is for you. This allows you to view page reads by Site.

The gallery below shows you how to access the correct report - In Google Analytics (GA), click on the highlighted links to get to the next page.

Content Drilldown - Select "display"

Content Drilldown - Select "DOC"

Content Drilldown - Shows pages within the DOC site

Missing Page Views

The Content Drilldown report does not however show everything that happens within the site, but rather only pages that are descendent of /display/DOC/

Examples of missing pages

  • Pages with punctuation marks in the title.
    A page with a title of What's this? would have a URI similar to /pages/viewpage.action?pageId=26181760
    As a workaround, only use alphanumerics and spaces in page titles.
  • Page edits.
    A page edit would have a URI similar to /pages/editpage.action?pageId=26181733
  • Attachment views.
    These do not call the Google Analytics JavaScript, so are not caught by the tracking code

The first 2 of these are tracked, but not on a site by site basis within the Content Drilldown, so they are a little more difficult to understand.

Each of these could be tracked within the Content Drilldown by using a little jQuery magic to rewrite the URL before it is sent to Google Analytics.

I've not done this yet, but it should be fairly simple to change the reported URLs to e.g.

  • /display/DOC/What's This?
  • /display/DOC/Test+Page/Edit Page
  • /display/DOC/Test+Page/attachment/screenshot.png

2. Enable Site Search & Search Categories in GA

Google Analytics will allow you to categorize site searches. With this option enabled, you can see searches within individual sites.

In GA, go to Analytics Settings > Profile Settings > Edit Profile Information

* Select Do Track Site Search
* Add queryString,searchQuery.queryString to Query Parameter (required):
* Select Yes from Do you use categories for site search?
* Add key,searchQuery.spaceKey,where to Category Parameter:

Settings - Site Search

Example - Searching for "David Simpson" on Atlassian's own installation of Confluence

The table below shows the various different situations and query parameters that I've used to Categorize the Site Search:

Description/Link Example query parameter pairs
(Category Parameter in bold)
Search the whole site queryString=David+Simpson These are the (not set) results within Google Analytics
Search within a space (1) key=DOC
The standard query parameter structure created by the {search-box} macro
Search within a space (2) queryString=ancestorIds%3A135922+AND+David+Simpson
The query parameters created when a {pagetree} macro contains a search box (I think)
Filter a previous search queryString=David+Simpson
This is when you perform further searches within the Search Results page

3. Use "Site Search Categories" to show search terms from within individual sites

With site specific search information you can see

  • What people are looking for
  • Whether they've found it

Some screenshots of how to view the Site Specific search terms:

Site Search - List of categories

Site Search Results - DOC category only

This is powerful. If they're searching and finding stuff - great!

If they're failing to find the content they desire, then there's a real problem that needs fixing. The top search terms that return no result should be tackled.

With a little consideration, the user experience can be improved considerably, saving the organisation time and money.

Ask yourself a few questions:

  • Why are my visitors searching for search-term-x?
  • Is this search term relevent to my site?

    • If so, add the content you the site.
  • Is the search term related to different terminology that I'm using?

    • If so, include the various terminologies in pages, so that people with different language styles can find the content
  • Should the top result be easier to find?

    • Consider moving the top search term to be visible on the site home page or higher up in the site hierarchy

4. Use the "Site Search Start Pages" report to find out where visitors turn to search

This report exposes the page a visitor is on when they abandon the navigation system in the site and jump to the search box. This could give some insight into what's missing in your navigation system.

Site Search Start Pages Report

To view the search start pages on a site by site basis, filter this report by using the URI of each site.

Filter by site URI

Ask some more questions...

  • Are my visitors browsing or just searching?
    • When I'm on the eBay homepage, I generally just start searching and ignore all the content on the page. Are your visits doing this?
  • Do visitors search from particular pages?
    • If so, what are the search terms? Should these be included on, or linked to from these pages?

To Conclude

Using just these 4 simple tips highlights the combined power of Google Analytics and the internal search engine within Confluence. Answering some of the questions posed should provide the insight you need to improve the usability for all your visitors.

These tips are really only the a small part of what analytics has to offer. I'd encourage you to learn more and let me know how you get on.

Further reading/viewing

Please note: We've not had GA tracking Confluence for very long, so there are some empty results for the start of the month.
I've used Firebug to pretend we're looking at the analytics reports for Atlassian's own installation of Confluence