<?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 &#187; Uncategorised</title>
	<atom:link href="http://davidsimpson.me/category/uncategorised/feed/" rel="self" type="application/rss+xml" />
	<link>http://davidsimpson.me</link>
	<description>Developing the web, one page at a time.</description>
	<lastBuildDate>Thu, 02 Feb 2012 13:02:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>More flexible commenting in Atlassian&#8217;s Confluence</title>
		<link>http://davidsimpson.me/2011/01/23/more-flexible-commenting-in-atlassians-confluence/</link>
		<comments>http://davidsimpson.me/2011/01/23/more-flexible-commenting-in-atlassians-confluence/#comments</comments>
		<pubDate>Sun, 23 Jan 2011 01:10:19 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Uncategorised]]></category>

		<guid isPermaLink="false">http://davidsimpson.me/?p=926</guid>
		<description><![CDATA[Confluence users often ask me how the Confluence permissions model works. A reoccurring theme is the ability (or lack thereof) to selectively show or hide comments in a space on an ad-hoc basis. The current feature set of Confluence allows you to either enable or disable comments on a per space basis. For some users [...]]]></description>
			<content:encoded><![CDATA[<div id="tweetbutton926" class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fdavidsimpson.me%2F2011%2F01%2F23%2Fmore-flexible-commenting-in-atlassians-confluence%2F&amp;text=More%20flexible%20commenting%20in%20Atlassian%26%238217%3Bs%20Confluence&amp;related=&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fdavidsimpson.me%2F2011%2F01%2F23%2Fmore-flexible-commenting-in-atlassians-confluence%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://davidsimpson.me/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;"></a></div><p>Confluence users often ask me how the <a href="http://confluence.atlassian.com/display/DOC/Permissions+Overview">Confluence permissions model</a> works.  A reoccurring theme is the ability (or lack thereof) to selectively show or hide comments in a space on an ad-hoc basis.</p>
<p>The current feature set of Confluence allows you to either enable or disable comments on a per space basis.  For some users this can seem overly simplistic.  Though we don&#8217;t really want to change the way that Confluence works under the hood, perhaps we can give the appearance of a more granular commenting permissions model.  In this way, CSS can be used to show or hide the comments block.</p>
<p>There are 2 ways of approaching this problem.<span id="more-926"></span></p>
<ol>
<li>Enabling comments  in a space and then selectively &#8220;disabling comments&#8221;</li>
<li>&#8220;Disabling comments&#8221; in a space by default and then selectively &#8220;enabling comments&#8221;</li>
</ol>
<p>Either way works, but different people have different needs.  Choose whichever is appropriate.</p>
<p>This article requires a couple of user macros</p>
<p><strong>Hide Comments</strong></p>
<pre class="brush: xml; title: ;">
## User Macro hide-comments
## Usage: {hide-comments}
&lt;style type=&quot;text/css&quot;&gt;#com-atlassian-confluence #comments-section { display:none; } &lt;/style&gt;
</pre>
<p><strong>Show Comments</strong></p>
<pre class="brush: xml; title: ;">
## User Macro : show-comments
## Usage: {show-comments}
&lt;style type=&quot;text/css&quot;&gt;#com-atlassian-confluence #comments-section { display:block; }&lt;/style&gt;
</pre>
<h2>Enabling comments  in a space and then selectively &#8220;disabling comments&#8221;</h2>
<p>Simply add <code>{hide-comments}</code> to a page et voila &#8211; no commenting functionality is displayed</p>
<h2>&#8220;Disabling comments&#8221; in a space by default and then selectively &#8220;enabling comments&#8221;</h2>
<p>Edit the custom space stylesheet. Add this:</p>
<pre class="brush: xml; title: ;">
/* hide comments by default */
#com-atlassian-confluence #comments-section { display:none; }
</pre>
<p>On each page that you want to allow comments, add <code>{show-comments}</code>.  This overrides the CSS for <code>div#comments-section</code> allowing the commenting functionality to be displayed.</p>
<h3>For extra points</h3>
<p>If you&#8217;re using the Documentation theme, you can include a common footer to drive comments to a  single page within the space, e.g.</p>
<p>Add the following to the footer</p>
<pre>[Add a comment|Comments]</pre>
<p>Create a <strong>Comments</strong> page where your comments will all be amassed</p>
<p>On the comments page, add the user macro</p>
<pre>{show-comments}</pre>
<p>That&#8217;s it. With a sprinkling of CSS and some very simple user macros, we can effectively turn commenting on and off at will in a more granular manner.</p>
<!-- PHP 5.x -->]]></content:encoded>
			<wfw:commentRss>http://davidsimpson.me/2011/01/23/more-flexible-commenting-in-atlassians-confluence/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>What we really want to know about UK politics &#8211; Google Suggest reveals all</title>
		<link>http://davidsimpson.me/2010/05/13/what-we-really-want-to-know-uk-politics-google-suggest-results/</link>
		<comments>http://davidsimpson.me/2010/05/13/what-we-really-want-to-know-uk-politics-google-suggest-results/#comments</comments>
		<pubDate>Wed, 12 May 2010 23:09:42 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Uncategorised]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[politics]]></category>

		<guid isPermaLink="false">http://davidsimpson.me/?p=755</guid>
		<description><![CDATA[In light of the newly changed UK government and recent blogpost about Google Suggest, I thought I&#8217;d check the current state of the nation&#8217;s thoughts as predicted by Google UK. How? Type part of a sentence in the search form, then sit back and wait for the concerns of the people to be revealed. Are [...]]]></description>
			<content:encoded><![CDATA[<div id="tweetbutton755" class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fdavidsimpson.me%2F2010%2F05%2F13%2Fwhat-we-really-want-to-know-uk-politics-google-suggest-results%2F&amp;text=What%20we%20really%20want%20to%20know%20about%20UK%20politics%20%26%238211%3B%20Google%20Suggest%20reveals%20all&amp;related=&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fdavidsimpson.me%2F2010%2F05%2F13%2Fwhat-we-really-want-to-know-uk-politics-google-suggest-results%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://davidsimpson.me/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;"></a></div><p>In light of the newly changed UK government and <a href="http://www.lauralippay.com/blog/12-remarkable-google-suggest-results-what-americans-really-want-to-know/">recent blogpost</a> about Google Suggest, I thought I&#8217;d check the current state of the nation&#8217;s thoughts as predicted by <a href="http://www.google.co.uk/">Google UK</a>. </p>
<p>How? Type part of a sentence in the search form, then sit back and wait for the concerns of the people to be revealed.<br />
<span id="more-755"></span></p>
<h3>Are politicians&#8230;</h3>
<p>Celebrities? Psychopaths? Corrupt? Drug tested?</p>
<p><img src="http://davidsimpson.me/wp-content/uploads/2010/05/are-politicians-440x246.png" alt="are-politicians" title="are-politicians" width="440" height="246" class="alignright size-medium wp-image-762" /></p>
<p>&nbsp;</p>
<h3>Does David Cameron&#8230;</h3>
<p>Smoke? Dye his hair? Where does David Cameron go at night?</p>
<p><img src="http://davidsimpson.me/wp-content/uploads/2010/05/does-david-cameron-440x264.png" alt="does-david-cameron" title="does-david-cameron" width="440" height="264" class="alignright size-medium wp-image-761" /></p>
<p>&nbsp;</p>
<h3>Nick Clegg</h3>
<p>Atheist. 30 women. Nuff said.</p>
<p><img src="http://davidsimpson.me/wp-content/uploads/2010/05/nick-clegg-440x264.png" alt="nick-clegg" title="nick-clegg" width="440" height="264" class="alignright size-medium wp-image-763" /></p>
<p>&nbsp;</p>
<h3>Is Gordon Brown&#8230;</h3>
<p>A freemason? A liar? <em>And erm, some others</em></p>
<p><img src="http://davidsimpson.me/wp-content/uploads/2010/05/is-gordon-brown-440x265.png" alt="is-gordon-brown" title="is-gordon-brown" width="440" height="265" class="alignright size-medium wp-image-760" /></p>
<p>&nbsp;</p>
<h3>Is Parliament&#8230;</h3>
<p>Effective? Democratic? Now an irrelevant institution?</p>
<p><img src="http://davidsimpson.me/wp-content/uploads/2010/05/is-parliament-440x265.png" alt="is-parliament" title="is-parliament" width="440" height="265" class="alignright size-medium wp-image-764" /></p>
<p>&nbsp;</p>
<h3>Is the treasury&#8230;</h3>
<p>Printing money?<br />
<img src="http://davidsimpson.me/wp-content/uploads/2010/05/is-the-treasury-440x96.png" alt="is-the-treasury" title="is-the-treasury" width="440" height="96" class="alignright size-medium wp-image-756" /></p>
<p>&nbsp;</p>
<h3>Is the government&#8230;</h3>
<p>Hiding aliens? Making you fat? Watching my computer?<br />
<img src="http://davidsimpson.me/wp-content/uploads/2010/05/is-the-government-440x266.png" alt="is-the-government" title="is-the-government" width="440" height="266" class="alignright size-medium wp-image-758" /></p>
<p>&nbsp;</p>
<h3>Do government&#8230;</h3>
<p>Assassins exist? Officials pay taxes?<br />
<img src="http://davidsimpson.me/wp-content/uploads/2010/05/do-government-440x265.png" alt="do-government" title="do-government" width="440" height="265" class="alignright size-medium wp-image-757" /></p>
<p>&nbsp;</p>
<h3>Does democracy&#8230;</h3>
<p>Work? Exist? Encourage terrorism?<br />
<img src="http://davidsimpson.me/wp-content/uploads/2010/05/does-democracy-440x264.png" alt="does-democracy" title="does-democracy" width="440" height="264" class="alignright size-medium wp-image-759" /></p>
<p>&nbsp;</p>
<!-- PHP 5.x -->]]></content:encoded>
			<wfw:commentRss>http://davidsimpson.me/2010/05/13/what-we-really-want-to-know-uk-politics-google-suggest-results/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Meta tags are your friend part 1: Tracking roles in Sungard Luminis with Google Analytics</title>
		<link>http://davidsimpson.me/2010/04/08/meta-tags-are-your-friend-part-tracking-roles-in-sungard-luminis-with-google-analytics/</link>
		<comments>http://davidsimpson.me/2010/04/08/meta-tags-are-your-friend-part-tracking-roles-in-sungard-luminis-with-google-analytics/#comments</comments>
		<pubDate>Thu, 08 Apr 2010 14:57:23 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Uncategorised]]></category>
		<category><![CDATA[google analytics]]></category>
		<category><![CDATA[luminis]]></category>
		<category><![CDATA[sungardhe]]></category>
		<category><![CDATA[university of nottingham]]></category>

		<guid isPermaLink="false">http://davidsimpson.me/?p=668</guid>
		<description><![CDATA[At work, we use Sungard HE&#8216;s Luminis portal (v3.3) &#8212; It&#8217;s been good to us over the years, but there&#8217;s a lack of usage information regarding users&#8217; roles and their interactions with Luminis. In the past, we&#8217;ve added Google Analytics to Luminis to track the interactions, but never managed to fully segment user roles. Until [...]]]></description>
			<content:encoded><![CDATA[<div id="tweetbutton668" class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fdavidsimpson.me%2F2010%2F04%2F08%2Fmeta-tags-are-your-friend-part-tracking-roles-in-sungard-luminis-with-google-analytics%2F&amp;text=Meta%20tags%20are%20your%20friend%20part%201%3A%20Tracking%20roles%20in%20Sungard%20Luminis%20with%20Google%20Analytics&amp;related=&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fdavidsimpson.me%2F2010%2F04%2F08%2Fmeta-tags-are-your-friend-part-tracking-roles-in-sungard-luminis-with-google-analytics%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://davidsimpson.me/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;"></a></div><p>At work, we use <a href="http://www.sungardhe.com/">Sungard HE</a>&#8216;s Luminis portal (v3.3) &mdash; It&#8217;s been good to us over the years, but there&#8217;s a lack of usage information regarding users&#8217; roles and their interactions with Luminis.  </p>
<p>In the past, <a href="http://davidsimpson.me/2009/02/27/google-analytics-and-sungardhe-luminis/">we&#8217;ve added Google Analytics to Luminis</a> to track the interactions, but never managed to fully segment user roles. Until now.</p>
<p>Out of the box, Luminis has roles such as staff, student, faculty, ProspectiveStudent etc.  Users can have one or more of these roles and other custom roles too.  If we could capture all the roles and pass them onto Google Analytics, then we&#8217;d be able to fully segment the user types and gain a better understanding of how each segment uses Luminis.</p>
<p>This post aims to show how this is possible in just 3 steps:</p>
<ol>
<li><b>XSL:</b> Edit nested-tables.xsl to add a custom meta tag for the luminis roles</li>
<li><b>Javascript/jQuery:</b> Read the custom meta tag and set a custom variable in Google Analytics</li>
<li><b>Google Analytics:</b> Create custom segments to view traffic for specific Luminis roles</li>
</ol>
<p><span id="more-668"></span></p>
<h2>Edit nested-tables.xsl and add a custom meta tag to the header</h2>
<p>We&#8217;ve seriously hacked at nested-tables.xsl over the years, so our version of the file is likely to be different to most.  The main aim here is to find the html &gt; head  section and add a custom meta tag:</p>
<pre class="brush: plain; title: ;">
&lt;!-- Dump all roles into a single meta tag as a comma separated value --&gt;
&lt;meta name=&quot;luminis.role&quot;&gt;
   	&lt;xsl:attribute name=&quot;content&quot;&gt;
		&lt;xsl:for-each select=&quot;//layout/cp:cpInfo/cp:cpProperty[@name='pdsRole']/child::*&quot;&gt;
			&lt;xsl:value-of select=&quot;concat(., ',')&quot; /&gt;
   		&lt;/xsl:for-each&gt;
   	&lt;/xsl:attribute&gt;
&lt;/meta&gt;
</pre>
<h2>Read the custom meta tag and set a custom variable in Google Analytics</h2>
<p>Our implementation of Google Analytics is a little complex, but this example I&#8217;ve based on the standard Google Analytics example code.   </p>
<p>Using Javascript (infused with jQuery in our case), we can read the custom meta tag and set a custom variable. </p>
<pre class="brush: jscript; title: ;">
&lt;script type=&quot;text/javascript&quot;&gt;
var gaJsHost = ((&quot;https:&quot; == document.location.protocol) ? &quot;https://ssl.&quot; : &quot;http://www.&quot;);
document.write(unescape(&quot;%3Cscript src='&quot; + gaJsHost + &quot;google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E&quot;));
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;

	window.onload = function(){
		try
		{
			var pageTracker = _gat._getTracker(&quot;UA-XXXXX-XX&quot;);

			if (typeof $('meta[name=luminis.role]').attr(&quot;content&quot;) == 'string')
			{
				pageTracker._setCustomVar(
				     1,                                                // This custom var is set to slot #1 of the 5 available in GA
				     &quot;luminis.role&quot;,                                   // The name acts as a kind of category for the user activity
				     ','+$('meta[name=luminis.role]').attr(&quot;content&quot;), // The value of the custom variable (starting with a comma)
				     2                                                 // Sets the scope to session-level
				);
			}
			pageTracker._trackPageview();
		}
		catch (err) {}
	}

&lt;/script&gt;
</pre>
<p>According to the <a href="http://code.google.com/apis/analytics/docs/tracking/gaTrackingCustomVariables.html#sessionLevel">documentation</a>, it&#8217;s important to set the custom variable before tracking the page view.	</p>
<h2>Create custom segments to view traffic for specific Luminis roles</h2>
<p>Sign in to Google Analytics and view your normal website reports.<br />
Click on <b>Advanced segments | Create a new advanced segment</b></p>
<p>Create a new segment where&#8230;<br />
<b>Custom variable (Value 1)</b> contains <b>,staff,</b><br />
AND<br />
<b>Custom variable (Value 1)</b> contains <b>,faculty,</b></p>
<p>Note the surrounding commas &#8211; we&#8217;re using them as role delimiters.</p>
<p>Give the segment a name e.g. &#8220;Luminis roles: staff AND faculty&#8221;"</p>
<p><a href="http://localhost/davidsimpson.me/wp-content/uploads/2010/04/create-custom-segment.png" rel="lightbox[668]" title="Create  custom segment"><img src="http://davidsimpson.me/wp-content/uploads/2010/04/create-custom-segment-419x440.png" alt="Create  custom segment" title="Create  custom segment" width="419" height="440" class="size-medium wp-image-674" /></a></p>
<h2>All done, but have patience</h2>
<p>Your custom segment is now available from the advanced segment drop-down:</p>
<p><img src="http://localhost/davidsimpson.me/wp-content/uploads/2010/04/select-custom-segment.png" alt="select-custom-segment" title="Select advanced segment" width="316" height="41" class="wp-image-675" /></p>
<p>Custom variables seem to take longer to filter through to Google Analytics than normal data such as page views.  So come back in a couple of days and try out your new advanced segment.</p>
<p><b>Update (12 April 2010):</b><br />
Shortly after I published this post, the Google Analytics blog posted their <a href="http://analytics.blogspot.com/2010/04/custom-variables-webinar-available-for.html">webinar on Google Analytics custom variables</a>.</p>
<p>Also, if you&#8217;re interested in creating advanced segments from custom variables, I&#8217;ve posted a<a href="http://www.youtube.com/watch?v=gOBoqG7LNLc">youtube video that steps through the process</a>.</p>
<!-- PHP 5.x -->]]></content:encoded>
			<wfw:commentRss>http://davidsimpson.me/2010/04/08/meta-tags-are-your-friend-part-tracking-roles-in-sungard-luminis-with-google-analytics/feed/</wfw:commentRss>
		<slash:comments>5</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 from: No [...]]]></description>
			<content:encoded><![CDATA[<div id="tweetbutton503" class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fdavidsimpson.me%2F2010%2F01%2F25%2Fsome-thoughts-on-developing-my-first-confluence-plugin%2F&amp;text=Some%20thoughts%20on%20developing%20my%20first%20Confluence%20plugin&amp;related=&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fdavidsimpson.me%2F2010%2F01%2F25%2Fsome-thoughts-on-developing-my-first-confluence-plugin%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://davidsimpson.me/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;"></a></div><p><img class="alignnone" title="ga-idea" src="/wp-content/uploads/2010/01/ga-idea2.png" alt="ga-idea" /></p>
<p><!-- Some thoughts on developing my first Confluence plugin  or A bluffer's guide to developing Confluence plugins --></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:</p>
<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 — 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; title: ;">
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; title: ;">
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&#8230;</p>
<pre class="brush: bash; title: ;">cd googleanalytics
atlas-run</pre>
<p>&#8230;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 class="aligncenter size-medium wp-image-525" title="Beer" src="/wp-content/uploads/2010/01/iStock_000009660877XSmall.jpg" alt="Beer" width="440" height="175" /></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><strong>I like to run before I can walk.</strong> 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><strong>Add Google Analytics JARs to maven:</strong></p>
<pre class="brush: bash; title: ;">
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><strong>Edit the Project Object Model (POM) to add the dependencies</strong></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; title: ;">
&lt;!-- Add Google Analytics dependencies: --&gt;

       com.google.gdata
       gdata-core
       1.0

       com.google.gdata
       gdata-analytics
       2.0

	com.google.collect
	google-collect
	1.0
</pre>
<p><strong>Next, fire up your IDE</strong></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; title: ;">
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 — <a href="http://www.redleopard.com/2009/04/macroman-encoding-creeps-into-maven/">Red Leopard</a> — and it&#8217;s easily fixed by editing the POM to add the correct encoding.</p>
<pre class="brush: xml; title: ;">
3.0.2
    3.0

    &lt;!-- Fix for MacRoman warnings on build --&gt;
    UTF-8
    UTF-8
</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://localhost/davidsimpson.me/wp-content/uploads/2010/01/macro-browser1.png" rel="lightbox[503]" title="macro-browser"><img class="size-medium wp-image-521" title="macro-browser" src="http://davidsimpson.me/wp-content/uploads/2010/01/macro-browser1.png" alt="The macro browser icon: What we're aiming for"  /></a><p class="wp-caption-text">The macro browser icon: What we</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 — 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 />
<strong>Note:</strong> 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>
<p><strong>Update (2010-05-04):</strong> A nice feature of the SDK is running or testing your plugin against different versions of the product.  This is straightforward:</p>
<pre class="brush: bash; title: ;">
# Integration tests for different versions
atlas-integration-test -v 3.0
atlas-integration-test -v 3.1
atlas-integration-test -v 3.2
# Run different versions of Confluence
atlas-run -v 3.0
atlas-run -v 3.1
atlas-run -v 3.2
</pre>
<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 — 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>
<!-- PHP 5.x -->]]></content:encoded>
			<wfw:commentRss>http://davidsimpson.me/2010/01/25/some-thoughts-on-developing-my-first-confluence-plugin/feed/</wfw:commentRss>
		<slash:comments>6</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 with simple [...]]]></description>
			<content:encoded><![CDATA[<div id="tweetbutton367" class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fdavidsimpson.me%2F2009%2F10%2F16%2Fa-simpler-way-to-view-attachments-in-confluence%2F&amp;text=A%20simpler%20way%20to%20view%20attachments%20in%20Confluence&amp;related=&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fdavidsimpson.me%2F2009%2F10%2F16%2Fa-simpler-way-to-view-attachments-in-confluence%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://davidsimpson.me/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;"></a></div><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 <span style="text-decoration: line-through;">needless</span> words&#8221;.  In this case, it&#8217;s more of &#8220;Omit <span style="text-decoration: line-through;">needless</span> 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 <strong>Confluence Admin | User Macros</strong> and click on <strong>Create a User Macro</strong>.</p>
<p>Macro name: <strong>list-attachments</strong></p>
<p>Template:</p>
<pre class="brush: plain; title: ;">
## MACRO: list-attachments
## Updated: 2011-03-15
## View page attachments in a simple list
## USAGE: {list-attachments}

##applyDecorator(&quot;page&quot;)
	#set ($attachmentsList = $content.getLatestVersionsOfAttachments())
    ##&lt;div class=&quot;listAttachmentsDiv&quot;&gt;
        #if ($attachmentsList.size() &gt; 0)
			&lt;ul&gt;
		        #foreach( $attachment in $attachmentsList )
			        #set ($currentAttachmentId = $attachment.id)
					#if ($attachment.comment &amp;&amp; $attachment.comment.trim().length() &gt; 0)
						## Display the comment as the link text instead of the filename
						&lt;li&gt;&lt;a href=&quot;$generalUtil.htmlEncode(&quot;${req.contextPath}${attachment.downloadPathWithoutVersion}&quot;)&quot;&gt;$generalUtil.htmlEncode($attachment.comment)&lt;/a&gt;&lt;/li&gt;
					#else
						## Display the filename as the link text
						&lt;li&gt;&lt;a href=&quot;$generalUtil.htmlEncode(&quot;${req.contextPath}${attachment.downloadPathWithoutVersion}&quot;)&quot;&gt;$generalUtil.htmlEncode($attachment.fileName)&lt;/a&gt;&lt;/li&gt;
					#end
			    #end
			&lt;/ul&gt;
		#end
	##&lt;/div&gt;
##end
</pre>
<p>Accept the defaults for the other fields, then click on <strong>Save</strong></p>
<p>To call the macro in the page type: <strong>{list-attachments}</strong></p>
<p>The result:<br />
<img src="/wp-content/uploads/2009/10/list-attachments-example1.png" alt="" title="list-attachments-example" /></p>
<p>Now you&#8217;re left with a simple list of links &mdash; much purer than a big fat table of metadata.</p>
<h3>For extra points (Updated 2011-03-15)</h3>
<p>If you&#8217;ve got a might great slab of files attached to the Confluence page,  why not wrap this usermacro in the <a href="https://plugins.atlassian.com/plugin/details/31712">azList macro</a>:</p>
<pre>{azlist}{list-attachments}{azlist}</pre>
<p>The result:<br />
<img src="/wp-content/uploads/2009/10/list-attachments-extra-points.png" alt="" title="list-attachments-extra-points" /></p>
<!-- PHP 5.x -->]]></content:encoded>
			<wfw:commentRss>http://davidsimpson.me/2009/10/16/a-simpler-way-to-view-attachments-in-confluence/feed/</wfw:commentRss>
		<slash:comments>20</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. [...]]]></description>
			<content:encoded><![CDATA[<div id="tweetbutton356" class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fdavidsimpson.me%2F2009%2F09%2F11%2Fusing-the-google-analytics-javascript-api-to-show-pageviews-from-atlassian-confluence%2F&amp;text=Using%20the%20Google%20Analytics%20Javascript%20API%20to%20show%20pageviews%20from%20Atlassian%20Confluence&amp;related=&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fdavidsimpson.me%2F2009%2F09%2F11%2Fusing-the-google-analytics-javascript-api-to-show-pageviews-from-atlassian-confluence%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://davidsimpson.me/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;"></a></div><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>
<!-- PHP 5.x -->]]></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[<div id="tweetbutton335" class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fdavidsimpson.me%2F2009%2F06%2F04%2Fadding-custom-segments-to-google-analytics%2F&amp;text=Adding%20custom%20segments%20to%20Google%20Analytics&amp;related=&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fdavidsimpson.me%2F2009%2F06%2F04%2Fadding-custom-segments-to-google-analytics%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://davidsimpson.me/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;"></a></div><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>
<!-- PHP 5.x -->]]></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>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 to duplex printing [...]]]></description>
			<content:encoded><![CDATA[<div id="tweetbutton259" class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fdavidsimpson.me%2F2009%2F03%2F23%2Fverdana-must-die-for-the-good-of-the-planet%2F&amp;text=Verdana%20must%20die%20for%20the%20good%20of%20the%20planet&amp;related=&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fdavidsimpson.me%2F2009%2F03%2F23%2Fverdana-must-die-for-the-good-of-the-planet%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://davidsimpson.me/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;"></a></div><p><img src="/wp-content/uploads/2010/03/101px-VerdanaSpecimen.svg_.png" alt="101px-VerdanaSpecimen.svg" title="101px-VerdanaSpecimen.svg" align="right" /><br />
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; title: ;">
			&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; title: ;">
			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>
<li><a href="http://www.zeldman.com/2010/04/18/verdana-pro-and-con-2/">Verdana Pro (And Con)</a> by Jeffery Zeldman <i>(added 2011-06-09)</i></li>
</ul>
<!-- PHP 5.x -->]]></content:encoded>
			<wfw:commentRss>http://davidsimpson.me/2009/03/23/verdana-must-die-for-the-good-of-the-planet/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Confluence Snippet: User Activity Report</title>
		<link>http://davidsimpson.me/2009/03/20/confluence-snippet-user-activity-report/</link>
		<comments>http://davidsimpson.me/2009/03/20/confluence-snippet-user-activity-report/#comments</comments>
		<pubDate>Fri, 20 Mar 2009 09:16:48 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Uncategorised]]></category>
		<category><![CDATA[confluence]]></category>

		<guid isPermaLink="false">http://davidsimpson.me/?p=239</guid>
		<description><![CDATA[Want to know who are the most active users on your Confluence wiki this week? This wiki markup snippet should help. It tabulates: Overall activity Page creations Page Updates Page views Page Popularity h1. This Week's Wiki User Activity Charts&#60;/code&#62; &#160; h2. Overall &#160; {topusers:spaces=@all&#124;timespan=1w&#124;period=weekly&#124;events=create,update,view&#124;display=icon,title,count} &#160; h2. Breakdown &#60;code&#62; &#124;&#124; Page Creation &#124;&#124; Page Updates [...]]]></description>
			<content:encoded><![CDATA[<div id="tweetbutton239" class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fdavidsimpson.me%2F2009%2F03%2F20%2Fconfluence-snippet-user-activity-report%2F&amp;text=Confluence%20Snippet%3A%20User%20Activity%20Report&amp;related=&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fdavidsimpson.me%2F2009%2F03%2F20%2Fconfluence-snippet-user-activity-report%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://davidsimpson.me/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;"></a></div><p>Want to know who are the most active users on your Confluence wiki this week?</p>
<p>This wiki markup snippet should help. It tabulates:</p>
<ul>
<li>Overall activity</li>
<li>Page creations</li>
<li>Page Updates</li>
<li>Page views</li>
<li>Page Popularity</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">h1. This Week's Wiki User Activity Charts&lt;/code&gt;
&nbsp;
h2. Overall
&nbsp;
{topusers:spaces=@all|timespan=1w|period=weekly|events=create,update,view|display=icon,title,count}
&nbsp;
h2. Breakdown
&lt;code&gt;
|| Page Creation || Page Updates || Page Views || Page Popularity ||
| {topusers:spaces=@all|timespan=1w|period=weekly|events=create|display=icon,title,count} | {topusers:spaces=@all|timespan=1w|period=weekly|events=update|display=icon,title,count} | {topusers:spaces=@all|timespan=1w|period=weekly|events=view|display=icon,title,count} | {popular:spaces=@all|timespan=1w|period=weekly|events=view|display=icon,title,count} |</pre></div></div>

<p><span id="more-239"></span></p>
<h2>Results</h2>
<p>Here&#8217;s a screenshot of the resulting page &#8211; complete with made up names.</p>
<div id="attachment_248" class="wp-caption alignnone" style="width: 310px"><a href="/wp-content/uploads/2009/03/picture-4.png" rel="lightbox[239]" title="Confluence - Activity Monitor"><img src="/wp-content/uploads/2009/03/picture-4-300x220.png" alt="Monitor page creations, views, updates and popular pages " title="Confluence - Activity Monitor" width="300" height="220" class="size-medium wp-image-248" /></a><p class="wp-caption-text">Monitor page creations, views, updates and popular pages </p></div>
<p><strong>Please note:</strong> Building this page can be rather resource intensive as it queries pretty much the whole database to generate the statistics shown!</p>
<h2>Related</h2>
<ul>
<li><a href="http://www.thecrumb.com/2009/03/13/confluence-whos-updating-what/trackback/">Confluence: Who’s Updating What? &#8211; Email notification</a></li>
</ul>
<!-- PHP 5.x -->]]></content:encoded>
			<wfw:commentRss>http://davidsimpson.me/2009/03/20/confluence-snippet-user-activity-report/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Tracking Atlassian Confluence usage with Google Analytics</title>
		<link>http://davidsimpson.me/2009/03/18/tracking-atlassian-confluence-usage-with-google-analytics/</link>
		<comments>http://davidsimpson.me/2009/03/18/tracking-atlassian-confluence-usage-with-google-analytics/#comments</comments>
		<pubDate>Wed, 18 Mar 2009 17:45:56 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[analytics]]></category>
		<category><![CDATA[Uncategorised]]></category>
		<category><![CDATA[atlassian]]></category>
		<category><![CDATA[confluence]]></category>
		<category><![CDATA[google analytics]]></category>
		<category><![CDATA[wiki]]></category>

		<guid isPermaLink="false">http://davidsimpson.me/?p=177</guid>
		<description><![CDATA[Updated 2011-06-30: Changed to asynchronous Google Analytics tracking You&#8217;ve chosen Confluence as your Enterprise wiki and got it installed. People are using it. But how many people? You could have a look at the Global Activity page on Confluence, but this might confuse matters. You&#8217;ll get to see graphs, but what do they really mean? [...]]]></description>
			<content:encoded><![CDATA[<div id="tweetbutton177" class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fdavidsimpson.me%2F2009%2F03%2F18%2Ftracking-atlassian-confluence-usage-with-google-analytics%2F&amp;text=Tracking%20Atlassian%20Confluence%20usage%20with%20Google%20Analytics&amp;related=&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fdavidsimpson.me%2F2009%2F03%2F18%2Ftracking-atlassian-confluence-usage-with-google-analytics%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://davidsimpson.me/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;"></a></div><p><strong>Updated 2011-06-30: Changed to asynchronous Google Analytics tracking</strong><br />
You&#8217;ve chosen <a href="http://www.atlassian.com/software/confluence/">Confluence</a> as your Enterprise wiki and got it installed.  People are using it.  But how many people?</p>
<p>You could have a look at the <strong>Global Activity</strong> page on Confluence, but this might confuse matters.  </p>
<p><a href="/wp-content/uploads/2009/03/confluence-global-activity1.png" rel="lightbox[177]" title="Confluence - Global Activity"><img src="http://davidsimpson.me/wp-content/uploads/2009/03/confluence-global-activity1-284x300.png" alt="" title="Confluence - Global Activity" width="284" height="300" class="alignnone size-medium wp-image-217" /></a></p>
<p>You&#8217;ll get to see graphs, but what do they really mean?  The Global Activity statistics are at best very basic.</p>
<p>Better still, install Google Analytics and you&#8217;ll have a much more accurate idea of what&#8217;s going on.  Best of all, it&#8217;s really easy to install.<br />
<span id="more-177"></span></p>
<h2>How to install Google Analytics on Confluence</h2>
<p>I&#8217;m assuming (for my sake) that you already know your way around Google Analytics.</p>
<h3>In Google Analytics</h3>
<p>Login to Google Analytics and add a new website profile</p>
<p>The settings will roughly mirror those in the screenshot below</p>
<p><a href="/wp-content/uploads/2009/03/google-analytics-account-settings.png" rel="lightbox[177]" title="Google Analytics - Account Settings"><img src="/wp-content/uploads/2009/03/google-analytics-account-settings-300x279.png" alt="" title="Google Analytics - Account Settings" width="300" height="279" class="alignnone size-medium wp-image-204" /></a></p>
<p>Make sure that you check &#8220;Do Track Site Search&#8221; against Site Search.  Add <strong>queryString</strong> as the Query Parameter. This will allow you to monitor who is searching for what.  </p>
<p><strong>Update (2009-11-12)</strong><br />
<em>Edit the Search Settings configuration like in the image to see search terms grouped by spaceKey in the internal search categories reports.  Further details why can be seen <a href="http://davidsimpson.me/2009/04/16/4-useful-tips-on-google-analytics-reporting-for-confluence/">here</a></em> </p>
<p><!--***--><div id="attachment_306" class="wp-caption alignnone" style="width: 160px"><a href="/wp-content/uploads/2009/04/settings-site-search.png" rel="lightbox[177]" title="settings-site-search"><img src="/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>
<p>The top search terms will suggest either content that&#8217;s missing from the site, or something that is not easily found in the current information architecture.  Either way, tracking this and acting on the findings should improve the user experience.</p>
<h3>In Confluence</h3>
<p>Login to Confluence as an administrator and add the GA tracking javascript code to the end of the page body&#8230;</p>
<p>Navigate to:</p>
<p>Dashboard | Administration | Look and Feel | Custom HTML</p>
<p><a href="/wp-content/uploads/2009/03/confluence-custom-html-1.png" rel="lightbox[177]" title="Confluence - Custom HTML"><img src="/wp-content/uploads/2009/03/confluence-custom-html-1-150x150.png" alt="" title="Confluence - Custom HTML" width="150" height="150" class="alignnone size-thumbnail wp-image-203" /></a></p>
<p>Click on the &#8220;Edit&#8221; button and add the javascript sample (with your tracker code) to the &#8220;At end of the HEAD&#8221; section:</p>
<p><a href="/wp-content/uploads/2009/03/confluence-custom-html-2.png" rel="lightbox[177]" title="Confluence - Edit Custom HTML "><img src="/wp-content/uploads/2009/03/confluence-custom-html-2-150x150.png" alt="" title="Confluence - Edit Custom HTML " width="150" height="150" class="alignnone size-thumbnail wp-image-202" /></a></p>
<pre class="brush: jscript; title: ;">
&lt;script type=&quot;text/javascript&quot;&gt;
  // See: http://davidsimpson.me/2009/03/18/tracking-atlassian-confluence-usage-with-google-analytics/
  // Put this in Confluence Administration | Look and Feel | Custom HTML -- &quot;At end of the HEAD&quot;

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-XXXX-XX']); // Your GA code here
  _gaq.push(['_trackPageview']);

  // Add a page-level custom variable to record the space-key
  if (typeof jQuery('meta[name=confluence-space-key]').attr(&quot;content&quot;) == 'string') {
    _gaq.push(['_setCustomVar',
      1,                        // This custom var is set to slot #1 of 5
      'confluence-space-key',   // The name acts as a kind of category for the user activity
      jQuery('meta[name=confluence-space-key]').attr(&quot;content&quot;),  // This value of the custom variable
      3                         // Sets the scope to page-level
    ]);
  }

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

&lt;/script&gt;
</pre>
<h2>Results</h2>
<p>This works nicely, particularly as the custom variable allows us to easily track all space related content separately, and thus facilitate the use of the <a href="https://plugins.atlassian.com/plugin/details/16722">(Google) Analytics reporting plugin for Confluence</a>.</p>
<p>Screenshot of Content by Title report:<br />
<a href="/wp-content/uploads/2009/03/ga-results-content-by-title1.png" rel="lightbox[177]" title="Google Analytics Results - Content by Title"><img src="http://davidsimpson.me/wp-content/uploads/2009/03/ga-results-content-by-title1-300x231.png" alt="" title="Google Analytics Results - Content by Title" width="300" height="231" class="alignnone size-medium wp-image-211" /></a></p>
<p>Screenshot of Site Search Terms report:<br />
<a href="/wp-content/uploads/2009/03/ga-results-site-search.png" rel="lightbox[177]" title="Google Analytics Results - Site Search"><img src="http://davidsimpson.me/wp-content/uploads/2009/03/ga-results-site-search-300x141.png" alt="" title="Google Analytics Results - Site Search" width="300" height="141" class="alignnone size-medium wp-image-214" /></a></p>
<h3>Related Posts <small>(Updated)</small></h3>
<ul>
<li><a href="http://davidsimpson.me/2009/04/16/4-useful-tips-on-google-analytics-reporting-for-confluence/">4 Useful Tips on Google Analytics Reporting for Confluence</a></li>
<li><a href="http://davidsimpson.me/2010/01/02/announcing-google-analytics-plugin-for-confluence/">Announcing: Google Analytics plugin for Confluence</a></li>
<li><a href="http://www.bitvoodoo.ch/display/web/How+to+track+Confluence+usage+with+Google+Analytics">How to track Confluence usage with Google Analytics</a> by Remo Siegwart</li>
</ul>
<!-- PHP 5.x -->]]></content:encoded>
			<wfw:commentRss>http://davidsimpson.me/2009/03/18/tracking-atlassian-confluence-usage-with-google-analytics/feed/</wfw:commentRss>
		<slash:comments>37</slash:comments>
		</item>
	</channel>
</rss>

