<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>David Simpson</title>
	<atom:link href="http://davidsimpson.me/feed/" rel="self" type="application/rss+xml" />
	<link>http://davidsimpson.me</link>
	<description>Developing the web, one page at a time.</description>
	<lastBuildDate>Fri, 05 Mar 2010 10:56:35 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Dear Apple Inc.</title>
		<link>http://davidsimpson.me/2010/02/10/dear-apple-inc/</link>
		<comments>http://davidsimpson.me/2010/02/10/dear-apple-inc/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 19:52:52 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[usability]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[ui patterns]]></category>
		<category><![CDATA[ux]]></category>

		<guid isPermaLink="false">http://davidsimpson.me/?p=571</guid>
		<description><![CDATA[

Please fix the search UI in Safari on the iPhone.  
I&#8217;ve been using the iPhone for some time now and overall, the interface is really slick.  The buttons are consistently placed and this gives a really strong user experience.  Everything appears to be in the obvious place.  
The trouble is, I [...]]]></description>
			<content:encoded><![CDATA[
<p><img src="http://davidsimpson.me/wp-content/uploads/2010/02/UK_Mailred.png" alt="UK postage stamp" title="UK postage stamp" width="128" height="128" class="alignleft size-full wp-image-596" /></p>
<p><strong>Please fix the search <acronym title="user interface">UI<acronym> in Safari on the iPhone.</strong>  </p>
<p>I&#8217;ve been using the iPhone for some time now and overall, the interface is really slick.  The buttons are consistently placed and this gives a really strong user experience.  Everything appears to be in the obvious place.  </p>
<p>The trouble is, I like to search the web and it looks like you&#8217;ve forgotten your own iPhone user interface rules for this area.<br />
<span id="more-571"></span></p>
<h3>Let me explain</h3>
<p>In all your other applications, the primary action button is located top-right with a secondary action button top-left.  </p>
<p><strong>Here&#8217;s some examples:</strong></p>
<p><img src="http://davidsimpson.me/wp-content/uploads/2010/02/Calendar-Add-Event.png" alt="Calendar - Add Event" title="Calendar - Add Event" width="320" height="480"  /></p>
<p><img src="http://davidsimpson.me/wp-content/uploads/2010/02/Mail-New-Message.png" alt="Mail - New Message" title="Mail - New Message" width="320" height="480" /></p>
<p><img src="http://davidsimpson.me/wp-content/uploads/2010/02/Safari-Basic-Authentication-dialog.png" alt="Safari Basic Authentication dialog" title="Safari Basic Authentication dialog" width="320" height="480" /></p>
<p><img src="http://davidsimpson.me/wp-content/uploads/2010/02/Messages-Edit.png" alt="Messages - Edit" title="Messages - Edit" width="320" height="480"  /></p>
<p>You get the picture, right?</p>
<p>Over time the user learns this convention and without realising it assumes that the top-right button means &#8220;OK&#8221;, &#8220;Submit&#8221;, &#8220;Search&#8221; or whatever the primary action is.</p>
<h3>Now, let&#8217;s have a look at the Safari search screen</h3>
<p>What&#8217;s in the top-right button position?</p>
<p><img src="http://davidsimpson.me/wp-content/uploads/2010/02/Safari-Search-Currently.png" alt="Safari Search - Currently" title="Safari Search - Currently" width="320" height="480" /></p>
<p> It&#8217;s the &#8220;Cancel&#8221; button i.e. the secondary action.  </p>
<p><strong>Oh dear.  How did that get there?</strong></p>
<p>At first, I thought that I was at fault because I hadn&#8217;t properly learned the interface.  Then I remembered one of the first observations you make when usability testing.  <strong>Users blame themselves</strong> for the mistakes in the design of the interface.</p>
<p>That the reason I was making the mistake so often was precisely because I <em>had</em>  learned the conventions of the user interface.</p>
<h3>So what can we do?</h3>
<p>The interface needs a subtle redesign.  Nothing major, just an increment to correct the problem.</p>
<p><strong>There are 2 options that immediately spring to mind</strong></p>
<p><strong>Option 1:</strong>  Move the Cancel button to the top-left &#8220;secondary action&#8221; position</p>
<p><img src="http://davidsimpson.me/wp-content/uploads/2010/02/Safari-Search-Enhancement-Option-2.png" alt="Safari Search Enhancement - Option" title="Safari Search Enhancement - Option" width="320" height="480" /></p>
<p>This should be really easy.  The basic premise of the current design is left intact and the secondary action is returned to the correct place in the interface &#8211; the top-left position.</p>
<p><strong>Option 2:</strong> Add a &#8220;Search&#8221; button in the top-right position and move the Cancel button to the top-left &#8220;secondary action&#8221; position.</p>
<p><img src="http://davidsimpson.me/wp-content/uploads/2010/02/Safari-Search-Enhancement-Option-1.png" alt="Safari Search Enhancement - Option" title="Safari Search Enhancement - Option" width="320" height="480"  /></p>
<p>We&#8217;ve got an additional button now, but it&#8217;s consistent with the overall design of the other apps you produce.</p>
<p>I know you&#8217;re really busy right now, especially with all the activity around the iPad, but please fit this into the next version of the OS.  It is such a minor UI change, but would markedly improve the way the browser search interface works.</p>
<p>Best of luck with iPhone OS 4.0.  I hope you bundle some of <a href="http://www.tuaw.com/2010/01/10/dear-apple-what-we-want-to-see-for-iphone-4-0-part-1?icid=sphere_blogsmith_inpage_tuaw">these ideas</a>, but don&#8217;t worry too much about Flash.</p>
<p><a href="http://twitter.com/dvdsmpsn">David</a></p>
<p><strong>P.S.</strong> If you can&#8217;t manage this for me, then I&#8217;d be happy to settle for <a href="http://www.opera.com/press/releases/2010/02/10/">Opera Mini</a> being approved in the App Store instead &#8211;  I quite like the idea of being able to browse <a href="http://my.opera.com/haavard/blog/2010/02/10/opera-mini-iphone">6 times faster than Safari</a>.</p>
<p>Image credit: <a href="http://www.tonysmac.pwp.blueyonder.co.uk/2007/02/uk-stamp-icons.html">UK stamp</a></p>

]]></content:encoded>
			<wfw:commentRss>http://davidsimpson.me/2010/02/10/dear-apple-inc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Some thoughts on developing my first Confluence plugin</title>
		<link>http://davidsimpson.me/2010/01/25/some-thoughts-on-developing-my-first-confluence-plugin/</link>
		<comments>http://davidsimpson.me/2010/01/25/some-thoughts-on-developing-my-first-confluence-plugin/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 12:42:04 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Uncategorised]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[analytics]]></category>
		<category><![CDATA[atlassian]]></category>
		<category><![CDATA[confluence]]></category>
		<category><![CDATA[google analytics]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[wiki]]></category>

		<guid isPermaLink="false">http://davidsimpson.me/?p=503</guid>
		<description><![CDATA[


I recently started building Confluence plugins.  The first one being my Google Analytics plugin for Confluence. This post outlines my &#8220;journey&#8221; into Confluence plugin development.  It documents a beginner&#8217;s pitfalls when developing with the Atlassian Plugin SDK. Hopefully others can learn from, or at least laugh at my mistakes. 
Where I was starting [...]]]></description>
			<content:encoded><![CDATA[
<p><img src="http://davidsimpson.me/wp-content/uploads/2010/01/ga-idea2.png" alt="ga-idea" title="ga-idea" width="440" height="150" class="alignnone" /></p>
<p><!--<br />
Some thoughts on developing my first Confluence plugin<br />
or<br />
A bluffer's guide to developing Confluence plugins<br />
--></p>
<p>I recently started building Confluence plugins.  The first one being my <a href="/2010/01/02/announcing-google-analytics-plugin-for-confluence/">Google Analytics plugin for Confluence</a>. This post outlines my &#8220;journey&#8221; into Confluence plugin development.  It documents a beginner&#8217;s pitfalls when developing with the Atlassian Plugin SDK. Hopefully others can learn from, or at least laugh at my mistakes. </p>
<p>Where I was starting from:
<ul>
<li>No experience of <a href="http://maven.apache.org/">maven</a></li>
<li>No understanding of how Confluence plugins work or how they are written</li>
<li>Some experience of Java &#8211; Mainly <a href="http://www.jasig.org/uportal">uPortal</a>/<a href="http://www.sungardhe.com/products/luminis-platform">Luminis</a> portal development for the <a href="http://my.nottingham.ac.uk/">University of Nottingham</a> and some consultancy work e.g. for Astra Zeneca, Documentum and 3Com</li>
<li>No experience of unit testing or integration testing in Java &#8211; oh dear</li>
<li>I prefer UI work to real programming</li>
</ul>
<p><span id="more-503"></span></p>
<h2>Initial failure</h2>
<p>I tried to setup a development environment for plugin development using Atlassian&#8217;s <a href="http://confluence.atlassian.com/display/DEVNET/How+to+Build+an+Atlassian+Plugin">documentation</a> a little before the beta release of version 3 of the Atlassian Plugin SDK.  It was a pain. This was no fault of the documentation &mdash; it was really just to do with my schedules and available time to experiment.</p>
<p>The problem was two-fold:</p>
<ol>
<li>I&#8217;d not done this before, so was clueless to what was involved</li>
<li>The setup was a complete ball-ache considering the time restraints</li>
</ol>
<p>I was well aware of point 1 and the pain it was likely to cause.  Point 2 seemed to be the old chestnut &#8211; install and configure the exact correct versions of the software you need in the correct sequence, then start. </p>
<p>Wait.  I don&#8217;t know what that means, see point 1. Yes, I&#8217;ve got maven installed on my MacBook! Woo! Let&#8217;s go.  Hang on, it&#8217;s not the correct version. Where do I get that from?</p>
<p>In many ways, it reminded me of my initial experience of building and installing Apache 1.x on Solaris SPARC boxes back in the day: </p>
<blockquote><p>
cd /path/to/apache/source; make; make install;<br />
Oh. Wrong version of make. Where do I get that from?  Hmmm.<br />
Install correct version of make. Damn, make needs the correct version of gcc. Where do I get that from?<br />
And so on. Moving further and further away from the problem you&#8217;re trying to solve.
</p></blockquote>
<p>So, I stopped there.  No shiny Confluence plugins for me.  I&#8217;ve got plenty of other things to do anyway thank you very much.   </p>
<h2>Reboot</h2>
<p>Then Atlassian released the Plugin SDK beta and all this nastiness was removed.  Everything you need to build an Atlassian plugin was bundled in one place.  Refreshing. All commands have been wrapped and so are prefixed with <code>atlas-</code> to prevent conflict with whatever else you&#8217;ve got installed.  </p>
<p>For the impatient, this really drives down the barriers to entry for plugin development.   </p>
<p>Following the documentation for <a href="http://confluence.atlassian.com/display/DEVNET/Setting+up+your+Plugin+Development+Environment">installing the Plugin SDK</a> was a piece of cake.  It just worked. </p>
<ul>
<li>Download</li>
<li>Unzip</li>
<li>Add some environment settings. Edit <code>~/.profile</code> and add:
<pre class="brush: bash;">
PATH=$PATH:.
PATH=$PATH:$HOME/
PATH=$PATH:$HOME/bin
PATH=$PATH:$HOME/atlassian-plugin-sdk/atlassian-plugin-sdk-3.0-beta3
PATH=$PATH:$HOME/atlassian-plugin-sdk/atlassian-plugin-sdk-3.0-beta3/bin
export PATH
</pre>
</li>
<li>Start building a plugin</li>
</ul>
<p>Starting out to build your Atlassian plugin is <a href="http://confluence.atlassian.com/display/DEVNET/Developing+your+Plugin+using+the+Atlassian+Plugin+SDK">documented here</a>. It&#8217;s a fairly straightforward set of instructions.    </p>
<p>You start by doing something like this:</p>
<pre class="brush: bash;">
mkdir ~/projects/davidsimpson.me/
mkdir ~/projects/davidsimpson.me/confluence
cd  ~/projects/davidsimpson.me/confluence

atlas-create-confluence-plugin
...
...
...
When prompted
Define value for groupId: : me.davdsimpson.confluence.plugins
Define value for artifactId: : googleanalytics
Define value for version:  1.0-SNAPSHOT: :
Define value for package:  me.davdsimpson.confluence.plugins: :
Confirm properties configuration:
groupId: me.davdsimpson.confluence.plugins
artifactId: googleanalytics
version: 1.0-SNAPSHOT
package: me.davdsimpson.confluence.plugins
</pre>
<p>Then type <code>atlas-run</code> and sit back.  If maven doesn&#8217;t fall over for lack of memory at this point, you&#8217;re laughing.  Go away, have a beer or two.  This may take some time.  </p>
<p><img src="http://davidsimpson.me/wp-content/uploads/2010/01/iStock_000009660877XSmall-440x175.jpg" alt="Beer" title="Beer" width="440" height="175" class="aligncenter size-medium wp-image-525" /></p>
<p>On your return, maven will hopefully have finished dragging all manner of nonsense from Australia and installed a working copy of Confluence, together with an empty plugin onto your computer. Nice.  Next, write some code.</p>
<p><b>I like to run before I can walk.</b>  It seems like much more fun to attempt something that&#8217;s harder.  You do fall over a lot more often though.  So rather than some kind of silly little hello world or equivalent plugin, my first plugin was an integration of Google Analytics with Confluence using the Google Analytics API to fetch data from Google.  It requires some additional JARs from Google.  </p>
<p>Google doesn&#8217;t have a public maven repository to my knowledge and I&#8217;d no idea how to get these JARs added into maven.  Luckily, people had already written about <a href="http://www.techbits.de/2009/08/06/adding-googles-gdata-java-api-to-your-maven-repository/">parts</a> of <a href="http://blog.stuartlewis.com/2009/05/29/surfacing-google-analytics-stats-in-dspace/">this</a>, so I put 2 and 2 together.   </p>
<p><b>Add Google Analytics JARs to maven:</b></p>
<pre class="brush: bash;">
atlas-mvn install:install-file -DgroupId=com.google.gdata \
    -DartifactId=gdata-core \
    -Dversion=1.0 \
    -Dpackaging=jar \
    -Dfile=/path/to/gdata-core-1.0.jar \
    -DgeneratePom=true

atlas-mvn install:install-file -DgroupId=com.google.gdata \
    -DartifactId=gdata-analytics \
    -Dversion=2.0 \
    -Dpackaging=jar \
    -Dfile=/path/to/gdata-analytics-2.0.jar \
    -DgeneratePom=true

atlas-mvn install:install-file -DgroupId=com.google.collect \
    -DartifactId=google-collect \
    -Dversion=1.0 \
    -Dpackaging=jar \
    -Dfile=/path/to/google-collect-1.0-rc3.jar
</pre>
<p><b>Edit the Project Object Model (POM) to add the dependencies</b>  </p>
<p>Edit the pom:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">vi</span> ~<span style="color: #000000; font-weight: bold;">/</span>projects<span style="color: #000000; font-weight: bold;">/</span>davidsimpson.me<span style="color: #000000; font-weight: bold;">/</span>confluence<span style="color: #000000; font-weight: bold;">/</span>googleanalytics<span style="color: #000000; font-weight: bold;">/</span>pom.xml</pre></div></div>

<p>Add this bit to the end of the dependencies node:</p>
<pre class="brush: xml;">
&lt;!-- Add Google Analytics dependencies: --&gt;
   &lt;dependency&gt;
       &lt;groupId&gt;com.google.gdata&lt;/groupId&gt;
       &lt;artifactId&gt;gdata-core&lt;/artifactId&gt;
       &lt;version&gt;1.0&lt;/version&gt;
   &lt;/dependency&gt;
   &lt;dependency&gt;
       &lt;groupId&gt;com.google.gdata&lt;/groupId&gt;
       &lt;artifactId&gt;gdata-analytics&lt;/artifactId&gt;
       &lt;version&gt;2.0&lt;/version&gt;
   &lt;/dependency&gt;
&lt;dependency&gt;
	&lt;groupId&gt;com.google.collect&lt;/groupId&gt;
	&lt;artifactId&gt;google-collect&lt;/artifactId&gt;
	&lt;version&gt;1.0&lt;/version&gt;
&lt;/dependency&gt;
</pre>
<p><b>Next, fire up your IDE</b></p>
<p>My chosen IDE is <a href="http://www.jetbrains.com/idea/">IntelliJ IDEA</a>.</p>
<ul>
<li>Open the pom.xml in IntelliJ IDEA (File | Open project) </li>
<li>Override/set the maven home directory:

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span>davidsimpson<span style="color: #000000; font-weight: bold;">/</span>atlassian-plugin-sdk-<span style="color: #000000;">3.0</span>-beta3<span style="color: #000000; font-weight: bold;">/</span>apache-maven</pre></div></div>

</li>
<li>Set the JDK for build as 1.5 or 1.6 </li>
<li>Start editing the plugin</li>
</ul>
<h2>Hiccups</h2>
<p>It&#8217;s not all straightforward.  Here&#8217;s some of the annoyances that I came across.</p>
<h3>Maven needs more memory</h3>
<p>I needed more memory for maven.  Not really a problem &#8211; append to <code>~/.profile</code>:       </p>
<pre class="brush: bash;">
MAVEN_OPTS=-Xmx512m
export MAVEN_OPTS
</pre>
<h3>Annoying warnings on <code>atlas-run</code></h3>
<p>I noticed this on running <code>atlas-run</code> &#8211; it probably shouldn&#8217;t be there:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>WARNING<span style="color: #7a0874; font-weight: bold;">&#93;</span> Using platform encoding <span style="color: #7a0874; font-weight: bold;">&#40;</span>MacRoman actually<span style="color: #7a0874; font-weight: bold;">&#41;</span> to copy filtered resources, i.e. build is platform dependent<span style="color: #000000; font-weight: bold;">!</span></pre></div></div>

<p>Of course, someone has already blogged about it &mdash; <a href="http://www.redleopard.com/2009/04/macroman-encoding-creeps-into-maven/">Red Leopard</a> &mdash; and it&#8217;s easily fixed by editing the POM to add the correct encoding.</p>
<pre class="brush: xml;">
&lt;properties&gt;
    &lt;confluence.version&gt;3.0.2&lt;/confluence.version&gt;
    &lt;confluence.data.version&gt;3.0&lt;/confluence.data.version&gt;

    &lt;!-- Fix for MacRoman warnings on build --&gt;
    &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
    &lt;project.reporting.outputEncoding&gt;UTF-8&lt;/project.reporting.outputEncoding&gt;
&lt;/properties&gt;
</pre>
<p>Now, we have no nasty warnings.  </p>
<h3>The macro browser icon</h3>
<p>I love the Macro Browser in Confluence.  It&#8217;s a nice step forward in the evolution of the UI.  So as a result, I wanted my macro to have a  shiny icon in the macro browser.   That damn Macro Browser icon ate up several hours of my life.  Looking at the comments on the <a href="http://confluence.atlassian.com/display/CONFDEV/Updating+macros+for+the+Macro+Browser">documentation</a> page, several other people have had a whole load of fun getting their pretty icon to show up too.</p>
<div id="attachment_521" class="wp-caption alignnone" style="width: 450px"><a href="http://davidsimpson.me/wp-content/uploads/2010/01/macro-browser1.png"><img src="http://davidsimpson.me/wp-content/uploads/2010/01/macro-browser1-440x270.png" alt="The macro browser icon: What we&#039;re aiming for" title="macro-browser" width="440" height="270" class="size-medium wp-image-521" /></a><p class="wp-caption-text">The macro browser icon: What we're aiming for</p></div>
<p>Could I get the Macro Browser to show my plugin&#8217;s icon. No.  I followed the <a href="http://confluence.atlassian.com/display/CONFDEV/Updating+macros+for+the+Macro+Browser">documentation</a>.  It did not work.  I looked again. This time I <em>really</em> paid attention.  Was it my fat fingers?  Was I just being stupid? (Probably.)  I ignored this for a while &mdash; maybe it would be better after a night&#8217;s sleep.</p>
<p>Everything <a href="http://twitter.com/dvdsmpsn/status/5796289204">seemed to work a whole lot better</a> when I dropped the beta and moved to version 3.0.2 of the Plugin SDK.<br />
<b>Note:</b> I had to update my <code>~/.profile</code> to point to the new version of the SDK and update the references to maven in Intelli-J at this point.</p>
<p>I also followed a different tack on getting the macro browser icon to work</p>
<ul>
<li>Find a macro that has a custom icon in the macro browser</li>
<li>Go to the Atlassian public subversion repository and browse to the source for that macro plugin.</li>
<li>Copy the exact syntax from the <code>atlassian-plugin.xml</code> and paste into your macro&#8217;s own <code>atlassian-plugin.xml</code></li>
<li>Name the icon exactly the same as in the <code>atlassian-plugin.xml</code> and put it in the correct place in the directory structure</li>
</ul>
<p>I&#8217;m not entirely sure whether it was the copy and paste approach that helped or moving away from the beta.  It works now, so I&#8217;m not going to loose sleep on why.</p>
<h3>Adding a configuring UI to the plugin</h3>
<p>My plugin needed to store Google account credentials and display a list of Google Analytics sites, so you can choose the correct profile.   How do you do that?  Hmmm. Go back to the <a href="http://confluence.atlassian.com/display/CONFDEV/Adding+a+Configuration+UI+for+your+Plugin">documentation</a>.  It wasn&#8217;t nearly detailed enough for my liking, so time to vent a <a href="http://twitter.com/dvdsmpsn/status/5719013792">little</a>.         </p>
<p>Again, it seemed the best way to learn was to find a plugin that has a similar kind of configuration to that you&#8217;re hoping for and start appropriating the code. </p>
<h3>Unit testing and integration testing</h3>
<p>This is a good idea. Period. Did I have a clue how to do it for Confluence?  Of course not.</p>
<p>Again, the community helped out.  Atlassian partners at Adaptavist, Comala Technology and Customware have written about this:</p>
<ul>
<li><a href="http://www.customware.net/repository/display/GREENHOUSE/2009/03/18/Integration+Testing+of+Confluence+Plugins">Integration Testing of Confluence Plugins</a> by Bo Wang</li>
<li><a href="http://www.adaptavist.com/display/~erobertshaw/2009/08/17/Unit+testing+a+Confluence+Action">Unit testing a Confluence Action</a> by Edward Robertshaw</li>
<li><a href="http://www.adaptavist.com/display/~erobertshaw/Unit+testing+a+Confluence+Macro">Unit testing a Confluence Macro</a> by Edward Robertshaw</li>
<li><a href="http://www.mundoreves.com/display/HOME/2009/01/29/Confluence+plugin+integration+testing"> Confluence plugin integration testing </a> by Roberto Dominguez</li>
</ul>
<p>Browsing around the Atlassian public subversion repository was also a help.  I&#8217;ve got to say that I&#8217;m an easy convert to testing.  It just makes sense.</p>
<h2>Wrapping up</h2>
<p>After a good deal of stumbling around, it turns out that I can write a Confluence plugin after all.  Everything started working a lot better after I updated from the beta version, but that could just be coincidence.  The documentation <em>could</em> be a little better to help the uninitiated  but it was equally my fault for not learning to walk first.  There is a lot of good information, but it is spread over a few different spaces.                     </p>
<p>My next step was to get the plugin added to Atlassian <a href="https://plugins.atlassian.com/plugin/home">Plugin Exchange</a>.  It took a little while to get this done &mdash; maybe that&#8217;s best saved for a follow up post.  The plugin is now <a href="https://plugins.atlassian.com/plugin/details/16722">available</a> on Atlassian Plugin Exchange.  I hope other people get some use out of it. </p>

]]></content:encoded>
			<wfw:commentRss>http://davidsimpson.me/2010/01/25/some-thoughts-on-developing-my-first-confluence-plugin/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Announcing: Google Analytics plugin for Confluence</title>
		<link>http://davidsimpson.me/2010/01/02/announcing-google-analytics-plugin-for-confluence/</link>
		<comments>http://davidsimpson.me/2010/01/02/announcing-google-analytics-plugin-for-confluence/#comments</comments>
		<pubDate>Sat, 02 Jan 2010 17:06:36 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[analytics]]></category>
		<category><![CDATA[atlassian]]></category>
		<category><![CDATA[confluence]]></category>
		<category><![CDATA[google analytics]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://davidsimpson.me/?p=457</guid>
		<description><![CDATA[

I&#8217;m pleased to announce the release of my first Confluence plugin &#8212; Google Analytics plugin for Confluence. 
It lists Google Analytics reports for a particular Confluence space &#8211; from within that space.  The current version has 10 reports and shows the first 20 results for each report.

Top Content
Depth of Visit
Internal Search
Browser and OS
Browser Version
Screen [...]]]></description>
			<content:encoded><![CDATA[
<p><img src="http://davidsimpson.me/wp-content/uploads/2010/01/ga-icon.png" alt="Google Analytics" title="Google Analytics" width="170" height="139" class="alignleft size-full wp-image-618" /></p>
<p>I&#8217;m pleased to announce the release of my first Confluence plugin &mdash; <a href="https://plugins.atlassian.com/plugin/details/16722">Google Analytics plugin for Confluence</a>. </p>
<p>It lists Google Analytics reports for a particular Confluence space &#8211; from within that space.  The current version has 10 reports and shows the first 20 results for each report.</p>
<ul>
<li>Top Content</li>
<li>Depth of Visit</li>
<li>Internal Search</li>
<li>Browser and OS</li>
<li>Browser Version</li>
<li>Screen Resolution</li>
<li>Network</li>
<li>City</li>
<li>All Traffic Sources</li>
<li>Search Engine Keywords</li>
</ul>
<p><span id="more-457"></span></p>
<p>Just before Christmas, Atlassian quietly approved the plugin on their <a href="http://plugins.atlassian.com">Plugin Exchange</a> website.  Since then, <a href="http://twitter.com/mattnhodges">Matt Hodges</a> posted a great write up about it on the Atlassian website &mdash; <a href="http://blogs.atlassian.com/confluence/2009/12/report-confluence-activity-using-google-analytics-in-the-wiki.html">Report Confluence Activity Using Google Analytics in the Wiki</a>.</p>
<h3>Screencasts and live demonstrations</h3>
<p>I&#8217;ve done a couple of screencast demos on usage and configuration:</p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/zbKElYFCWyk&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/zbKElYFCWyk&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/3jnWSWwRWH0&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/3jnWSWwRWH0&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p>But better than that, it&#8217;s now out in the wild and you can try it for yourself on other people&#8217;s sites:</p>
<ul>
<li>Atlassian have installed it on their <a href="http://sandbox.onconfluence.com/display/SBOX/Google+Analytics">Confluence Sandbox</a></li>
<li><a href="http://twitter.com/schirmacher">Arne Schirmacher</a> has posted a <a href="http://www.schirmacher.de/display/INFO/Google+Analytics">live demo</a> on his Confluence site</li>
<li><a href="http://workspace.nottingham.ac.uk/display/~cczdas/Google+Analytics+reports">Another live demo</a> on my personal Confluence space (using 1.2-SNAPSHOT)</li>
</ul>
<h3>What next?</h3>
<ul>
<li><a href="https://plugins.atlassian.com/server/1.0/download/pluginVersion/16723">Download Google Analytics plugin for Confluence</a></li>
<li><a href="http://davidsimpson.me/2009/03/18/tracking-atlassian-confluence-usage-with-google-analytics/">Setup Google Analytics on your Confluence site</a></li>
</ul>
<p>If you&#8217;re using this plugin or have tried it out, I&#8217;d really like to know what you think of it.</p>
<ul>
<li>What improvements would you like made?</li>
<li>What reports are missing?</li>
<li>Where could the UI could be improved?</li>
</ul>
<p>Please post a comment if you&#8217;ve got it installed.</p>
<h3>Thanks</h3>
<p>I&#8217;d like to thank the Confluence community for their help mainly via <a href="http://forums.atlassian.com/">Atlassian Forums</a> and some Atlassians for helping me out when I got stuck &#8211; particularly <a href="http://twitter.com/sdh100shaun">Shaun Hare</a>, <a href="http://twitter.com/keibro">Keith Brophy</a>,  <a href="http://blogs.atlassian.com/news/jnolen/">Jonathan Nolen</a> and  <a href="http://forums.atlassian.com/profile.jspa?userID=2157">David Peterson</a>.</p>
<p>Image credit: <a href="http://www.iconspedia.com/icon/google-analytics--737.html">Google Analytics icon</a></p>

]]></content:encoded>
			<wfw:commentRss>http://davidsimpson.me/2010/01/02/announcing-google-analytics-plugin-for-confluence/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Portal UI Design Patterns</title>
		<link>http://davidsimpson.me/2009/11/24/portal-ui-design-patterns/</link>
		<comments>http://davidsimpson.me/2009/11/24/portal-ui-design-patterns/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 10:48:06 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[usability]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[luminis]]></category>
		<category><![CDATA[portal]]></category>
		<category><![CDATA[sungardhe]]></category>
		<category><![CDATA[ui patterns]]></category>
		<category><![CDATA[university of nottingham]]></category>
		<category><![CDATA[ux]]></category>

		<guid isPermaLink="false">http://davidsimpson.me/?p=448</guid>
		<description><![CDATA[
Here are the slides from a talk I gave at the European Luminis User Group in Nottingham last week. 
Outlined are some thoughts behind reusable UI elements in the Luminis portal at the University of Nottingham. 
Portal UI Design Patterns


]]></description>
			<content:encoded><![CDATA[
<p>Here are the slides from a talk I gave at the European Luminis User Group in Nottingham last week. </p>
<p>Outlined are some thoughts behind reusable UI elements in the Luminis portal at the University of Nottingham. </p>
<div style="width:425px;text-align:left" id="__ss_2544097"><a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" href="http://www.slideshare.net/dvdsmpsn/portal-ui-design-patterns" title="Portal UI Design Patterns">Portal UI Design Patterns</a><object style="margin:0px" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=elug-portaluidesignpatternstoshare-091120054329-phpapp02&#038;stripped_title=portal-ui-design-patterns" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=elug-portaluidesignpatternstoshare-091120054329-phpapp02&#038;stripped_title=portal-ui-design-patterns" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object>
</div>

]]></content:encoded>
			<wfw:commentRss>http://davidsimpson.me/2009/11/24/portal-ui-design-patterns/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Changing boilerplate text in Confluence</title>
		<link>http://davidsimpson.me/2009/11/04/changing-boilerplate-text-in-confluence/</link>
		<comments>http://davidsimpson.me/2009/11/04/changing-boilerplate-text-in-confluence/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 20:18:47 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[web]]></category>
		<category><![CDATA[confluence]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://davidsimpson.me/?p=399</guid>
		<description><![CDATA[
We run Confluence with the (default) en_GB locale and language.   For our purposes, some of the boilerplate text needs changing. This post describes how to solve this problem with a partial British English language pack that overrides only part of the Confluence interface text.

The Atlassian website has a page on how to Modify [...]]]></description>
			<content:encoded><![CDATA[
<p>We run Confluence with the (default) en_GB locale and language.   For our purposes, some of the <a href="http://en.wikipedia.org/wiki/Boilerplate_(text)">boilerplate text </a>needs changing. This post describes how to solve this problem with a partial British English language pack that overrides only part of the Confluence interface text.<br />
<span id="more-399"></span><br />
The Atlassian website has a page on how to <a href="http://confluence.atlassian.com/display/DOC/Modify+Confluence+Interface+Text">Modify Confluence Interface Text</a></p>
<p><strong>The suggested steps are:</strong></p>
<ul>
<li>Get a file from the confluence-3.x.jar file</li>
<li>Place it here: <code>/confluence/WEB-INF/classes/com/atlassian/confluence/core/</code></li>
<li>Edit the text you wish to change</li>
<li>Restart Confluence</li>
</ul>
<p><strong>Some reasons I don&#8217;t think this method should not be used</strong></p>
<ul>
<li>I tried this, but couldn&#8217;t get it to work.  <em>OK, not really a proper reason.</em></li>
<li>This file will probably get wiped on upgrade. <em>I&#8217;m guessing.</em></li>
<li>You need to duplicate the whole file (7000+ lines), not just the changes.  <em>Not pretty.</em></li>
</ul>
<p>So what next?</p>
<h3>Create a partial language pack plugin</h3>
<p>Confluence uses en_GB by default. I want to use British English, but only have the overrides in my language pack.  I don&#8217;t want to do anything destructive to my Confluence installation.</p>
<p>It&#8217;s possible to create a (partial) language pack plugin for Confluence.  I&#8217;m going to create a new locale for my plugin, so that it doesn&#8217;t clash with the installed en_GB language.  My partial language pack will use the default terms from the confluence-3.x.jar file unless they are overridden.  My new language will be &#8220;Nottingham English&#8221; with a *two letter, uppercase* locale code &#8220;UN&#8221;.</p>
<h4>Steps</h4>
<p>Creating a <a href="http://confluence.atlassian.com/display/DOC/Language+Pack+Plugins">language pack</a> is really easy as there are only 3 files required.</p>
<p>Create the following directory structure:<br />
<div id="attachment_409" class="wp-caption alignnone" style="width: 445px"><a href="http://davidsimpson.me/wp-content/uploads/2009/11/lang-pack-structure.png"><img src="http://davidsimpson.me/wp-content/uploads/2009/11/lang-pack-structure.png" alt="Language Pack Directory Structure" title="Language Pack Directory Structure" width="435" height="212" class="size-full wp-image-409" /></a><p class="wp-caption-text">Language Pack Directory Structure</p></div>		</p>
<h5>File descriptions</h5>
<p><code>atlassian-plugin.xml</code><br />
describes the language pack:</p>
<pre class="brush: xml;">&lt;atlassian-plugin name='Nottingham English language pack' key='confluence.languages.en_UN'&gt;
	&lt;plugin-info&gt;
		&lt;description&gt;&lt;![CDATA[For changes to boilerplate text that should persist after a Confluence upgrade.]]&gt;&lt;/description&gt;
        &lt;version&gt;1.0&lt;/version&gt;
        &lt;vendor name=&quot;David Simpson&quot; url=&quot;http://davidsimpson.me/&quot;/&gt;
	&lt;/plugin-info&gt;

	&lt;language name=&quot;Nottingham English&quot; key=&quot;en_UN&quot; language=&quot;en&quot; country=&quot;UN&quot;&gt;
		&lt;!-- Define a flag that will be shown for this language --&gt;
		&lt;resource name=&quot;en_UN.png&quot; type=&quot;download&quot; location=&quot;templates/languages/en_UN/en_UN.png&quot;&gt;
			&lt;property key=&quot;content-type&quot; value=&quot;image/png&quot;/&gt;
		&lt;/resource&gt;
	&lt;/language&gt;
&lt;/atlassian-plugin&gt;
</pre>
<p><code>ConfluenceActionSupport_en_UN.properties</code><br />
 is the override text for the language</p>

<div class="wp_syntax"><div class="code"><pre class="properties" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">## Replace the Dashboard name/title</span>
<span style="color: #000080; font-weight:bold;">dashboard.name</span> <span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;"> Workspace Home</span>
<span style="color: #000080; font-weight:bold;">title.dashboard</span> <span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;"> Workspace Home</span>
&nbsp;
<span style="color: #808080; font-style: italic;">## Replace login instructions</span>
<span style="color: #000080; font-weight:bold;">login.instructions</span> <span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;"> Put yorn login details inta this eer form. </span>
&nbsp;
<span style="color: #808080; font-style: italic;">## Add some Nottingham dialect (meaning hello)</span>
<span style="color: #000080; font-weight:bold;">default.welcome.message</span> <span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;"> Ayup Mi Duck</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># Fix any accidental misinformation where Atlassian have changed features</span>
<span style="color: #000080; font-weight:bold;">no.favourite.pages</span><span style="color: #000000;">=</span><span style="color: #008000; font-weight:bold;">There are currently no pages on your favourites list.&lt;br/&gt;&lt;br/&gt; \</span>
        To add pages to this list \
		&lt;ul&gt; \
			&lt;li&gt;Click on &lt;b&gt;Tools&lt;/b&gt; <span style="">&#40;</span>on the top right of the page you''re viewing<span style="">&#41;</span>&lt;/li&gt; \
			&lt;li&gt;Select &lt;b&gt;&lt;img src<span style="color: #000000;">=</span><span style="color: #933;">&quot;{0}&quot;</span>&gt; Watch&lt;/b&gt; from the menu&lt;/li&gt; \
		&lt;/ul&gt;</pre></div></div>

<p><code>en_UN.png</code><br />
 is the thumbnail.  Change this from the Union Jack flag so it can be distinguished from the flag for the default British English en_GB</p>
<h5>Build the plugin and install</h5>
<p>I&#8217;m developing this in <code>~/projects/confluence/language-en_UN_partial/</code> on my Mac, so to build the plugin:</p>
<pre>cd ~/projects/confluence/language-en_UN_partial/
jar cvf ../language-en_UN_partial.jar *</pre>
<p>Install the plugin in the usual way in Confluence at<br />
<strong>Confluence Admin | Plugins</strong></p>
<p>Select the new language from <strong>Confluence Admin | Language</strong></p>
<h3>Results</h3>
<p>Overall, I think it works well.  This is a pretty easy way to bundle up changes to the default Confluence text.</p>
<div id="attachment_405" class="wp-caption alignnone" style="width: 310px"><a href="http://davidsimpson.me/wp-content/uploads/2009/11/lang-pack-login.png"><img src="http://davidsimpson.me/wp-content/uploads/2009/11/lang-pack-login-300x203.png" alt="Confluence Login Page" title="Confluence Login Page" width="300" height="203" class="size-medium wp-image-405" /></a><p class="wp-caption-text">Confluence Login Page</p></div> <div id="attachment_404" class="wp-caption alignnone" style="width: 310px"><a href="http://davidsimpson.me/wp-content/uploads/2009/11/lang-pack-dashboard.png"><img src="http://davidsimpson.me/wp-content/uploads/2009/11/lang-pack-dashboard-300x258.png" alt="Confluence Dashboard" title="Confluence Dashboard" width="300" height="258" class="size-medium wp-image-404" /></a><p class="wp-caption-text">Confluence Dashboard</p></div>
<p>The Site Welcome Message can also easily be changed elsewhere too.<br />
Matt Hodges talks about this in his post &#8220;<a href="http://blogs.atlassian.com/confluence/2009/10/hidden-feature-bring-must-read-content-to-the-dashboard.html">Hidden Feature: Bring &#8216;Must Read&#8217; Content to the Dashboard</a>&#8220;.</p>
<h3>Upgrade path</h3>
<p>Atlassian will likely change the boilerplate text as new versions of the product are released, so it&#8217;s good to review your changes on upgrade.  </p>
<p>Steps:</p>
<ul>
<li>Revert language to British English </li>
<li>Check each item you&#8217;ve changed</li>
<li>Make any appropriate edits (if required)</li>
<li>Upload your new version of the language pack (if required)</li>
<li>Change language back to your own e.g. &#8220;Nottingham English&#8221;</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://davidsimpson.me/2009/11/04/changing-boilerplate-text-in-confluence/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>A simpler way to view attachments in Confluence</title>
		<link>http://davidsimpson.me/2009/10/16/a-simpler-way-to-view-attachments-in-confluence/</link>
		<comments>http://davidsimpson.me/2009/10/16/a-simpler-way-to-view-attachments-in-confluence/#comments</comments>
		<pubDate>Fri, 16 Oct 2009 14:37:14 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Uncategorised]]></category>
		<category><![CDATA[confluence]]></category>
		<category><![CDATA[usability]]></category>
		<category><![CDATA[user macro]]></category>

		<guid isPermaLink="false">http://davidsimpson.me/?p=367</guid>
		<description><![CDATA[
&#8230;or how to display attachments in an unordered list. 
Something that bugs me in Confluence is the way that attachments are shown.  The default view is a big table with just about all the information related to each attachment.  
This is great if you want all this detail, but I&#8217;m a simple soul [...]]]></description>
			<content:encoded><![CDATA[
<p>&#8230;or how to display attachments in an unordered list. </p>
<p>Something that bugs me in <a href="http://www.atlassian.com/software/confluence/">Confluence</a> is the way that attachments are shown.  The default view is a big table with just about all the information related to each attachment.  </p>
<p>This is great if you want all this detail, but I&#8217;m a simple soul with simple needs.  </p>
<p><a href="http://www.sensible.com/buythebook.html">Krug suggested</a> &#8220;Omit <strike>needless</strike> words&#8221;.  In this case, it&#8217;s more of &#8220;Omit <strike>needless</strike> metadata&#8221;.</p>
<h3>Less is more</h3>
<p>Enter {list-attachments} &#8211; a user macro that dispenses with the excess.  It displays an unordered list with the filename, file size and last modified date.  If there&#8217;s a comment for the attachment, this is displayed in the link text rather than the filename.</p>
<p>This is a really straightforward view of the attachments on the page.<br />
<span id="more-367"></span></p>
<h3>How do I install {list-attachments} ?</h3>
<p>It&#8217;s pretty easy.  As a Confluence administrator, go to <b>Confluence Admin | User Macros</b> and click on <b>Create a User Macro</b>.</p>
<p>Macro name: <b>list-attachments</b></p>
<p>Template:</p>
<pre class="brush: plain;">
## MACRO: list-attachments
## View page attachments in a simple list
## USAGE: {list-attachments}

#set ($attachmentsList = $content.getLatestVersionsOfAttachments())

#applyDecorator(&quot;page&quot;)
    &lt;div class=&quot;listAttachmentsDiv&quot;&gt;
        #if ($attachmentsList.size() &gt; 0)
			&lt;ul&gt;
		        #foreach( $attachment in $attachmentsList )
					&lt;li&gt;

						## Display the file type icon:
			            &lt;a name=&quot;$generalUtil.htmlEncode($generalUtil.urlEncode($page.title))-attachment-$generalUtil.htmlEncode($generalUtil.urlEncode($attachment.fileName))&quot;&gt;#parse (&quot;/pages/includes/attachment_icon.vm&quot;)&lt;/a&gt; 

						## The link:
						#if ($attachment.comment &amp;&amp; $attachment.comment.trim().length() &gt; 0)
							## Display the comment as the link text instead of the filename
							&lt;a href=&quot;$generalUtil.htmlEncode(&quot;${req.contextPath}${attachment.downloadPathWithoutVersion}&quot;)&quot;&gt;$generalUtil.htmlEncode($attachment.comment)&lt;/a&gt;
						#else
							## Display the filename as the link text
							&lt;a href=&quot;$generalUtil.htmlEncode(&quot;${req.contextPath}${attachment.downloadPathWithoutVersion}&quot;)&quot;&gt;$generalUtil.htmlEncode($attachment.fileName)&lt;/a&gt;
						#end

    					## Display the file size:
						&lt;span class=&quot;fileSize&quot;&gt;$attachment.niceFileSize&lt;/span&gt;

						## Display the last modification date
						&lt;span class=&quot;lastModDate&quot;&gt;$attachment.lastModificationDate&lt;/span&gt;
					&lt;/li&gt;
				#end
			&lt;/ul&gt;
		#else
			## Display nothing
		#end
    &lt;/div&gt;
#end
</pre>
<p>Accept the defaults for the other fields, then click on <b>Save</b></p>
<p>To call the macro in the page type: <strong>{list-attachments}</strong></p>
<p>The result:<br />
<img src="http://davidsimpson.me/wp-content/uploads/2009/10/Screen-shot-2009-10-16-at-12.58.15.png" alt="simple-view-attachments macro" title="simple-view-attachments macro" width="415" height="60" class="alignnone size-full wp-image-369" /></p>
<h3>For extra points</h3>
<p>If you want to change the way the items are displayed, add some CSS to the global stylesheet, e.g</p>
<pre class="brush: css;">
.listAttachmentsDiv a { font-family: helvetica, sans-serif; }
.fileSize, .lastModDate { font-size: 90%; color: #999;}
</pre>
<p>To see even less,  comment out (add ## at the start of the line)  lines 27 &#038; 30 in the user macro to remove the file size and last modification date.  </p>
<p>Now you&#8217;re left with a simple list of links.  </p>

]]></content:encoded>
			<wfw:commentRss>http://davidsimpson.me/2009/10/16/a-simpler-way-to-view-attachments-in-confluence/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Using the Google Analytics Javascript API to show pageviews from Atlassian Confluence</title>
		<link>http://davidsimpson.me/2009/09/11/using-the-google-analytics-javascript-api-to-show-pageviews-from-atlassian-confluence/</link>
		<comments>http://davidsimpson.me/2009/09/11/using-the-google-analytics-javascript-api-to-show-pageviews-from-atlassian-confluence/#comments</comments>
		<pubDate>Fri, 11 Sep 2009 22:48:09 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Uncategorised]]></category>

		<guid isPermaLink="false">http://davidsimpson.me/?p=356</guid>
		<description><![CDATA[
Here&#8217;s a quick demo I wrote to test out the Google Analytics API.
It shows pageviews for an Atlassian Confluence wiki on a space by space basis.
You&#8217;ll need your own copy of Confluence hooked up to Google Analytics for the demo to work, so I&#8217;ve done a video demo too &#8211; no sound, sorry.

Confluence &#038; Google [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://davidsimpson.me/labs/ga-api/confluence/">Here&#8217;s a quick demo</a> I wrote to test out the Google Analytics API.</p>
<p>It shows pageviews for an Atlassian Confluence wiki on a space by space basis.</p>
<p>You&#8217;ll need your own copy of Confluence hooked up to Google Analytics for the demo to work, so I&#8217;ve done a video demo too &#8211; no sound, sorry.</p>
<p><object width="425" height="319"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=6430883&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=6430883&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="425" height="319"></embed></object>
<p><a href="http://vimeo.com/6430883">Confluence &#038; Google Analytics Javascript API</a> from <a href="http://vimeo.com/dvdsmpsn">David Simpson</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<p><span id="more-356"></span><br />
The main problem for listing data on a space by space basis with the Google Analytics API is that there isn&#8217;t an equivalent to the Content Drilldown report. My workaround was to get the 500 most popular pages, then using regular expressions, get the spacekeys, remove duplicates and sort alphabetically.  Not particularly elegant, but hey.</p>
<h2>Next Steps</h2>
<p>It&#8217;s a nice proof of concept, but I&#8217;d like to display this information &#8211; without the authentication and authorisation step &#8211; to users without access to Google Analytics.<br />
e.g. To the owners/administrators of Confluence spaces. </p>
<p>The next step will be to rewrite in Java and embed the data and some charts directly into Confluence with a custom written macro. </p>

]]></content:encoded>
			<wfw:commentRss>http://davidsimpson.me/2009/09/11/using-the-google-analytics-javascript-api-to-show-pageviews-from-atlassian-confluence/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Adding custom segments to Google Analytics</title>
		<link>http://davidsimpson.me/2009/06/04/adding-custom-segments-to-google-analytics/</link>
		<comments>http://davidsimpson.me/2009/06/04/adding-custom-segments-to-google-analytics/#comments</comments>
		<pubDate>Thu, 04 Jun 2009 12:26:04 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Uncategorised]]></category>
		<category><![CDATA[google analytics]]></category>

		<guid isPermaLink="false">http://davidsimpson.me/?p=335</guid>
		<description><![CDATA[
Here&#8217;s a quick screencast I made to show how easy it is to add custom segments &#8211; e.g. based on country/territory &#8211; to Google Analytics.  There&#8217;s no audio.  Sorry.

Adding custom segments to Google Analytics from David Simpson on Vimeo.

]]></description>
			<content:encoded><![CDATA[
<p>Here&#8217;s a quick screencast I made to show how easy it is to add custom segments &#8211; e.g. based on country/territory &#8211; to Google Analytics.  There&#8217;s no audio.  Sorry.</p>
<p><object width="425" height="358"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=4997899&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=4997899&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="425" height="358"></embed></object>
<p><a href="http://vimeo.com/4997899">Adding custom segments to Google Analytics</a> from <a href="http://vimeo.com/dvdsmpsn">David Simpson</a> on <a href="http://vimeo.com">Vimeo</a>.</p>

]]></content:encoded>
			<wfw:commentRss>http://davidsimpson.me/2009/06/04/adding-custom-segments-to-google-analytics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>4 Useful Tips on Google Analytics Reporting for Confluence</title>
		<link>http://davidsimpson.me/2009/04/16/4-useful-tips-on-google-analytics-reporting-for-confluence/</link>
		<comments>http://davidsimpson.me/2009/04/16/4-useful-tips-on-google-analytics-reporting-for-confluence/#comments</comments>
		<pubDate>Thu, 16 Apr 2009 21:29:38 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[analytics]]></category>
		<category><![CDATA[atlassian]]></category>
		<category><![CDATA[confluence]]></category>
		<category><![CDATA[google analytics]]></category>

		<guid isPermaLink="false">http://davidsimpson.me/?p=283</guid>
		<description><![CDATA[

Having installed Google Analytics on Confluence, you need to ensure that you&#8217;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 [...]]]></description>
			<content:encoded><![CDATA[
<p><!-- 4 useful tips on Google Analytics reporting for Confluence --></p>
<p>Having <a href="/2009/03/18/tracking-atlassian-confluence-usage-with-google-analytics/">installed Google Analytics on Confluence</a>, you need to ensure that you&#8217;re not lost in a world of pretty metrics.  </p>
<p>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.</p>
<p>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.<br />
<span id="more-283"></span></p>
<h2>1. Use the Content Drilldown report to segment traffic by site</h2>
<p>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.</p>
<p>The gallery below shows you how to access the correct report &#8211; In Google Analytics (GA), click on the highlighted links to get to the next page.</p>
<p><!--***--><a href="http://davidsimpson.me/wp-content/uploads/2009/04/content-drilldown-all.png"><img src="http://davidsimpson.me/wp-content/uploads/2009/04/content-drilldown-all-150x150.png" alt="Content Drilldown - Select &quot;display&quot;" title="Content Drilldown - All" width="150" height="150" class="size-thumbnail wp-image-291" /></a></p>
<p><!--***--><a href="http://davidsimpson.me/wp-content/uploads/2009/04/content-drilldown-sites.png"><img src="http://davidsimpson.me/wp-content/uploads/2009/04/content-drilldown-sites-150x150.png" alt="Content Drilldown - Select &quot;DOC&quot;" title="Content Drilldown - Sites" width="150" height="150" class="size-thumbnail wp-image-292" /></a></p>
<p><!--***--><div id="attachment_293" class="wp-caption alignnone" style="width: 160px"><a href="http://davidsimpson.me/wp-content/uploads/2009/04/content-drilldown-sites-doc.png"><img src="http://davidsimpson.me/wp-content/uploads/2009/04/content-drilldown-sites-doc-150x150.png" alt="Content Drilldown - Shows pages within the DOC site" title="Content Drilldown - DOC" width="150" height="150" class="size-thumbnail wp-image-293" /></a><p class="wp-caption-text">Content Drilldown - Shows pages within the DOC site</p></div></p>
<h3>Missing Page Views</h3>
<p>The Content Drilldown report  does <em>not</em> however show everything that happens within the site, but rather only pages that are descendent of <strong>/display/DOC/</strong></p>
<h4>Examples of missing pages</h4>
<ul>
<li>
		<strong>Pages with punctuation marks in the title.</strong><br />
		A page with a title of <em>What&#8217;s this?</em> would have a URI similar to <strong>/pages/viewpage.action?pageId=26181760</strong><br />
		<em>As a workaround, only use alphanumerics and spaces in page titles.</em>
	</li>
<li>
		<strong>Page edits.</strong><br />
		A page edit would have a URI similar to <strong>/pages/editpage.action?pageId=26181733</strong>
	</li>
<li>
		<strong>Attachment views.</strong><br />
		These do not call the Google Analytics JavaScript, so are not caught by the tracking code
	</li>
</ul>
<p>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.</p>
<p>Each of these <em>could</em> be tracked within the Content Drilldown by using a little jQuery magic to rewrite the URL before it is sent to Google Analytics.</p>
<p>I&#8217;ve not done this yet, but it should be fairly simple to change the reported URLs to e.g.</p>
<ul>
<li>/display/DOC/What&#8217;s This?</li>
<li>/display/DOC/Test+Page/Edit Page</li>
<li>/display/DOC/Test+Page/attachment/screenshot.png</li>
</ul>
<h2>2. Enable Site Search  &#038; Search Categories in GA</h2>
<p>Google Analytics will allow you to categorize site searches. With this option enabled, you can see searches within individual sites.</p>
<p>In GA, go to <strong>Analytics Settings > Profile Settings > Edit Profile Information</strong></p>
<p>* Select <strong>Do Track Site Search</strong><br />
* Add <strong>queryString,searchQuery.queryString</strong> to <strong>Query Parameter (required):</strong><br />
* Select <strong>Yes</strong> from <strong>Do you use categories for site search?</strong><br />
* Add <strong>key,searchQuery.spaceKey,where</strong> to <strong>Category Parameter:</strong></p>
<p><!--***--><div id="attachment_306" class="wp-caption alignnone" style="width: 160px"><a href="http://davidsimpson.me/wp-content/uploads/2009/04/settings-site-search.png"><img src="http://davidsimpson.me/wp-content/uploads/2009/04/settings-site-search-150x150.png" alt="Settings - Site Search" title="settings-site-search" width="150" height="150" class="size-thumbnail wp-image-306" /></a><p class="wp-caption-text">A screenshot of the Site Search Setting section</p></div></p>
<h3>Example &#8211; Searching for &#8220;David Simpson&#8221; on Atlassian&#8217;s own installation of Confluence </h3>
<p>The table below shows the various different situations and query parameters that I&#8217;ve used to Categorize the Site Search:</p>
<div class="overflowAuto">
<table>
<tr>
<th>Description/Link</th>
<th>Example query parameter pairs (Category Parameter in bold)</th>
<th class="comments">Comments</th>
</tr>
<tr>
<td class="nowrap"><a href="http://confluence.atlassian.com/dosearchsite.action?queryString=David+Simpson">Search the whole site</a></td>
<td>queryString=David+Simpson</td>
<td class="nowrap">These are the (not set) results within Google Analytics</td>
</tr>
<tr>
<td class="nowrap"><a href="http://confluence.atlassian.com/dosearchsite.action?key=DOC&#038;searchQuery.queryString=David+Simpson&#038;searchQuery.spaceKey=DOC">Search within a space (1)</a></td>
<td>
			<b>key=DOC</b><br />
			searchQuery.queryString=David+Simpson<br />
			<b>searchQuery.spaceKey=DOC</b>
		</td>
<td>The standard query parameter structure created by the {search-box} macro</td>
</tr>
<tr>
<td class="nowrap"><a href="http://confluence.atlassian.com/dosearchsite.action?queryString=ancestorIds%3A135922+AND+David+Simpson&#038;where=DOC&#038;type=&#038;lastModified=&#038;contributor=&#038;contributorUsername=">Search within a space (2)</a></td>
<td>
			queryString=ancestorIds%3A135922+AND+David+Simpson<br />
			<b>where=DOC</b><br />
			type=<br />
			lastModified=<br />
			contributor=<br />
			contributorUsername=
		</td>
<td>The query parameters created when a {pagetree} macro contains a search box (I think)</td>
</tr>
<tr>
<td><a href="http://confluence.atlassian.com/dosearchsite.action?queryString=David+Simpson&#038;where=DOC&#038;type=&#038;lastModified=&#038;contributor=&#038;contributorUsername=">Filter a previous search</a></td>
<td>
			queryString=David+Simpson<br />
			<b>where=DOC</b><br />
			type=<br />
			lastModified=<br />
			contributor=<br />
			contributorUsername=
		</td>
<td>This is when you perform further searches within the Search Results page</td>
</tr>
</table>
</div>
<h2>3. Use &#8220;Site Search Categories&#8221; to show search terms from within individual sites</h2>
<p>With site specific search information you can see </p>
<ul>
<li>What people are looking for </li>
<li>Whether they&#8217;ve found it</li>
</ul>
<p>Some screenshots of how to view the Site Specific search terms:</p>
<p><!--***--><div id="attachment_290" class="wp-caption alignnone" style="width: 160px"><a href="http://davidsimpson.me/wp-content/uploads/2009/04/site-search-categories.png"><img src="http://davidsimpson.me/wp-content/uploads/2009/04/site-search-categories-150x150.png" alt="Site Search - List of categories" title="site-search-categories" width="150" height="150" class="size-thumbnail wp-image-290" /></a><p class="wp-caption-text">Site Search - List of categories</p></div></p>
<p><!--***--><div id="attachment_289" class="wp-caption alignnone" style="width: 160px"><a href="http://davidsimpson.me/wp-content/uploads/2009/04/site-search-categories-doc.png"><img src="http://davidsimpson.me/wp-content/uploads/2009/04/site-search-categories-doc-150x150.png" alt="Site Search Results - DOC category only" title="site-search-categories-doc" width="150" height="150" class="size-thumbnail wp-image-289" /></a><p class="wp-caption-text">Site Search Results - DOC category only</p></div></p>
<p>This is powerful.  If they&#8217;re searching and finding stuff &#8211; great!</p>
<p>If they&#8217;re failing to find the content they desire, then there&#8217;s a real problem that needs fixing.   <strong>The top search terms that return no result should be tackled.</strong></p>
<p>With a little consideration, the user experience can be improved considerably, saving the organisation time and money. </p>
<h3>Ask yourself a few questions:</h3>
<ul>
<li>Why are my visitors searching for <em>search-term-x</em>?</li>
<li>
		Is this search term relevent to my site?</p>
<ul>
<li>If so, add the content you the site.</li>
</ul>
</li>
<li>
		Is the search term related to different terminology that I&#8217;m using?</p>
<ul>
<li>If so, include the various terminologies in pages, so that people with different language styles can find the content</li>
</ul>
</li>
<li>
		Should the top result be easier to find?</p>
<ul>
<li>Consider moving the top search term to be visible on the site home page or higher up in the site hierarchy</li>
</ul>
</li>
</ul>
<h2>4. Use the &#8220;Site Search Start Pages&#8221; report to find out where visitors turn to search</h2>
<p>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&#8217;s missing in your navigation system. </p>
<p><!--***--><div id="attachment_307" class="wp-caption alignnone" style="width: 160px"><a href="http://davidsimpson.me/wp-content/uploads/2009/04/site-search-start-pages.png"><img src="http://davidsimpson.me/wp-content/uploads/2009/04/site-search-start-pages-150x150.png" alt="Site Search Start Pages Report" title="site-search-start-pages" width="150" height="150" class="size-thumbnail wp-image-307" /></a><p class="wp-caption-text">Site Search Start Pages Report</p></div></p>
<p>To view the search start pages on a site by site basis, filter this report by using the URI of each site.</p>
<p><!--***--><div id="attachment_308" class="wp-caption alignnone" style="width: 371px"><a href="http://davidsimpson.me/wp-content/uploads/2009/04/filter-by-site.png"><img src="http://davidsimpson.me/wp-content/uploads/2009/04/filter-by-site.png" alt="Filter by site URI" title="filter-by-site" width="361" height="28" class="size-full wp-image-308" /></a><p class="wp-caption-text">Filter by site URI</p></div></p>
<h3>Ask some more questions&#8230;</h3>
<ul>
<li>
		Are my visitors browsing or just searching?</p>
<ul>
<li>When I&#8217;m on the eBay homepage, I generally just start searching and ignore all the content on the page.  Are your visits doing this?</li>
</ul>
</li>
<li>
		Do visitors search from particular pages?</p>
<ul>
<li>If so, what are the search terms? Should these be included on, or linked to from these pages?</li>
</ul>
</li>
</ul>
<h2>To Conclude</h2>
<p>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.    </p>
<p>These tips are really only the a small part of what analytics has to offer.   I&#8217;d encourage you to learn more  and let me know how you get on.</p>
<h3>Further reading/viewing</h3>
<ul>
<li><a href="http://www.google.com/support/conversionuniversity/?hl=en">Google Analytics Conversion University</a></li>
<li><a href="http://www.youtube.com/watch?v=m4RaGKwvMbY&#038;feature=related">Internal Site Search Analysis and Visitor Intent</a> &#8211; video by Avinash Kaushik (<a href="http://twitter.com/avinashkaushik">@avinashkaushik</a>)</li>
<li><a href="http://www.rosenfeldmedia.com/books/searchanalytics/">Search Analytics</a> book by Louis Rosenfeld (<a href="http://twitter.com/louisrosenfeld">@louisrosenfeld</a>) and Marko Hurst</li>
<li><a href="http://semphonic.blogs.com/semangel/2007/04/web_analytics_t.html">Web Analytics ToolKit and Internal Search</a></li>
<li><a href="http://www.kaushik.net/avinash/2007/10/kick-butt-with-internal-site-search-analytics.html">Kick Butt With Internal Site Search Analytics</a> &#8211; Avinash Kaushik</li>
</ul>
<p><strong>Please note:</strong> We&#8217;ve not had GA tracking Confluence for very long, so there are some empty results for the start of the month.<br />
I&#8217;ve used <a href="http://getfirebug.com/">Firebug</a> to pretend we&#8217;re looking at the analytics reports for <a href="http://confluence.atlassian.com/">Atlassian&#8217;s own installation of Confluence</a></p>

]]></content:encoded>
			<wfw:commentRss>http://davidsimpson.me/2009/04/16/4-useful-tips-on-google-analytics-reporting-for-confluence/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Verdana must die for the good of the planet</title>
		<link>http://davidsimpson.me/2009/03/23/verdana-must-die-for-the-good-of-the-planet/</link>
		<comments>http://davidsimpson.me/2009/03/23/verdana-must-die-for-the-good-of-the-planet/#comments</comments>
		<pubDate>Mon, 23 Mar 2009 14:09:52 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Uncategorised]]></category>
		<category><![CDATA[environment]]></category>
		<category><![CDATA[Readability]]></category>
		<category><![CDATA[typography]]></category>

		<guid isPermaLink="false">http://davidsimpson.me/?p=259</guid>
		<description><![CDATA[
If you&#8217;re using the Verdana typeface in your printed documents, stop now.  
There is no need and it is helping destroy the planet. 
Verdana takes up about 19% more horizontal space than Arial.  So a switch away from Verdana could reduce your paper costs by up to 19%.  For further savings, switch [...]]]></description>
			<content:encoded><![CDATA[
<p>If you&#8217;re using the Verdana typeface in your printed documents, <strong>stop now</strong>.  </p>
<p>There is no need and it is helping destroy the planet. </p>
<p>Verdana takes up about 19% more horizontal space than Arial.  So a switch away from Verdana could reduce your paper costs by up to 19%.  For further savings, switch to duplex printing at the same time.</p>
<p>If you need a font designed for readability, try the granddaddy of readable fonts &#8211; Helvetica &#8211; or at a pinch Arial.<br />
<span id="more-259"></span><br />
Back in the olden days of the interweb, we didn&#8217;t have nice big screens with fantastical resolutions.  We didn&#8217;t have nicely anti-aliased, easily readable text.  To fit enough information on a small screen, the fonts used were blocky and tiny.  At small font sizes, text displayed in Arial typeface would huddle together and become difficult to read.  Not Verdana, with it&#8217;s &#8220;generous width and spacing&#8221;.  It was open and easy to read.  Soon everyone wanted a bit of the action.  All the sans-serif web pages started using Verdana it spread like a virus.</p>
<p>Roll forward to the present and it seems that 1200 pixels is now the minimum screen width that people have.  With larger screens, the font can be larger and so easier to read. We no longer need such generosity in our width and spacing.  A return to <a href="http://www.designingwithtype.com/cooper0/index.html">classic typography</a> is due.</p>
<h2>Actions</h2>
<p>To make a difference, check through the list below and help eradicate Verdana font from the planet.</p>
<ol>
<li>
<h3>Do not use Verdana in your web pages</h3>
<ul>
<li>
				Simply don&#8217;t use it.  Replace it with Helvetica or it&#8217;s bastard offspring Arial
			</li>
<li>Educate your clients why its bad</li>
<li>
				Change corporate identity guidelines.  If you really, really, really, really have to use it on a website, have a print stylesheet which uses something else more elegant</p>
<p>			Here&#8217;s how to add a separate print stylesheet:</p>
<pre class="brush: xml;">
			&lt;link rel=&quot;stylesheet&quot; href=&quot;/print.css&quot; type=&quot;text/css&quot; media=&quot;print&quot;  /&gt;
			</pre>
<p>			Here&#8217;s the basic content for <strong>print.css</strong>:</p>
<pre class="brush: css;">
			body { font-family: helvetica, arial, sans-serif; }
			</pre>
<p>			Helvetica before Arial please.  That&#8217;s the correct order.
			</li>
</ul>
</li>
<li>
<h3>Do not use Verdana in reports, presentations etc</h3>
<p>		Verdana was designed as a screen font for small displays.  It just doesn&#8217;t look good in printed material or displayed big on projectors. </p>
</li>
<li>
<h3>Remove it from your computer</h3>
<ul>
<li>Remove it from your computer</li>
<li>Remove it from all computers in your organisation</li>
<li>Make sure that your base install image for new PCs in your organisation does not have the Verdana font included.</li>
</ul>
</li>
</ol>
<h2>Further Reading</h2>
<ul>
<li><a href="http://www.xs4all.nl/~sbpoley/webmatters/verdana.html">Web Matters &#8211; Why you should avoid Verdana</a></li>
<li><a href="http://www.wilsonweb.com/wmt6/html-email-fonts.htm">Text Font Readability Study</a></li>
<li><a href="http://www.microsoft.com/typography/web/fonts/verdana/default.htm">Channel Verdana</a></li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://davidsimpson.me/2009/03/23/verdana-must-die-for-the-good-of-the-planet/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
	</channel>
</rss>
