<?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; confluence</title>
	<atom:link href="http://davidsimpson.me/tag/confluence/feed/" rel="self" type="application/rss+xml" />
	<link>http://davidsimpson.me</link>
	<description>Developing the web, one page at a time.</description>
	<lastBuildDate>Wed, 16 May 2012 20:14:56 +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>A better standard of cheese for your wiki</title>
		<link>http://davidsimpson.me/2012/05/08/a-better-standard-of-cheese-for-your-wiki/</link>
		<comments>http://davidsimpson.me/2012/05/08/a-better-standard-of-cheese-for-your-wiki/#comments</comments>
		<pubDate>Tue, 08 May 2012 20:19:36 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[cheese]]></category>
		<category><![CDATA[confluence]]></category>
		<category><![CDATA[localisation]]></category>
		<category><![CDATA[user macro]]></category>

		<guid isPermaLink="false">http://davidsimpson.me/?p=1539</guid>
		<description><![CDATA[Cheese can be a wonderful thing, but not all cheeses are created equal. For example Easy Cheese is filth, whereas Stinking Bishop is pure gold. The Cheese Macro in Confluence is great, but it&#8217;s a bit generic. It obviously wasn&#8217;t written with quality or localisation in mind. I find that it&#8217;s a bit too limited [...]]]></description>
			<content:encoded><![CDATA[<div id="tweetbutton1539" class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fdavidsimpson.me%2F2012%2F05%2F08%2Fa-better-standard-of-cheese-for-your-wiki%2F&amp;via=dvdsmpsn&amp;text=A%20better%20standard%20of%20cheese%20for%20your%20wiki&amp;related=&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fdavidsimpson.me%2F2012%2F05%2F08%2Fa-better-standard-of-cheese-for-your-wiki%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>Cheese can be a wonderful thing, but not all cheeses are created equal.</strong> For example <a href="http://en.wikipedia.org/wiki/Easy_Cheese">Easy Cheese</a> is filth, whereas <a href="http://en.wikipedia.org/wiki/Stinking_Bishop_cheese">Stinking Bishop</a> is pure gold.</p>
<p>The <a href="http://confluence.atlassian.com/display/DOC/Cheese+Macro">Cheese Macro</a> in Confluence is great, but it&#8217;s a bit generic. It obviously wasn&#8217;t written with quality or localisation in mind.  I find that it&#8217;s a bit too limited in scope for my needs.<br />
<span id="more-1539"></span><br />
To resolve this problem, I&#8217;ve created <strong>British Cheese</strong>, a user macro that celebrates the quality milk-based food products of the British Isles.</p>
<pre class="brush: plain; title: ;">
## Macro title: British Cheese
## Macro has a body: N
## Body processing: n/a
## Output: Selected output option
##
## Developed by: David Simpson &lt;david@davidsimpson.me&gt;
## Date created: 2012-05-08
## Installed by: My Name

## @param Type:title=Variety|type=enum|enumValues=Caerphilly,Cheddar,Cheshire,Cornish Yarg,Derby,Double Gloucester,Lancashire,Red Leicester,Shropshire Blue,Stilton,Wensleydale,White Stilton|default=Shropshire Blue|desc=Choose your favourite British cheese

#set ($url = $paramType.replaceAll(&quot; &quot;,&quot;&quot;).toLowerCase())

I love &lt;a href=&quot;http://www.britishcheese.com/${url}&quot;&gt;$paramType&lt;/a&gt;!
</pre>
<p>If you like this user macro but don&#8217;t agree that Britain produces the finest cheese on the planet, why not create your own localised version of it.  Maybe call it something like {käse} or {fromage}.</p>
<p><small>Photo credit: <a href="http://www.flickr.com/photos/26235325@N05/5176468736/">Stilton</a></small></p>
<!-- PHP 5.x -->]]></content:encoded>
			<wfw:commentRss>http://davidsimpson.me/2012/05/08/a-better-standard-of-cheese-for-your-wiki/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>On converting wiki markup based user macros for use with Confluence 4</title>
		<link>http://davidsimpson.me/2012/01/24/on-converting-wiki-markup-based-user-macros-for-use-with-confluence-4/</link>
		<comments>http://davidsimpson.me/2012/01/24/on-converting-wiki-markup-based-user-macros-for-use-with-confluence-4/#comments</comments>
		<pubDate>Tue, 24 Jan 2012 21:58:21 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[atlassian]]></category>
		<category><![CDATA[confluence]]></category>

		<guid isPermaLink="false">http://davidsimpson.me/?p=1392</guid>
		<description><![CDATA[Thomas Emil Hansen recently wrote How do I write a user macro with &#8220;sections&#8221; and &#8220;panels&#8221; using the 4.0 HTML template? With Confluence 4, the storage format has changed from traditional wiki markup to an XML based storage format. This means that all those old wiki-markup based user macros are now overdue some TLC. Luckily, [...]]]></description>
			<content:encoded><![CDATA[<div id="tweetbutton1392" class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fdavidsimpson.me%2F2012%2F01%2F24%2Fon-converting-wiki-markup-based-user-macros-for-use-with-confluence-4%2F&amp;via=dvdsmpsn&amp;text=On%20converting%20wiki%20markup%20based%20user%20macros%20for%20use%20with%20Confluence%204&amp;related=&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fdavidsimpson.me%2F2012%2F01%2F24%2Fon-converting-wiki-markup-based-user-macros-for-use-with-confluence-4%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="https://answers.atlassian.com/users/4750/thomas-emil-hansen/">Thomas Emil Hansen</a> recently wrote <a href="https://answers.atlassian.com/questions/27632/how-do-i-write-a-user-macro-with-sections-and-panels-using-the-4-0-html-template">How do I write a user macro with &#8220;sections&#8221; and &#8220;panels&#8221; using the 4.0 HTML template?</a></p>
<p>With Confluence 4, the storage format has changed from traditional wiki markup to an XML based storage format.  This means that all those old wiki-markup based user macros are now overdue some TLC.  Luckily, there&#8217;s always the &#8220;Insert Wiki Markup&#8221; dropdown in the Confluence editor to fall back on.</p>
<p>To convert your macro&#8230;</p>
<ol>
<li>Create a new page and use the &#8220;<b>Insert Wiki Markup</b>&#8221; function to add your wiki markup:
<pre class="brush: plain; title: ;">
{section}
  {column}
    $body
  {column}
  {column:width=300px}
    {panel}
      *Contents:*
      {toc:maxLevel=3}
    {panel}
  {column}
{section}
</pre>
</li>
<li>Save the page</li>
<li>From the <b>Tools</b> menu, select <b>View Storage Format</b>. This will give you:
<pre class="brush: xml; title: ;">
&lt;ac:macro ac:name=&quot;section&quot;&gt;
    &lt;ac:rich-text-body&gt;
        &lt;ac:macro ac:name=&quot;column&quot;&gt;
            &lt;ac:rich-text-body&gt;
                &lt;p&gt;$body&lt;/p&gt;
            &lt;/ac:rich-text-body&gt;
        &lt;/ac:macro&gt;
        &lt;ac:macro ac:name=&quot;column&quot;&gt;
            &lt;ac:parameter ac:name=&quot;width&quot;&gt;300px&lt;/ac:parameter&gt;
            &lt;ac:rich-text-body&gt;
                &lt;ac:macro ac:name=&quot;panel&quot;&gt;
                    &lt;ac:rich-text-body&gt;
                        &lt;p&gt;&lt;strong&gt;Contents:&lt;/strong&gt;&lt;/p&gt;
                        &lt;ac:macro ac:name=&quot;toc&quot;&gt;
                            &lt;ac:parameter ac:name=&quot;maxLevel&quot;&gt;3&lt;/ac:parameter&gt;
                        &lt;/ac:macro&gt;
                    &lt;/ac:rich-text-body&gt;
                &lt;/ac:macro&gt;
            &lt;/ac:rich-text-body&gt;
        &lt;/ac:macro&gt;
    &lt;/ac:rich-text-body&gt;
&lt;/ac:macro&gt;
</pre>
</li>
<li>Paste this into your user macro rather than the old-fangled wiki markup.</li>
<li>Repeat this procedure for all user macros you wish to convert.</li>
</ol>
<!-- PHP 5.x -->]]></content:encoded>
			<wfw:commentRss>http://davidsimpson.me/2012/01/24/on-converting-wiki-markup-based-user-macros-for-use-with-confluence-4/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to reverse the order of comments on Confluence pages</title>
		<link>http://davidsimpson.me/2012/01/24/how-to-reverse-the-order-of-comments-on-confluence-pages/</link>
		<comments>http://davidsimpson.me/2012/01/24/how-to-reverse-the-order-of-comments-on-confluence-pages/#comments</comments>
		<pubDate>Tue, 24 Jan 2012 14:15:56 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[atlassian]]></category>
		<category><![CDATA[confluence]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://davidsimpson.me/?p=1382</guid>
		<description><![CDATA[From a recent comment on Atlassian Answers, Norman Hills asked &#8220;Is it possible to reverse the order in which comments appear?&#8221; This is straightforward if done client-side, so I&#8217;ve written it up here. If you just want to reverse the order for good, browse to Confluence Admin &#124; Look &#038; Feel &#124; Custom HTML Add [...]]]></description>
			<content:encoded><![CDATA[<div id="tweetbutton1382" class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fdavidsimpson.me%2F2012%2F01%2F24%2Fhow-to-reverse-the-order-of-comments-on-confluence-pages%2F&amp;via=dvdsmpsn&amp;text=How%20to%20reverse%20the%20order%20of%20comments%20on%20Confluence%20pages&amp;related=&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fdavidsimpson.me%2F2012%2F01%2F24%2Fhow-to-reverse-the-order-of-comments-on-confluence-pages%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>From a recent comment on <a href="https://answers.atlassian.com/">Atlassian Answers</a>, Norman Hills asked &#8220;<a href="https://answers.atlassian.com/questions/28999/is-it-possible-to-reverse-the-order-in-which-comments-appear">Is it possible to reverse the order in which comments appear?</a>&#8221;</p>
<p>This is straightforward if done client-side, so I&#8217;ve written it up here.<br />
<span id="more-1382"></span><br />
If you just want to reverse the order for good, browse to <b>Confluence Admin | Look &#038; Feel | Custom HTML</b></p>
<p>Add this to <b>At the end of the HEAD</b>:</p>
<pre class="brush: jscript; title: ;">
&lt;script&gt;
  AJS.toInit(function(){
    $comments = AJS.$('#page-comments');
    $comments.children().each(function(i,li){$comments.prepend(li)});
  });
&lt;/script&gt;
</pre>
<p>Job done.</p>
<h2>For extra points</h2>
<p>If you want to be able to reverse the order, then it&#8217;s slightly more effort.</p>
<p>Browse to <b>Confluence Admin | Look &#038; Feel | Custom HTML</b></p>
<p>Add this to <b>At the end of the HEAD</b>:</p>
<pre class="brush: jscript; title: ;">
&lt;script&gt;
  function reverseCommentOrder(){
    $comments = AJS.$('#page-comments');
    $comments.children().each(function(i,li){$comments.prepend(li)});
  }

  AJS.toInit(function(){
    // reverse the comment order
    reverseCommentOrder();

    // add a link to reverse the order
    AJS.$('#comments-section-title').append('&lt;a id=&quot;page-comments-reverse&quot; href=&quot;#&quot;&gt;(Reverse Order)&lt;/a&gt;');
    AJS.$('#page-comments-reverse').css({ 'color':'#999','font-size':'0.65em'})
                                   .click(function(e){
      reverseCommentOrder();
      e.preventDefault();
    });
  });
&lt;/script&gt;
</pre>
<p>That&#8217;s all. Have fun.</p>
<!-- PHP 5.x -->]]></content:encoded>
			<wfw:commentRss>http://davidsimpson.me/2012/01/24/how-to-reverse-the-order-of-comments-on-confluence-pages/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Wiki web fonts</title>
		<link>http://davidsimpson.me/2011/12/09/wiki-web-fonts/</link>
		<comments>http://davidsimpson.me/2011/12/09/wiki-web-fonts/#comments</comments>
		<pubDate>Fri, 09 Dec 2011 10:09:17 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[atlassian]]></category>
		<category><![CDATA[confluence]]></category>
		<category><![CDATA[fonts]]></category>
		<category><![CDATA[wiki]]></category>

		<guid isPermaLink="false">http://davidsimpson.me/?p=1346</guid>
		<description><![CDATA[Want to use some &#8220;hot&#8221; new web fonts to pimp your Confluence wiki? It&#8217;s really straightforward. This post describes a method by which you can change all the headings to use web fonts hosted by Google. Site-wide web fonts Using Rokkitt font Browse to Confluence Administration &#124; Look and Feel &#124; Custom HTML In At [...]]]></description>
			<content:encoded><![CDATA[<div id="tweetbutton1346" class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fdavidsimpson.me%2F2011%2F12%2F09%2Fwiki-web-fonts%2F&amp;via=dvdsmpsn&amp;text=Wiki%20web%20fonts&amp;related=&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fdavidsimpson.me%2F2011%2F12%2F09%2Fwiki-web-fonts%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 use some &#8220;hot&#8221; new web fonts to pimp your Confluence wiki? </p>
<p>It&#8217;s <em>really</em> straightforward.  This post describes a method by which you can change all the headings to use web fonts <a href="http://www.google.com/webfonts">hosted by Google</a>.<br />
<span id="more-1346"></span></p>
<h2>Site-wide web fonts</h2>
<h3>Using <a href="http://www.google.com/webfonts/specimen/Rokkitt">Rokkitt font</a></h3>
<p>Browse to <b>Confluence Administration | Look and Feel | Custom HTML</b></p>
<p>In <b>At end of the HEAD</b> paste:</p>
<pre class="brush: xml; title: ;">
&lt;!-- Fonts for headings --&gt;
&lt;link href='http://fonts.googleapis.com/css?family=Rokkitt:400,700'
      rel='stylesheet' type='text/css'&gt;
&lt;style&gt;
#com-atlassian-confluence h1,
#com-atlassian-confluence h2,
#com-atlassian-confluence h3,
#com-atlassian-confluence h4,
#com-atlassian-confluence h5,
#com-atlassian-confluence h6 {
	font-family: 'Rokkitt', serif;
	font-weight : bold;
}
&lt;/style&gt;
</pre>
<p>Please note that adding inline styles is <a href="http://line25.com/articles/10-html-tag-crimes-you-really-shouldnt-commit">not big or clever</a>, but it is quick and easy for the purpose of this blogpost.</p>
<p>This results in a layout similar to the screenshot below:</p>
<p><a href="http://davidsimpson.me/wp-content/uploads/2011/12/wiki-web-fonts.png" rel="lightbox[1346]" title="Rokkitt headings in Confluence"><img src="http://davidsimpson.me/wp-content/uploads/2011/12/wiki-web-fonts.png" alt="" title="Rokkitt headings in Confluence" width="100%"  /></a></p>
<h3>Using <a href="http://www.google.com/webfonts/specimen/Leckerli+One">Leckerli One font</a></h3>
<p>Was that too corporate? Then lets have some handwriting&#8230;</p>
<p>Browse to <b>Confluence Administration | Look and Feel | Custom HTML</b></p>
<p>In <b>At end of the HEAD</b> paste:</p>
<pre class="brush: xml; title: ;">
&lt;!-- Fonts for headings --&gt;
&lt;link href='http://fonts.googleapis.com/css?family=Leckerli+One:400'
      rel='stylesheet' type='text/css'&gt;
&lt;style&gt;
#com-atlassian-confluence h1,
#com-atlassian-confluence h2,
#com-atlassian-confluence h3,
#com-atlassian-confluence h4,
#com-atlassian-confluence h5,
#com-atlassian-confluence h6 {
	font-family: 'Leckerli One', cursive;
}
&lt;/style&gt;
</pre>
<p>Now, you&#8217;ll get something like this:</p>
<p><a href="http://davidsimpson.me/wp-content/uploads/2011/12/wiki-web-fonts2.png" rel="lightbox[1346]" title="Leckerli One headings in Confluence"><img src="http://davidsimpson.me/wp-content/uploads/2011/12/wiki-web-fonts2.png" alt="" title="Leckerli One headings in Confluence" width="100%" /></a></p>
<p>I&#8217;m not sure that this is a good look, but never mind.</p>
<h2>Web fonts for a single space</h2>
<p>Want to just mess up the fonts in a single space?</p>
<p>Then, duplicate the content of  the Google hosted stylesheet &#8212; for example <a href="http://fonts.googleapis.com/css?family=Leckerli+One:400">http://fonts.googleapis.com/css?family=Leckerli+One:400</a> and add to the space stylesheet&#8230;</p>
<p>Browse to <b>Browse | Space Admin | Look and Feel | Stylesheet</b>.</p>
<p>Click on <b>Edit</b> and paste in:</p>
<pre class="brush: css; title: ;">
/* Duplicated from http://fonts.googleapis.com/css?family=Leckerli+One:400 */
@font-face {
  font-family: 'Leckerli One';
  font-style: normal;
  font-weight: normal;
  src: local('LeckerliOne'), url('http://themes.googleusercontent.com/static/fonts/leckerlione/v2/S2Y_iLrItTu8kIJTkS7DrKRDOzjiPcYnFooOUGCOsRk.woff') format('woff');
}

/* Targetting Confluence heading  */
#com-atlassian-confluence h1,
#com-atlassian-confluence h2,
#com-atlassian-confluence h3,
#com-atlassian-confluence h4,
#com-atlassian-confluence h5,
#com-atlassian-confluence h6 {
	font-family: 'Leckerli One', cursive;
}
</pre>
<p>This will only affect the space in which you add the CSS and will override the global styles.  </p>
<p><a href="http://davidsimpson.me/wp-content/uploads/2011/12/wiki-web-fonts3.png" rel="lightbox[1346]" title="Space only web font"><img src="http://davidsimpson.me/wp-content/uploads/2011/12/wiki-web-fonts3.png" alt="" title="Space only web font" width="100%" /></a></p>
<p>I&#8217;m not sure whether the <a href="http://themes.googleusercontent.com/static/fonts/leckerlione/v2/S2Y_iLrItTu8kIJTkS7DrKRDOzjiPcYnFooOUGCOsRk.woff">URL</a> for the font will remain constant in the long term though, so you <em>may</em> have to repeat this process.</p>
<h2>Be careful</h2>
<p>There are plenty of web font services and many, many fonts to choose from.  With <a href="http://www.youtube.com/watch?v=IKmQW7JTb6s">great power comes great responsibility</a>, so be careful.</p>
<!-- PHP 5.x -->]]></content:encoded>
			<wfw:commentRss>http://davidsimpson.me/2011/12/09/wiki-web-fonts/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Confluence 4  &#8212; wiki markup is *dead*, _long live_ wiki markup</title>
		<link>http://davidsimpson.me/2011/09/20/confluence-4-wiki-markup-is-dead-long-live-wiki-markup/</link>
		<comments>http://davidsimpson.me/2011/09/20/confluence-4-wiki-markup-is-dead-long-live-wiki-markup/#comments</comments>
		<pubDate>Tue, 20 Sep 2011 09:12:54 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[web]]></category>
		<category><![CDATA[confluence]]></category>

		<guid isPermaLink="false">http://davidsimpson.me/?p=1137</guid>
		<description><![CDATA[People have been shouting from the rooftops that Confluence 4 has finally arrived. Despite all the hype, it&#8217;s a cracking release. I&#8217;m not going to list all the features here, as you can find them elsewhere. However I will mention one&#8230; The new editor Simply put, it&#8217;s fast, slick and gorgeous looking. It works better [...]]]></description>
			<content:encoded><![CDATA[<div id="tweetbutton1137" class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fdavidsimpson.me%2F2011%2F09%2F20%2Fconfluence-4-wiki-markup-is-dead-long-live-wiki-markup%2F&amp;via=dvdsmpsn&amp;text=Confluence%204%20%20%26%238212%3B%20wiki%20markup%20is%20%2Adead%2A%2C%20_long%20live_%20wiki%20markup&amp;related=&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fdavidsimpson.me%2F2011%2F09%2F20%2Fconfluence-4-wiki-markup-is-dead-long-live-wiki-markup%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> People have been <a href="https://twitter.com/#!/search/confluence%204">shouting from the rooftops</a> that Confluence 4 has finally arrived.  Despite all the hype, it&#8217;s a cracking release.  I&#8217;m not going to list  all the features here, as you can find them <a href="atlss.in/conf40">elsewhere</a>. However I will mention one&#8230;</p>
<h2>The new editor</h2>
<p>Simply put, it&#8217;s fast, slick and gorgeous looking.  It works better than any online editor I&#8217;ve used elsewhere.  It is a design that would <a href="http://www.quotationspage.com/quote/26979.html">make Antoine de Saint-Exup&#233;ry proud</a>.</p>
<p><a href="http://davidsimpson.me/wp-content/uploads/2011/09/confluence4-editor.png" rel="lightbox[1137]" title="Confluence 4 - new editor"><img src="http://davidsimpson.me/wp-content/uploads/2011/09/confluence4-editor-1024x786.png" alt="" title="Confluence 4 - new editor" class="alignnone size-large wp-image-1154" /></a></p>
<h2>Wiki markup is dead</h2>
<p>Past experience shows that people&#8217;s fondness of wiki markup is somewhat akin to that of <a href="http://www.marmite.com/">Marmite</a>.  So it seems quite a bold step to ditch this aspect of the editor for something completely new.  </p>
<h2>Long live wiki markup</h2>
<p>The good news is that behind the scenes, wiki markup is alive and well &mdash; all the new editor&#8217;s great keyboard shortcuts are based off of the syntax that many people know so well.  </p>
<p>The final irony being that <b>wiki markup haters</b> may just start using wiki markup in their &#8220;faster, richer, simpler&#8221; editing experience.</p>
<p>Now, see what I mean:</p>
<p><iframe width="560" height="380" style="border: 1px solid #ccc;" src="http://www.youtube.com/embed/h77zmZwFWS4" frameborder="0" allowfullscreen></iframe></p>
<p><a href="http://www.atlassian.com/en/confluence-content-collaboration.html">Find out more.</a></p>
<!-- PHP 5.x -->]]></content:encoded>
			<wfw:commentRss>http://davidsimpson.me/2011/09/20/confluence-4-wiki-markup-is-dead-long-live-wiki-markup/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Staff &amp; Student Directory Search in Atlassian Confluence</title>
		<link>http://davidsimpson.me/2011/08/16/staff-student-directory-search-in-atlassian-confluence/</link>
		<comments>http://davidsimpson.me/2011/08/16/staff-student-directory-search-in-atlassian-confluence/#comments</comments>
		<pubDate>Tue, 16 Aug 2011 13:39:33 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[web]]></category>
		<category><![CDATA[atlassian]]></category>
		<category><![CDATA[confluence]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[ux]]></category>

		<guid isPermaLink="false">http://davidsimpson.me/?p=1525</guid>
		<description><![CDATA[A quick demo of a Confluence plugin for a staff &#038; student directory at the University of Nottingham. Developed by David Simpson and Shaun Hare back in 2010.]]></description>
			<content:encoded><![CDATA[<div id="tweetbutton1525" class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fdavidsimpson.me%2F2011%2F08%2F16%2Fstaff-student-directory-search-in-atlassian-confluence%2F&amp;via=dvdsmpsn&amp;text=Staff%20%26%23038%3B%20Student%20Directory%20Search%20in%20Atlassian%20Confluence&amp;related=&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fdavidsimpson.me%2F2011%2F08%2F16%2Fstaff-student-directory-search-in-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><iframe width="500" height="375" src="http://www.youtube.com/embed/4vZ6d5Wuahw?fs=1&#038;feature=oembed" frameborder="0" allowfullscreen></iframe></p>
<p>A quick demo of a Confluence plugin for a staff &#038; student directory at the University of Nottingham.</p>
<p>Developed by David Simpson and Shaun Hare back in 2010.</p>
<!-- PHP 5.x -->]]></content:encoded>
			<wfw:commentRss>http://davidsimpson.me/2011/08/16/staff-student-directory-search-in-atlassian-confluence/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Concur Single Sign-On plugin for Confluence using SAML</title>
		<link>http://davidsimpson.me/2011/01/24/concur-single-sign-on-plugin-for-confluence-using-saml/</link>
		<comments>http://davidsimpson.me/2011/01/24/concur-single-sign-on-plugin-for-confluence-using-saml/#comments</comments>
		<pubDate>Mon, 24 Jan 2011 18:09:47 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[atlassian]]></category>
		<category><![CDATA[confluence]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[university of nottingham]]></category>

		<guid isPermaLink="false">http://davidsimpson.me/?p=1486</guid>
		<description><![CDATA[The University of Nottingham started using Concur&#8216;s online travel &#038; expense management system towards the end of 2010. They needed a simple method of accessing the Concur system from their travel and expenses documentation (hosted in Confluence) without addtitional authentication prompts. A SAML-based single sign-on plugin for Confluence was rapidly designed and built over the [...]]]></description>
			<content:encoded><![CDATA[<div id="tweetbutton1486" class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fdavidsimpson.me%2F2011%2F01%2F24%2Fconcur-single-sign-on-plugin-for-confluence-using-saml%2F&amp;via=dvdsmpsn&amp;text=Concur%20Single%20Sign-On%20plugin%20for%20Confluence%20using%20SAML&amp;related=&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fdavidsimpson.me%2F2011%2F01%2F24%2Fconcur-single-sign-on-plugin-for-confluence-using-saml%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>The <a href="http://www.nottingham.ac.uk/">University of Nottingham</a> started using <a href="http://www.concur.com/">Concur</a>&#8216;s online travel &#038; expense management system towards the end of 2010.  They needed a simple method of accessing the Concur system from their travel and expenses documentation (hosted in Confluence) without addtitional authentication prompts.</p>
<p>A <a href="http://en.wikipedia.org/wiki/Security_Assertion_Markup_Language" title="Security Assertion Markup Language">SAML</a>-based single sign-on plugin for Confluence was rapidly designed and built over the course of a single week.  Here&#8217;s a demonstration of the basic functionality:</p>
<p><iframe width="500" height="375" src="http://www.youtube.com/embed/4sML2RAhqig?fs=1&#038;feature=oembed" frameborder="0" allowfullscreen></iframe></p>
<!-- PHP 5.x -->]]></content:encoded>
			<wfw:commentRss>http://davidsimpson.me/2011/01/24/concur-single-sign-on-plugin-for-confluence-using-saml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Analytics Plugin for Confluence 1.2 released</title>
		<link>http://davidsimpson.me/2010/06/24/analytics-plugin-for-confluence-12-released/</link>
		<comments>http://davidsimpson.me/2010/06/24/analytics-plugin-for-confluence-12-released/#comments</comments>
		<pubDate>Thu, 24 Jun 2010 11:39:35 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[analytics]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[atlassian]]></category>
		<category><![CDATA[confluence]]></category>
		<category><![CDATA[google analytics]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[web analytics]]></category>
		<category><![CDATA[wiki]]></category>

		<guid isPermaLink="false">http://davidsimpson.me/?p=865</guid>
		<description><![CDATA[Last week I released Analytics Plugin for Confluence 1.2 on the Atlassian Plugin Exchange. It&#8217;s been 6 months since the initial release which was only tested on Confluence 3.0. This time I&#8217;ve added a new dashboard section, full support for Confluence 3.1 &#038; 3.2 and a pile of macro parameters as requested by Guy Fraser. [...]]]></description>
			<content:encoded><![CDATA[<div id="tweetbutton865" class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fdavidsimpson.me%2F2010%2F06%2F24%2Fanalytics-plugin-for-confluence-12-released%2F&amp;text=Analytics%20Plugin%20for%20Confluence%201.2%20released&amp;related=&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fdavidsimpson.me%2F2010%2F06%2F24%2Fanalytics-plugin-for-confluence-12-released%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/06/analytics-plugin-icon-60pc.png" alt="analytics-plugin-icon-60pc" title="analytics-plugin-icon-60pc" width="153" height="124" class="alignleft size-full wp-image-875" /> Last week I released <a href="https://plugins.atlassian.com/plugin/details/16722">Analytics Plugin for Confluence 1.2</a> on the Atlassian Plugin Exchange.  </p>
<p>It&#8217;s been  6 months since the initial release which was only tested on Confluence 3.0.  This time I&#8217;ve added a new dashboard section, full support for Confluence 3.1 &#038; 3.2 and a pile of macro parameters <a href="/2010/01/02/announcing-google-analytics-plugin-for-confluence/comment-page-1/#comment-487">as requested</a> by Guy Fraser.     The <a href="https://studio.plugins.atlassian.com/wiki/display/CGAP/Analytics+Plugin+1.2+-+Release+Notes">release notes are here</a>.   Confluence 3.3  is just around the corner, so I&#8217;ll add an update for that when it comes out.</p>
<h3>Thank you</h3>
<p>The Confluence community has shown a great deal of support and encouragement since the plugin was originally released.   For example, <a href="http://blogs.atlassian.com/confluence/2009/12/report-confluence-activity-using-google-analytics-in-the-wiki.html">Atlassian blogged about it</a> before I got a chance to.  So thanks to all for your support.  </p>
<p>The plugin was name checked by Sherif Mansour &#8211; Atlassian&#8217;s  Product Manager for Confluence in the <a href="http://www.atlassian.com/summit/2010/presentations/collaboration-and-projects/confluence-state-of-union.jsp">Confluence State of the Union</a> presentation at <a href="http://www.atlassian.com/summit/2010/">Atlassian Summit 2010</a> at the start of the month.  Watch it all, but concentrate especially around 5:10!</p>
<p>This week Google approved the plugin for their <a href="http://www.google.com/analytics/apps/">Google Analytics Application Gallery</a> &mdash;  <a href="http://www.google.com/analytics/apps/about?app_id=229002">take a look here</a>.  The Apps Gallery has only been going for about a month so I&#8217;m really excited about being a part of it.  The slight name change and new logo were done to fit in with the Application Gallery Policy.<br />
<span id="more-865"></span></p>
<h3>In the future</h3>
<p>The next release should support Confluence 3.3  and also complete tracking of all pages in a space  &mdash; not just those with a URL starting /display/spaceKey/  &mdash; based on <a href="/2010/04/09/meta-tags-are-your-friend-part-2-space-specific-tracking-in-confluence-with-google-analytics/">this hack</a> :</p>
<pre class="brush: jscript; title: ;">
// Add a page-level custom variable to record the space-key
if (typeof jQuery('meta[name=confluence-space-key]').attr(&quot;content&quot;) == 'string')
{
  pageTracker._setCustomVar(
    1, // This custom var is set to slot #1 of 5

    // The name acts as a kind of category for the user activity
    'confluence-space-key',    

    // This value of the custom variable
    jQuery('meta[name=confluence-space-key]').attr(&quot;content&quot;), 

    3 // Sets the scope to page-level
  );
}
</pre>
<p>&mdash; If you want to use this hack now, try out <a href="http://www.google.com/analytics/reporting/edit_custom_report?share=gKOvaSkBAAA.5cmZVfTgv7FSDQaf3SApcJ_A8fPPw5P0SVumf1XIBw6dZ9IfubVqvpdV97TN5wj9PYWeLHgMbDxm22PtwyLU0Q.tBCFvr4UE3alVuAccnjeMA">this custom Google Analytics report</a> which will allow you to take advantage of it now.</p>
<p>I&#8217;d also like to add full space specific tracking for attachments too.</p>
<h3>A quick demo</h3>
<p>And finally, this is what the new version looks like:</p>
<p><object height="350" width="425" class="alignleft"><param value="http://www.youtube.com/v/0JgoBwlQT_4&amp;hl=en_US&amp;fs=1&amp;" name="movie"><param value="true" name="allowFullScreen"><param value="always" name="allowscriptaccess"><embed height="350" width="425" allowfullscreen="true" allowscriptaccess="always" type="application/x-shockwave-flash" src="http://www.youtube.com/v/0JgoBwlQT_4&amp;hl=en_US&amp;fs=1&amp;"></object> &nbsp;</p>
<h3>Related Posts</h3>
<ul>
<li><a href="/2009/03/18/tracking-atlassian-confluence-usage-with-google-analytics/">Tracking Atlassian Confluence usage with Google Analytics</a></li>
<li><a href="/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="/2010/01/02/announcing-google-analytics-plugin-for-confluence/">Announcing: Google Analytics plugin for Confluence</a> &#8211; original release</li>
</ul>
<!-- PHP 5.x -->]]></content:encoded>
			<wfw:commentRss>http://davidsimpson.me/2010/06/24/analytics-plugin-for-confluence-12-released/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Hide wiki markup &#8211; Confluence user macro</title>
		<link>http://davidsimpson.me/2010/06/06/hide-wiki-markup-confluence-user-macro/</link>
		<comments>http://davidsimpson.me/2010/06/06/hide-wiki-markup-confluence-user-macro/#comments</comments>
		<pubDate>Sun, 06 Jun 2010 21:30:31 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[web]]></category>
		<category><![CDATA[atlassian]]></category>
		<category><![CDATA[confluence]]></category>

		<guid isPermaLink="false">http://davidsimpson.me/?p=788</guid>
		<description><![CDATA[Update: 2011-09-20 With the release of Confluence 4.0, this post obsolete. A simple Confluence user macro to hide access to the View Wiki Markup menu link&#8230; {hide-wiki-markup} One thing I love about Confluence is the way that you can browse other people&#8217;s pages and steal their superior layout ideas for your own wiki pages. It&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<div id="tweetbutton788" class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fdavidsimpson.me%2F2010%2F06%2F06%2Fhide-wiki-markup-confluence-user-macro%2F&amp;text=Hide%20wiki%20markup%20%26%238211%3B%20Confluence%20user%20macro&amp;related=&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fdavidsimpson.me%2F2010%2F06%2F06%2Fhide-wiki-markup-confluence-user-macro%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><em><strong>Update:</strong> 2011-09-20 With the release of Confluence 4.0, this post obsolete.</em></p>
<p>A simple Confluence user macro to hide access to the <b>View Wiki Markup</b> menu link&#8230;</p>
<p style="font-size:250%; font-family:monaco,courier,fixed-width;">{hide-wiki-markup}</p>
<p><img align="right" src="/wp-content/uploads/2010/06/tools-menu1.png" alt="tools-menu" title="tools-menu" width="164" height="464" class="alignleft size-full wp-image-801" /></p>
<p>One thing I love about Confluence is the way that you can browse other people&#8217;s pages and steal their superior layout ideas for your own wiki pages.  </p>
<p>It&#8217;s dead easy to do.  Go to the <b>Tools</b> drop down menu and click on the <b>View Wiki Markup</b> link.  A new window will open containing the wiki markup for the page.  You can now copy the bits you like and discard the rest.  Your friends and colleagues will be impressed by your wiki skills and you can continue on your path to <a href="http://confluence.atlassian.com/display/CONFDEVAL/Become+a+Wiki+Ninja+with+Confluence">becoming a wiki ninja</a>.</p>
<p><b>But what if you don&#8217;t want to share those wiki markup skills?</b><br />
That&#8217;s not very collaborative, I know. But there are entirely valid reasons that you&#8217;d wish to disable this feature.<br />
<span id="more-788"></span><br />
An example of this is use of the <code>{sql}</code> plugin.  This is a really powerful plugin that allows you to query databases and tabulate the results in Confluence. Wrap this in a <code>{chart}</code> macro and you have an instant graph. Nice work!  There&#8217;s a <a href="http://blogs.atlassian.com/confluence/2009/08/confluence-business-intelligence-part1.html">great blog post at Atlassian</a> that use this to great effect.</p>
<h2>Security</h2>
<p>However, using this kind of markup on a public website is a bad idea.  Exposing the structure of your databases to people you don&#8217;t know and can&#8217;t trust is somewhat short sighted.  On a company intranet, the risk is still there, but hopefully it is not so dangerous.  Even so, it&#8217;s really best not to show this information in the first place.</p>
<h2>What can we do about it?</h2>
<p>The best solution would be additional security in the product that allows editors to prevent others from viewing wiki markup.  It would probably go in the <b>Restrictions</b> screen.  This does seem somewhat like a paranoid feature request, but call me paranoid.</p>
<p>Another way is to use Javascript to remove the link from the DOM.  This is not a replacement for good security, but will stop the casual user from accessing the wiki markup.</p>
<p><b>It is easily done in a user macro:</b></p>
<p>As a Confluence administrator, go to <b>Confluence Admin | User Macros</b> and click on <b>Create a User Macro</b>.</p>
<p>Fill out the form&#8230;<br />
<b>Macro name:</b> hide-wiki-markup<br />
<b>Output:</b> Macro generates HTML markup<br />
<b>Template:</b></p>
<pre class="brush: xml; title: ;">&lt;script type=&quot;text/javascript&quot;&gt;
jQuery('#action-view-source-link').parent().hide(); /*Updated from .remove(); Aug 2010*/
&lt;/script&gt;
</pre>
<p><img src="/wp-content/uploads/2010/06/hide-wiki-markup-config.png" alt="hide-wiki-markup-config" title="hide-wiki-markup-config"  /></p>
<!-- PHP 5.x -->]]></content:encoded>
			<wfw:commentRss>http://davidsimpson.me/2010/06/06/hide-wiki-markup-confluence-user-macro/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Meta tags are your friend part 2: Space specific tracking in Confluence with Google Analytics</title>
		<link>http://davidsimpson.me/2010/04/09/meta-tags-are-your-friend-part-2-space-specific-tracking-in-confluence-with-google-analytics/</link>
		<comments>http://davidsimpson.me/2010/04/09/meta-tags-are-your-friend-part-2-space-specific-tracking-in-confluence-with-google-analytics/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 01:14:54 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[analytics]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[atlassian]]></category>
		<category><![CDATA[confluence]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[google analytics]]></category>
		<category><![CDATA[web analytics]]></category>
		<category><![CDATA[wiki]]></category>

		<guid isPermaLink="false">http://davidsimpson.me/?p=719</guid>
		<description><![CDATA[I&#8217;ve previously written a number of posts about Confluence and Google Analytics (GA), including how to set up GA on Confluence and pointers for GA reports you should consider. Lastly, I wrote the Confluence Google Analytics Plugin (CGAP) which provides space specific GA reports from within Confluence. However, I&#8217;ve not been entirely happy because there [...]]]></description>
			<content:encoded><![CDATA[<div id="tweetbutton719" class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fdavidsimpson.me%2F2010%2F04%2F09%2Fmeta-tags-are-your-friend-part-2-space-specific-tracking-in-confluence-with-google-analytics%2F&amp;text=Meta%20tags%20are%20your%20friend%20part%202%3A%20Space%20specific%20tracking%20in%20Confluence%20with%20Google%20Analytics&amp;related=&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fdavidsimpson.me%2F2010%2F04%2F09%2Fmeta-tags-are-your-friend-part-2-space-specific-tracking-in-confluence-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>I&#8217;ve previously written a number of posts about Confluence and Google Analytics (GA), including <a href="/2009/03/18/tracking-atlassian-confluence-usage-with-google-analytics/">how to set up GA on Confluence</a> and pointers for <a href="/2009/04/16/4-useful-tips-on-google-analytics-reporting-for-confluence/">GA reports you should consider</a>.  Lastly, I wrote the <a href="/2010/01/02/announcing-google-analytics-plugin-for-confluence/">Confluence Google Analytics Plugin</a> (CGAP) which provides space specific GA reports from within Confluence.</p>
<p>However, I&#8217;ve not been entirely happy because there wasn&#8217;t a method to allow complete tracking of all space specific Confluence pages using CGAP or the reports that I&#8217;ve previously described.</p>
<p>This has been <a href="http://forums.atlassian.com/thread.jspa?messageID=257303418">documented</a> <a href="http://blogs.atlassian.com/confluence/2009/12/report-confluence-activity-using-google-analytics-in-the-wiki.html#comment-210247">elsewhere</a>, but briefly, the problem is with&#8230;</p>
<ul>
<li>pages with punctuation in the title e.g. <a href="http://workspace.nottingham.ac.uk/pages/viewpage.action?pageId=45947608" title="http://workspace.nottingham.ac.uk/pages/viewpage.action?pageId=45947608">This page is bad for Analytics, isn&#8217;t it?</a> (hover on the link to see the URI)</li>
<li>short URLs e.g. /x/2Bq9Ag</li>
<li>space administration e.g. /spaces/spaceadmin.action?key=spaceKey</li>
<li>page edits e.g./pages/editpage.action?pageId=XXXX</li>
<li>page creation e.g. /pages/createpage.action?spaceKey=spaceKey&#038;fromPageId=XXXX</li>
<li>add/view attachments e.g. /pages/viewpageattachments.action?pageId=XXXX</li>
<li>page history e.g. /pages/viewpreviousversions.action?pageId=XXXX</li>
<li>view wiki markup e.g. /pages/viewpagesrc.action?pageId=XXXX</li>
</ul>
<p>&#8230;and so on.  I think you get the picture.</p>
<p>For any page where there is a real interaction with the wiki &mdash; such as page creation or page edits, attachment viewing or uploading &mdash; it is very difficult associate that interaction to the space where the interaction took place.  Damn.  That&#8217;s the main point really. Wikis are for collaboration &mdash; editing and creating content &mdash; not just passively reading.  </p>
<p>It really bugs me that the URIs in Confluence aren&#8217;t built up so that they always provide a context of where you are.  But what can we do?</p>
<p>This post suggests 2 possible solutions to this problem:  </p>
<ol>
<li>A Javascript only method</li>
<li>A Javascript and velocity templating method</li>
</ol>
<p>Both have their drawbacks, but they do let you get a little closer to understanding what your users are doing within your Confluence spaces. Try them out and please report back on your preference or your own alternative solution.</p>
<p><span id="more-719"></span></p>
<h2>The Javascript only method</h2>
<p>In this method, we track a custom variable in GA where possible, so that we can attach a page view to the corresponding Confluence space.</p>
<p>Atlassian handily provide the following (example) meta tag on every page that has an associated space:</p>
<pre class="brush: xml; title: ;">&lt;meta id=&quot;confluence-space-key&quot; name=&quot;confluence-space-key&quot; content=&quot;~cczdas&quot;&gt;</pre>
<p>We can check for that meta tag and pass it into a custom variable in Google Analytics.</p>
<p>In Confluence, go to <b>Dashboard | Administration | Look and Feel | Custom HTML</b></p>
<p>Click on the “Edit” button and add this javascript snippet (with your tracker code) to the “At end of the BODY” section:</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;);

			// Add a page-level custom variable to record the space-key
			if (typeof jQuery('meta[name=confluence-space-key]').attr(&quot;content&quot;) == 'string')
			{
				pageTracker._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
				);
			}
		}
		catch (err) {}
	}

&lt;/script&gt;
</pre>
<p>This means for each page, we&#8217;ve added a custom variable which can later be check against.  We can now therefore easily check which page belongs to which space.</p>
<p>In Google Analytics, the custom variables report looks like this:</p>
<p><a href="http://localhost/davidsimpson.me/wp-content/uploads/2010/04/confluence-ga-custom-variable-report.png" rel="lightbox[719]" title="confluence-ga-custom-variable-report"><img src="http://davidsimpson.me/wp-content/uploads/2010/04/confluence-ga-custom-variable-report-440x316.png" alt="confluence-ga-custom-variable-report" title="confluence-ga-custom-variable-report" width="440" height="316" class="size-medium wp-image-725" /></a></p>
<p>This doesn&#8217;t really tell us much, other than the number of page views for a space and a little more.  To get at the real power of custom variables, we need to create a custom segment for each space.  This will allow us to see all the interactions for the space.</p>
<p>Here&#8217;s a short video guide to creating custom segments for Confluence spaces:</p>
<p><object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/gOBoqG7LNLc&#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/gOBoqG7LNLc&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object></p>
<h3>Pros</h3>
<ul>
<li>It&#8217;s really simple. Anyone with Confluence administration rights can cut and paste this code.</li>
<li>It&#8217;s pure. This should not be affected by upgrades to the platform.</li>
<li>It&#8217;s easily to support. Lots of people know Javascript.</li>
</ul>
<h3>Cons</h3>
<ul>
<li>You&#8217;re moving into slightly advanced Google Analytics territory here.</li>
<li>You&#8217;ll need to set up a separate custom advanced segment for each space.  This may be somewhat dull.</li>
</ul>
<p>I really like this approach, but haven&#8217;t managed to successfully add it into CGAP yet <a href="http://www.google.com/support/forum/p/Google+Analytics/thread?tid=23eb6e88efbd4ac3&#038;hl=en">whilst maintaining access to historical data</a>.</p>
<h2>Javascript and velocity templating method</h2>
<p>In this method, we trick Google Analytics into reporting the URL in a the format that works with content drill-down e.g.</p>
<ul>
<li>/pages/viewpage.action?pageId=XXXX becomes /display/spaceKey/Page+Title</li>
<li>/x/2Bq9Ag (short URL) becomes /display/spaceKey/Page+Title</li>
<li>/pages/editpage.action?pageId=XXX becomes /display/spaceKey/Page+Title/edit</li>
<li>/pages/viewpageattachments.action?pageId=XXX becomes /display/spaceKey/Page+Title/view-attachments</li>
</ul>
<p>We do this by adding a custom meta tag named &#8220;analytics.url.fix&#8221; from which we read the &#8220;fixed&#8221; URL using a little Javascript.	</p>
<h3>Edits</h3>
<p><b>page.vmd</b> in your theme:</p>
<pre class="brush: plain; title: ;">
## Add Google Analytics support for page edits, attachment views etc.
## Called by $!sitemeshPage.getProperty(&quot;page.googleAnalyticsUrlFix&quot;) in main.vmd
&lt;content tag=&quot;googleAnalyticsUrlFix&quot;&gt;
	#if ($mode == &quot;view&quot;)
		&lt;meta name=&quot;analytics.url.fix&quot; desc=&quot;$req.contextPath/display/$page.spaceKey/$page.title&quot; /&gt;
	#else
		&lt;meta name=&quot;analytics.url.fix&quot; desc=&quot;$req.contextPath/display/$page.spaceKey/$page.title/$mode&quot; /&gt;
	#end
&lt;/content&gt;
</pre>
<p><b>main.vmd</b> in your theme:<br />
Add after the title node in /html/head/title</p>
<pre class="brush: plain; title: ;">
## Call the googleAnalyticsUrlFix content tag in page.vmd, fail silently:
$!sitemeshPage.getProperty(&quot;page.googleAnalyticsUrlFix&quot;)
</pre>
<p>In Confluence, go to <b>Dashboard | Administration | Look and Feel | Custom HTML</b></p>
<p>Click on the “Edit” button and add this javascript snippet (with your tracker code) to the “At end of the BODY” section:</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-XXXXXX-X&quot;); 

			// Test for the meta[name=analytics.url.fix] tag &amp; fix the url
			if (typeof jQuery('meta[name=analytics.url.fix]').attr(&quot;content&quot;) == 'string')
			{
	 			// console.debug('corrected pageview');
	   			var pageUri = jQuery('meta[name=analytics.url.fix]').attr(&quot;content&quot;).replace(/s+/gi, '+');
				pageTracker._trackPageview(pageUri);
			}
			else
			{
				// console.debug('default pageview');
				pageTracker._trackPageview();
			}
		}
		catch (err) {}
	}
&lt;/script&gt;
</pre>
<h3>Pros</h3>
<ul>
<li>You don&#8217;t have to do anything on the Google Analytics side at all</li>
<li>
		This is just great for the content drilldown screen in Google Analytics.</p>
<ul>
<li>It means that pages with punctuation in the title can now be seen within their correct space.</li>
<li>The space owners can now be sure of the stats for viewing and editing pages within their space.</li>
</ul>
</li>
<li>
		This is great for the Google Analytics plugin for Confluence (CGAP)</p>
<ul>
<li>All the page edits should be shown in the analytics report</li>
<li>It&#8217;s easily supportable. Lots of people know Javascript</li>
</ul>
</li>
</ul>
<h3>Cons</h3>
<ul>
<li>It&#8217;s a bit messy.</li>
<li>You&#8217;ll have to apply this to every theme you support.</li>
<li>Editing velocity templates isn&#8217;t everyone&#8217;s cup of tea.</li>
<li>I&#8217;ve no idea what will happen when you upgrade Confluence.</li>
<li>It niggles me that we&#8217;re sending incorrect (though easily readable) pageview data to Google Analytics.</li>
<li>It still doesn&#8217;t tie everything to the space, just the page interactions</li>
</ul>
<p>To my mind, this is less elegant, but provides pretty much instant results.</p>
<h2>Which one to choose?</h2>
<p>I really like the simplicity of the first solution. Just a little bit of Javascript to read a meta tag that&#8217;s already there.  It&#8217;s likely to easily survive an upgrade. But I&#8217;m  disappointed that as yet, I can&#8217;t get it to work nicely with CGAP.</p>
<p>For ongoing support reasons, I&#8217;d always say <b>don&#8217;t mess with the platform</b>. Don&#8217;t do anything which makes it more difficult to upgrade to the latest and greatest version. If you agree, then steer well clear of the latter option.  If however, you absolutely have to start complete space specific tracking right now, no matter what, then the latter is then choice for you.</p>
<!-- PHP 5.x -->]]></content:encoded>
			<wfw:commentRss>http://davidsimpson.me/2010/04/09/meta-tags-are-your-friend-part-2-space-specific-tracking-in-confluence-with-google-analytics/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

