<?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; analytics</title>
	<atom:link href="http://davidsimpson.me/category/web/analytics/feed/" rel="self" type="application/rss+xml" />
	<link>http://davidsimpson.me</link>
	<description>Developing the web, one page at a time.</description>
	<lastBuildDate>Wed, 07 Jul 2010 22:04:22 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>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 [...]]]></description>
			<content:encoded><![CDATA[
<p><img src="http://davidsimpson.me/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;">
// 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>
<div class="topsy_widget_data topsy_theme_blue" style=""><script type="text/javascript" src="http://button.topsy.com/widget/retweet-small?url=http://davidsimpson.me/2010/06/24/analytics-plugin-for-confluence-12-released/&amp;shorturl=http://bit.ly/aXQ8Di&amp;title=Analytics+Plugin+for+Confluence+1.2+released&amp;theme=blue&amp;order=count,retweet,badge&amp;txt_tweet=tweet&amp;txt_retweet=retweet"></script></div>
]]></content:encoded>
			<wfw:commentRss>http://davidsimpson.me/2010/06/24/analytics-plugin-for-confluence-12-released/feed/</wfw:commentRss>
		<slash:comments>2</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[
<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;">&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;">
&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://davidsimpson.me/wp-content/uploads/2010/04/confluence-ga-custom-variable-report.png"><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;">
## 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;">
## 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;">
&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>
<div class="topsy_widget_data topsy_theme_blue" style=""><script type="text/javascript" src="http://button.topsy.com/widget/retweet-small?url=http://davidsimpson.me/2010/04/09/meta-tags-are-your-friend-part-2-space-specific-tracking-in-confluence-with-google-analytics/&amp;shorturl=http://bit.ly/bg13EL&amp;title=Meta+tags+are+your+friend+part+2%3A+Space+specific+tracking+in+Confluence+with+Google+Analytics++&amp;theme=blue&amp;order=count,retweet,badge&amp;txt_tweet=tweet&amp;txt_retweet=retweet"></script></div>
]]></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>
		<item>
		<title>Announcing: Google Analytics plugin for Confluence</title>
		<link>http://davidsimpson.me/2010/01/02/announcing-google-analytics-plugin-for-confluence/</link>
		<comments>http://davidsimpson.me/2010/01/02/announcing-google-analytics-plugin-for-confluence/#comments</comments>
		<pubDate>Sat, 02 Jan 2010 17:06:36 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[analytics]]></category>
		<category><![CDATA[atlassian]]></category>
		<category><![CDATA[confluence]]></category>
		<category><![CDATA[google analytics]]></category>
		<category><![CDATA[plugin]]></category>

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

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

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

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

Having installed Google Analytics on Confluence, you need to ensure that you&#8217;re not lost in a world of pretty metrics.  
Make sure that your new analytics toy produces something solid and actionable.  Anything less is just a shiny curiosity that your organisation will soon fail to engage with.
This article presents 4 useful tips [...]]]></description>
			<content:encoded><![CDATA[
<p><!-- 4 useful tips on Google Analytics reporting for Confluence --></p>
<p>Having <a href="/2009/03/18/tracking-atlassian-confluence-usage-with-google-analytics/">installed Google Analytics on Confluence</a>, you need to ensure that you&#8217;re not lost in a world of pretty metrics.  </p>
<p>Make sure that your new analytics toy produces something solid and actionable.  Anything less is just a shiny curiosity that your organisation will soon fail to engage with.</p>
<p>This article presents 4 useful tips that really show the power of the analytics data available.  Each one can help improve the success of your Confluence installation.<br />
<span id="more-283"></span></p>
<h2>1. Use the Content Drilldown report to segment traffic by site</h2>
<p>Want to know which sites are generating the most traffic?  The Content Drilldown report is for you.  This allows you to view page reads by Site.</p>
<p>The gallery below shows you how to access the correct report &#8211; In Google Analytics (GA), click on the highlighted links to get to the next page.</p>
<p><!--***--><a href="http://davidsimpson.me/wp-content/uploads/2009/04/content-drilldown-all.png"><img src="http://davidsimpson.me/wp-content/uploads/2009/04/content-drilldown-all-150x150.png" alt="Content Drilldown - Select &quot;display&quot;" title="Content Drilldown - All" width="150" height="150" class="size-thumbnail wp-image-291" /></a></p>
<p><!--***--><a href="http://davidsimpson.me/wp-content/uploads/2009/04/content-drilldown-sites.png"><img src="http://davidsimpson.me/wp-content/uploads/2009/04/content-drilldown-sites-150x150.png" alt="Content Drilldown - Select &quot;DOC&quot;" title="Content Drilldown - Sites" width="150" height="150" class="size-thumbnail wp-image-292" /></a></p>
<p><!--***--><div id="attachment_293" class="wp-caption alignnone" style="width: 160px"><a href="http://davidsimpson.me/wp-content/uploads/2009/04/content-drilldown-sites-doc.png"><img src="http://davidsimpson.me/wp-content/uploads/2009/04/content-drilldown-sites-doc-150x150.png" alt="Content Drilldown - Shows pages within the DOC site" title="Content Drilldown - DOC" width="150" height="150" class="size-thumbnail wp-image-293" /></a><p class="wp-caption-text">Content Drilldown - Shows pages within the DOC site</p></div></p>
<h3>Missing Page Views</h3>
<p>The Content Drilldown report  does <em>not</em> however show everything that happens within the site, but rather only pages that are descendent of <strong>/display/DOC/</strong></p>
<h4>Examples of missing pages</h4>
<ul>
<li>
		<strong>Pages with punctuation marks in the title.</strong><br />
		A page with a title of <em>What&#8217;s this?</em> would have a URI similar to <strong>/pages/viewpage.action?pageId=26181760</strong><br />
		<em>As a workaround, only use alphanumerics and spaces in page titles.</em>
	</li>
<li>
		<strong>Page edits.</strong><br />
		A page edit would have a URI similar to <strong>/pages/editpage.action?pageId=26181733</strong>
	</li>
<li>
		<strong>Attachment views.</strong><br />
		These do not call the Google Analytics JavaScript, so are not caught by the tracking code
	</li>
</ul>
<p>The first 2 of these are tracked, but not on a site by site basis within the Content Drilldown, so they are a little more difficult to understand.</p>
<p>Each of these <em>could</em> be tracked within the Content Drilldown by using a little jQuery magic to rewrite the URL before it is sent to Google Analytics.</p>
<p>I&#8217;ve not done this yet, but it should be fairly simple to change the reported URLs to e.g.</p>
<ul>
<li>/display/DOC/What&#8217;s This?</li>
<li>/display/DOC/Test+Page/Edit Page</li>
<li>/display/DOC/Test+Page/attachment/screenshot.png</li>
</ul>
<h2>2. Enable Site Search  &#038; Search Categories in GA</h2>
<p>Google Analytics will allow you to categorize site searches. With this option enabled, you can see searches within individual sites.</p>
<p>In GA, go to <strong>Analytics Settings > Profile Settings > Edit Profile Information</strong></p>
<p>* Select <strong>Do Track Site Search</strong><br />
* Add <strong>queryString,searchQuery.queryString</strong> to <strong>Query Parameter (required):</strong><br />
* Select <strong>Yes</strong> from <strong>Do you use categories for site search?</strong><br />
* Add <strong>key,searchQuery.spaceKey,where</strong> to <strong>Category Parameter:</strong></p>
<p><!--***--><div id="attachment_306" class="wp-caption alignnone" style="width: 160px"><a href="http://davidsimpson.me/wp-content/uploads/2009/04/settings-site-search.png"><img src="http://davidsimpson.me/wp-content/uploads/2009/04/settings-site-search-150x150.png" alt="Settings - Site Search" title="settings-site-search" width="150" height="150" class="size-thumbnail wp-image-306" /></a><p class="wp-caption-text">A screenshot of the Site Search Setting section</p></div></p>
<h3>Example &#8211; Searching for &#8220;David Simpson&#8221; on Atlassian&#8217;s own installation of Confluence </h3>
<p>The table below shows the various different situations and query parameters that I&#8217;ve used to Categorize the Site Search:</p>
<div class="overflowAuto">
<table>
<tr>
<th>Description/Link</th>
<th>Example query parameter pairs (Category Parameter in bold)</th>
<th class="comments">Comments</th>
</tr>
<tr>
<td class="nowrap"><a href="http://confluence.atlassian.com/dosearchsite.action?queryString=David+Simpson">Search the whole site</a></td>
<td>queryString=David+Simpson</td>
<td class="nowrap">These are the (not set) results within Google Analytics</td>
</tr>
<tr>
<td class="nowrap"><a href="http://confluence.atlassian.com/dosearchsite.action?key=DOC&#038;searchQuery.queryString=David+Simpson&#038;searchQuery.spaceKey=DOC">Search within a space (1)</a></td>
<td>
			<b>key=DOC</b><br />
			searchQuery.queryString=David+Simpson<br />
			<b>searchQuery.spaceKey=DOC</b>
		</td>
<td>The standard query parameter structure created by the {search-box} macro</td>
</tr>
<tr>
<td class="nowrap"><a href="http://confluence.atlassian.com/dosearchsite.action?queryString=ancestorIds%3A135922+AND+David+Simpson&#038;where=DOC&#038;type=&#038;lastModified=&#038;contributor=&#038;contributorUsername=">Search within a space (2)</a></td>
<td>
			queryString=ancestorIds%3A135922+AND+David+Simpson<br />
			<b>where=DOC</b><br />
			type=<br />
			lastModified=<br />
			contributor=<br />
			contributorUsername=
		</td>
<td>The query parameters created when a {pagetree} macro contains a search box (I think)</td>
</tr>
<tr>
<td><a href="http://confluence.atlassian.com/dosearchsite.action?queryString=David+Simpson&#038;where=DOC&#038;type=&#038;lastModified=&#038;contributor=&#038;contributorUsername=">Filter a previous search</a></td>
<td>
			queryString=David+Simpson<br />
			<b>where=DOC</b><br />
			type=<br />
			lastModified=<br />
			contributor=<br />
			contributorUsername=
		</td>
<td>This is when you perform further searches within the Search Results page</td>
</tr>
</table>
</div>
<h2>3. Use &#8220;Site Search Categories&#8221; to show search terms from within individual sites</h2>
<p>With site specific search information you can see </p>
<ul>
<li>What people are looking for </li>
<li>Whether they&#8217;ve found it</li>
</ul>
<p>Some screenshots of how to view the Site Specific search terms:</p>
<p><!--***--><div id="attachment_290" class="wp-caption alignnone" style="width: 160px"><a href="http://davidsimpson.me/wp-content/uploads/2009/04/site-search-categories.png"><img src="http://davidsimpson.me/wp-content/uploads/2009/04/site-search-categories-150x150.png" alt="Site Search - List of categories" title="site-search-categories" width="150" height="150" class="size-thumbnail wp-image-290" /></a><p class="wp-caption-text">Site Search - List of categories</p></div></p>
<p><!--***--><div id="attachment_289" class="wp-caption alignnone" style="width: 160px"><a href="http://davidsimpson.me/wp-content/uploads/2009/04/site-search-categories-doc.png"><img src="http://davidsimpson.me/wp-content/uploads/2009/04/site-search-categories-doc-150x150.png" alt="Site Search Results - DOC category only" title="site-search-categories-doc" width="150" height="150" class="size-thumbnail wp-image-289" /></a><p class="wp-caption-text">Site Search Results - DOC category only</p></div></p>
<p>This is powerful.  If they&#8217;re searching and finding stuff &#8211; great!</p>
<p>If they&#8217;re failing to find the content they desire, then there&#8217;s a real problem that needs fixing.   <strong>The top search terms that return no result should be tackled.</strong></p>
<p>With a little consideration, the user experience can be improved considerably, saving the organisation time and money. </p>
<h3>Ask yourself a few questions:</h3>
<ul>
<li>Why are my visitors searching for <em>search-term-x</em>?</li>
<li>
		Is this search term relevent to my site?</p>
<ul>
<li>If so, add the content you the site.</li>
</ul>
</li>
<li>
		Is the search term related to different terminology that I&#8217;m using?</p>
<ul>
<li>If so, include the various terminologies in pages, so that people with different language styles can find the content</li>
</ul>
</li>
<li>
		Should the top result be easier to find?</p>
<ul>
<li>Consider moving the top search term to be visible on the site home page or higher up in the site hierarchy</li>
</ul>
</li>
</ul>
<h2>4. Use the &#8220;Site Search Start Pages&#8221; report to find out where visitors turn to search</h2>
<p>This report exposes the page a visitor is on when they abandon the navigation system in the site and jump to the search box.  This could give some insight into what&#8217;s missing in your navigation system. </p>
<p><!--***--><div id="attachment_307" class="wp-caption alignnone" style="width: 160px"><a href="http://davidsimpson.me/wp-content/uploads/2009/04/site-search-start-pages.png"><img src="http://davidsimpson.me/wp-content/uploads/2009/04/site-search-start-pages-150x150.png" alt="Site Search Start Pages Report" title="site-search-start-pages" width="150" height="150" class="size-thumbnail wp-image-307" /></a><p class="wp-caption-text">Site Search Start Pages Report</p></div></p>
<p>To view the search start pages on a site by site basis, filter this report by using the URI of each site.</p>
<p><!--***--><div id="attachment_308" class="wp-caption alignnone" style="width: 371px"><a href="http://davidsimpson.me/wp-content/uploads/2009/04/filter-by-site.png"><img src="http://davidsimpson.me/wp-content/uploads/2009/04/filter-by-site.png" alt="Filter by site URI" title="filter-by-site" width="361" height="28" class="size-full wp-image-308" /></a><p class="wp-caption-text">Filter by site URI</p></div></p>
<h3>Ask some more questions&#8230;</h3>
<ul>
<li>
		Are my visitors browsing or just searching?</p>
<ul>
<li>When I&#8217;m on the eBay homepage, I generally just start searching and ignore all the content on the page.  Are your visits doing this?</li>
</ul>
</li>
<li>
		Do visitors search from particular pages?</p>
<ul>
<li>If so, what are the search terms? Should these be included on, or linked to from these pages?</li>
</ul>
</li>
</ul>
<h2>To Conclude</h2>
<p>Using just these 4 simple tips highlights the combined power of Google Analytics and the internal search engine within Confluence.   Answering some of the questions posed should provide the insight you need to improve the usability for all your visitors.    </p>
<p>These tips are really only the a small part of what analytics has to offer.   I&#8217;d encourage you to learn more  and let me know how you get on.</p>
<h3>Further reading/viewing</h3>
<ul>
<li><a href="http://www.google.com/support/conversionuniversity/?hl=en">Google Analytics Conversion University</a></li>
<li><a href="http://www.youtube.com/watch?v=m4RaGKwvMbY&#038;feature=related">Internal Site Search Analysis and Visitor Intent</a> &#8211; video by Avinash Kaushik (<a href="http://twitter.com/avinashkaushik">@avinashkaushik</a>)</li>
<li><a href="http://www.rosenfeldmedia.com/books/searchanalytics/">Search Analytics</a> book by Louis Rosenfeld (<a href="http://twitter.com/louisrosenfeld">@louisrosenfeld</a>) and Marko Hurst</li>
<li><a href="http://semphonic.blogs.com/semangel/2007/04/web_analytics_t.html">Web Analytics ToolKit and Internal Search</a></li>
<li><a href="http://www.kaushik.net/avinash/2007/10/kick-butt-with-internal-site-search-analytics.html">Kick Butt With Internal Site Search Analytics</a> &#8211; Avinash Kaushik</li>
</ul>
<p><strong>Please note:</strong> We&#8217;ve not had GA tracking Confluence for very long, so there are some empty results for the start of the month.<br />
I&#8217;ve used <a href="http://getfirebug.com/">Firebug</a> to pretend we&#8217;re looking at the analytics reports for <a href="http://confluence.atlassian.com/">Atlassian&#8217;s own installation of Confluence</a></p>
<div class="topsy_widget_data topsy_theme_blue" style=""><script type="text/javascript" src="http://button.topsy.com/widget/retweet-small?url=http://davidsimpson.me/2009/04/16/4-useful-tips-on-google-analytics-reporting-for-confluence/&amp;title=4+Useful+Tips+on+Google+Analytics+Reporting+for+Confluence&amp;theme=blue&amp;order=count,retweet,badge&amp;txt_tweet=tweet&amp;txt_retweet=retweet"></script></div>
]]></content:encoded>
			<wfw:commentRss>http://davidsimpson.me/2009/04/16/4-useful-tips-on-google-analytics-reporting-for-confluence/feed/</wfw:commentRss>
		<slash:comments>5</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[Uncategorised]]></category>
		<category><![CDATA[analytics]]></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[
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?  The Global Activity statistics are [...]]]></description>
			<content:encoded><![CDATA[
<p>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="http://davidsimpson.me/wp-content/uploads/2009/03/confluence-global-activity1.png"><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="http://davidsimpson.me/wp-content/uploads/2009/03/google-analytics-account-settings.png"><img src="http://davidsimpson.me/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="http://davidsimpson.me/wp-content/uploads/2009/04/settings-site-search.png"><img src="http://davidsimpson.me/wp-content/uploads/2009/04/settings-site-search-150x150.png" alt="Settings - Site Search" title="settings-site-search" width="150" height="150" class="size-thumbnail wp-image-306" /></a><p class="wp-caption-text">A screenshot of the Site Search Setting section</p></div></p>
<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="http://davidsimpson.me/wp-content/uploads/2009/03/confluence-custom-html-1.png"><img src="http://davidsimpson.me/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 BODY&#8221; section:</p>
<p><a href="http://davidsimpson.me/wp-content/uploads/2009/03/confluence-custom-html-2.png"><img src="http://davidsimpson.me/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;">
&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;
try
{
	var pageTracker = _gat._getTracker(&quot;UA-XXXXXX-X&quot;);
	pageTracker._trackPageview();
}
catch(err)
{}
&lt;/script&gt;
</pre>
<h2>Results</h2>
<p>We&#8217;ve not had this running long, but it seems to work just fine.  As Confluence creates pages with distinct titles, its fairly easy to track how people are using the system. </p>
<p>Screenshot of Content by Title report:<br />
<a href="http://davidsimpson.me/wp-content/uploads/2009/03/ga-results-content-by-title1.png"><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="http://davidsimpson.me/wp-content/uploads/2009/03/ga-results-site-search.png"><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>
</ul>
<div class="topsy_widget_data topsy_theme_blue" style=""><script type="text/javascript" src="http://button.topsy.com/widget/retweet-small?url=http://davidsimpson.me/2009/03/18/tracking-atlassian-confluence-usage-with-google-analytics/&amp;shorturl=http://bit.ly/9e90vC&amp;title=Tracking+Atlassian+Confluence+usage+with+Google+Analytics&amp;theme=blue&amp;order=count,retweet,badge&amp;txt_tweet=tweet&amp;txt_retweet=retweet"></script></div>
]]></content:encoded>
			<wfw:commentRss>http://davidsimpson.me/2009/03/18/tracking-atlassian-confluence-usage-with-google-analytics/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>Tracking referers to your website from Twitter clients with Google Analytics</title>
		<link>http://davidsimpson.me/2009/03/13/tracking-referers-to-your-website-from-twitter-clients-with-google-analytics/</link>
		<comments>http://davidsimpson.me/2009/03/13/tracking-referers-to-your-website-from-twitter-clients-with-google-analytics/#comments</comments>
		<pubDate>Fri, 13 Mar 2009 19:53:50 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[analytics]]></category>
		<category><![CDATA[google analytics]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[web analytics]]></category>

		<guid isPermaLink="false">http://davidsimpson.me/?p=154</guid>
		<description><![CDATA[
If someone using a desktop Twitter client (such as TweetDeck or Twirl) clicks on a link I&#8217;ve posted to my blog, the Google Analytics referer information will be blank.  It registers as direct traffic to the website.  
This is fine when linking to other people&#8217;s websites &#8212; I&#8217;m not worried about them &#8212; [...]]]></description>
			<content:encoded><![CDATA[
<p>If someone using a desktop Twitter client (such as <a href="http://tweetdeck.com/">TweetDeck</a> or <a href="http://www.twhirl.org/">Twirl</a>) clicks on a link I&#8217;ve posted to my blog, the Google Analytics referer information will be blank.  It registers as direct traffic to the website.  </p>
<p>This is fine when linking to other people&#8217;s websites &mdash; I&#8217;m not worried about them &mdash; but I&#8217;d like to know where that traffic to <em>my</em> websites comes from.</p>
<p>I generally shorten URLs with a service like <a href="http://bit.ly">bit.ly</a> (which does provide basic statistics on click throughs).  The trouble here is that you still miss the referrer information on your Google Analytics account. </p>
<h2>How can we capture that the source of the link was a Twitter post?</h2>
<p>The <a href="http://www.epikone.com/blog/">Analytics Talk</a> blog post &mdash; <a href="http://www.epikone.com/blog/2008/09/02/tracking-twitter/">Twitter and Google Analytics: What to Track</a> &mdash; gives a good solution to this problem.</p>
<p>Put simply, before you shorten the URL, add the following GA campaign request parameters to the end:<br />
<code>?utm_campaign=blog&#038;utm_source=twitter&#038;utm_medium=micro-blog</code></p>
<p>e.g.<br />
<code>http://example.com/</code><br />
becomes<br />
<code>http://example.com/?utm_campaign=blog&#038;utm_source=twitter&#038;utm_medium=micro-blog</code> </p>
<p>Now you can track referrers from Twitter clients within Google Analytics using<br />
<code>Traffic Sources | Campaigns</code>.  Nice.</p>
<p>Check out <a href="http://www.epikone.com/blog/2008/09/02/tracking-twitter/">Twitter and Google Analytics: What to Track</a> by Justin Cutroni  for the details.  </p>
<p><b>Aside:</b> Justin&#8217;s <a href="http://www.gashortcut.com/">Google Analytics Short Cut</a> PDF book ($10 from O&#8217;Reilly) is a great read, but it was written in 2007 before the last GA update.  I hope Justin gets the time to release an updated version soon.</p>
<div class="topsy_widget_data topsy_theme_blue" style=""><script type="text/javascript" src="http://button.topsy.com/widget/retweet-small?url=http://davidsimpson.me/2009/03/13/tracking-referers-to-your-website-from-twitter-clients-with-google-analytics/&amp;title=Tracking+referers+to+your+website+from+Twitter+clients+with+Google+Analytics&amp;theme=blue&amp;order=count,retweet,badge&amp;txt_tweet=tweet&amp;txt_retweet=retweet"></script></div>
]]></content:encoded>
			<wfw:commentRss>http://davidsimpson.me/2009/03/13/tracking-referers-to-your-website-from-twitter-clients-with-google-analytics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Track Events in Flash Movies using WebTrends</title>
		<link>http://davidsimpson.me/2009/03/09/how-to-track-events-in-flash-movies-using-webtrends/</link>
		<comments>http://davidsimpson.me/2009/03/09/how-to-track-events-in-flash-movies-using-webtrends/#comments</comments>
		<pubDate>Mon, 09 Mar 2009 17:07:26 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[analytics]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[google analytics]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[webtrends]]></category>

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

If your website contains Flash movies that link offsite or to microsites, you may wish to register the offsite link using WebTrends.  This article provides an introduction.  It assumes a little knowledge of ActionScript, Javascript as well as WebTrends.
This example uses a intermediary javascript function that sits between the Flash movies and the [...]]]></description>
			<content:encoded><![CDATA[
<p><!-- How To Track Events in Flash Movies using WebTrends --></p>
<p>If your website contains Flash movies that link offsite or to microsites, you may wish to register the offsite link using WebTrends.  This article provides an introduction.  It assumes a little knowledge of ActionScript, Javascript as well as WebTrends.</p>
<p>This example uses a intermediary javascript function that sits between the Flash movies and the WebTrends code.</p>
<h3>Benefits</h3>
<ul>
<li>It&#8217;s much easier to debug if the WebTrends javascript is not called within the compiled Flash movie</li>
<li>The WebTrends tracking can be changed later without recompiling the Flash movie or even speaking to your Flash developer</li>
</ul>
<p><span id="more-106"></span></p>
<h3>Drawbacks</h3>
<ul>
<li>Javascript must be enabled to trigger the link to the target web page</li>
<li>Both Flash <i>and</i> Javascript will be required to navigate your website</li>
</ul>
<p><b>This is bad from an accessibility point of view</b>, but I won&#8217;t discuss that here.</p>
<h2>ActionScript for Flash buttons</h2>
<p>Edit your Flash movies so that the button that links to your external website or microsite has an ActionScript event handler which will trigger a call to Javascript.</p>
<h3>Older ActionScript versions</h3>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">on</span> <span style="color: #66cc66;">&#40;</span>release<span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">getURL</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;javascript:myFlashEvent('Open Days','http://www.nottingham.ac.uk/opendays');&quot;</span><span style="color: #66cc66;">&#41;</span>; 
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<h3>ActionScript 3+</h3>
<p>The <code>getURL</code> function was removed in ActionScript 3, so a slightly more complex example is required</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>ExternalInterface.<span style="color: #006600;">available</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">try</span>
	<span style="color: #66cc66;">&#123;</span>
		ExternalInterface.<span style="color: #0066CC;">call</span><span style="color: #66cc66;">&#40;</span>
			<span style="color: #ff0000;">'myFlashEvent'</span>,                        <span style="color: #808080; font-style: italic;">// function name</span>
			<span style="color: #ff0000;">'Open Days'</span>,                           <span style="color: #808080; font-style: italic;">// function parameter 1</span>
			<span style="color: #ff0000;">'http://www.nottingham.ac.uk/opendays'</span> <span style="color: #808080; font-style: italic;">// function parameter 2</span>
		<span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
	<span style="color: #0066CC;">catch</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">error</span>:<span style="color: #0066CC;">Error</span><span style="color: #66cc66;">&#41;</span>
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #808080; font-style: italic;">// Error handling here</span>
	<span style="color: #66cc66;">&#125;</span>
	<span style="color: #0066CC;">catch</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">error</span>:SecurityError<span style="color: #66cc66;">&#41;</span>
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #808080; font-style: italic;">// Error handling here</span>
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>The ActionScript calls the Javascript intermediary function <code>myFlashEvent</code>, which in turn registers the event with WebTrends and then loads the new web page.</p>
<h2>Javascript</h2>
<pre class="brush: jscript;">function myFlashEvent(eventDescription, eventValue){

	// Register Event with WebTrends
	dcsMultiTrack(
		'DCS.dcsuri', eventValue,                  // name/value pair for URL
		'WT.ti', 'FlashEvent:' + eventDescription  // name/value pair for page title
	);

	// Go to URL
	document.location.href = eventValue;
}</pre>
<p>This function will track the event as a visit to a URI using the <code>DCS.dcsuri</code> parameter.  The page title for the URI will be set to e.g. &#8216;FlashEvent:My Page Title&#8217; using the <code>WT.ti</code> parameter.</p>
<h2>Results</h2>
<p>The click event is showing up nicely in WebTrends as <code>FlashEvent:Open Days</code>, see the screenshot below</p>
<p><img class="hang-1-column" src="http://www.nottingham.ac.uk/~cczdas/images/webtrends-flash-event.png" alt="Screenshot of WebTrends Console" /></p>
<h2>Example code</h2>
<p>A working example of this code can be found <a href="http://www.nottingham.ac.uk/analytics-events/analytics-events/">here</a>.  </p>
<p>Sorry, I don&#8217;t have access to the .fla file, so that is not included.</p>
<h2>Adapting the Javascript for Google Analytics</h2>
<p>The <code>myFlashEvent</code> function can easily be adapted to work with Google Analytics instead:</p>
<pre class="brush: jscript;">function myFlashEvent(eventDescription, eventValue){

	// Register event
	pageTracker._trackEvent(
		'Flash', 'Link',
		eventDescription, eventValue
	);

	// Go to URL
	document.location.href = eventValue;
}</pre>
<h2>Reference</h2>
<ul>
<li><a href="http://www.arena.no/dokumentasjon/wt85/dcsMultiTrack.pdf">Tracking Complex Web Page Interactions Using dcsMultiTrack (WebTrends)</a></li>
<li><a href="http://blog.webtrends.com/2009/03/09/tracking-visitors-in-a-rich-media-world-part-i-tracking/">Tracking Visitors in a Rich Media World, Part I: Tracking</a></li>
<li><a href="http://code.google.com/apis/analytics/docs/eventTrackerGuide.html">Event Tracking Guide (Google Analytics)</a></li>
<li><strong>Update:</strong> Here&#8217;s a really elegant solution to adding <a href="http://www.embeddedstream.com/2009/02/27/webtrends-tracking-from-flash/">Webtrends tracking to Flash</a> movies</li>
<li><strong>Update:</strong> <a href="http://www.insideria.com/2009/02/using-google-analytics-within.html">Google Analytics within Flex/Flash Applications</a</li>
</ul>
<div class="topsy_widget_data topsy_theme_blue" style=""><script type="text/javascript" src="http://button.topsy.com/widget/retweet-small?url=http://davidsimpson.me/2009/03/09/how-to-track-events-in-flash-movies-using-webtrends/&amp;title=How+To+Track+Events+in+Flash+Movies+using+WebTrends&amp;theme=blue&amp;order=count,retweet,badge&amp;txt_tweet=tweet&amp;txt_retweet=retweet"></script></div>
]]></content:encoded>
			<wfw:commentRss>http://davidsimpson.me/2009/03/09/how-to-track-events-in-flash-movies-using-webtrends/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Google Analytics and SungardHE Luminis</title>
		<link>http://davidsimpson.me/2009/02/27/google-analytics-and-sungardhe-luminis/</link>
		<comments>http://davidsimpson.me/2009/02/27/google-analytics-and-sungardhe-luminis/#comments</comments>
		<pubDate>Fri, 27 Feb 2009 05:53:05 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[analytics]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[google analytics]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[luminis]]></category>
		<category><![CDATA[sungardhe]]></category>

		<guid isPermaLink="false">http://davidsimpson.me/?p=73</guid>
		<description><![CDATA[
The slides from a presentation I&#8217;m giving today at the European Luminis User Group (ELUG) meeting at the University of Greenwich.
Google Analytics and Sungard HE Luminis
View more presentations from dvdsmpsn. (tags: google analytics)


]]></description>
			<content:encoded><![CDATA[
<p>The slides from a presentation I&#8217;m giving today at the European Luminis User Group (ELUG) meeting at the <a href="http://www.gre.ac.uk">University of Greenwich</a>.</p>
<div id="__ss_1064557" style="width: 100%; text-align: left;"><a title="Google Analytics and Sungard HE Luminis" href="http://www.slideshare.net/dvdsmpsn/google-analytics-and-sungard-he-luminis?type=powerpoint" style="margin: 12px 0pt 3px; font-family: Helvetica,Arial,Sans-serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: 14px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; display: block; text-decoration: underline;">Google Analytics and Sungard HE Luminis</a><object height="100%" width="425" style="border: 0pt none  ! important; margin: 0px;"><param value="http://static.slideshare.net/swf/ssplayer2.swf?doc=usersdavidsimpsondocumentsgaandluminiseluggreenwichkeynote-090224105948-phpapp01&amp;rel=0&amp;stripped_title=google-analytics-and-sungard-he-luminis" name="movie"/><param value="true" name="allowFullScreen"/><param value="always" name="allowScriptAccess"/><embed height="367" width="425" allowfullscreen="true" allowscriptaccess="always" type="application/x-shockwave-flash" src="http://static.slideshare.net/swf/ssplayer2.swf?doc=usersdavidsimpsondocumentsgaandluminiseluggreenwichkeynote-090224105948-phpapp01&amp;rel=0&amp;stripped_title=google-analytics-and-sungard-he-luminis"/></object></p>
<div style="font-size: 11px; font-family: tahoma,arial; height: 26px; padding-top: 2px;">View more <a href="http://www.slideshare.net/" style="text-decoration: underline;">presentations</a> from <a href="http://www.slideshare.net/dvdsmpsn" style="text-decoration: underline;">dvdsmpsn</a>. (tags: <a href="http://slideshare.net/tag/google" style="text-decoration: underline;">google</a> <a href="http://slideshare.net/tag/analytics" style="text-decoration: underline;">analytics</a>)</div>
</div>
<div class="topsy_widget_data topsy_theme_blue" style=""><script type="text/javascript" src="http://button.topsy.com/widget/retweet-small?url=http://davidsimpson.me/2009/02/27/google-analytics-and-sungardhe-luminis/&amp;title=Google+Analytics+and+SungardHE+Luminis&amp;theme=blue&amp;order=count,retweet,badge&amp;txt_tweet=tweet&amp;txt_retweet=retweet"></script></div>
]]></content:encoded>
			<wfw:commentRss>http://davidsimpson.me/2009/02/27/google-analytics-and-sungardhe-luminis/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>jGoogleAnalytics &#8211; Google Analytics integration for jQuery</title>
		<link>http://davidsimpson.me/2008/06/18/jgoogleanalytics-google-analytics-integration-for-jquery/</link>
		<comments>http://davidsimpson.me/2008/06/18/jgoogleanalytics-google-analytics-integration-for-jquery/#comments</comments>
		<pubDate>Wed, 18 Jun 2008 10:43:17 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[analytics]]></category>
		<category><![CDATA[google analytics]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[university of nottingham]]></category>
		<category><![CDATA[web analytics]]></category>

		<guid isPermaLink="false">http://dvdsmpsn.wordpress.com/?p=3</guid>
		<description><![CDATA[
Since I last added Google Analytics to a website, Google have changed from the old urchin.js file to the shiny new ga.js file.  This means that I really ought to start using ga.js now.
The University of Nottingham uses Sungard&#8217;s Luminis portal system which produces some rather nasty looking URLs.   Web analytics for [...]]]></description>
			<content:encoded><![CDATA[
<p>Since I last added Google Analytics to a website, Google have changed from the old urchin.js file to the shiny new ga.js file.  This means that I really ought to start using ga.js now.</p>
<p>The <a href="http://www.nottingham.ac.uk/">University of Nottingham</a> uses Sungard&#8217;s Luminis portal system which produces some rather nasty looking URLs.   Web analytics for this is rather a handful &#8211; bad URLs, multiple features per page (each of which we&#8217;d like to track) and often tracking would be nice across sub-domains.</p>
<p>With that in mind,  and Google&#8217;s <a href="www.google.com/analytics/GATCmigrationguide.pdf">Tracking Code Migration Guide</a> close at hand, I&#8217;ve written jGoogleAnalytics.js to allow me to track:</p>
<ul>
<li>clicks events</li>
<li>form submit events</li>
<li>cross subdomain</li>
<li>cross domain (e.g. for eCommerce payment gateways hosted externally)</li>
<li>new organic search engines</li>
<li>all the features of <a href="http://devblog.jasonhuck.com/2007/11/19/google-analytics-integration-with-jquery/">Jason Huck&#8217;s GA jQuery integration</a></li>
</ul>
<p><a title="Download jGoogleAnalytics - Google Analytics integration for jQuery" href="http://webapps.nottingham.ac.uk/js/jquery/jGoogleAnalytics.js">Download jGoogleAnalytics.js</a><br />
<span id="more-82"></span><br />
Usage:</p>
<pre class="brush: jscript;">// At it's simplest
$.jGoogleAnalytics( 'UA-XXXXXX-X');

// More advanced version
$.jGoogleAnalytics(
	'UA-XXXXXX-X', // Your GA tracker code
	{
		anchorClick: false, // adds click tracking to *all* anchors
		clickEvents: null, // e.g. {'.popup': '/popup/nasty'}
		crossDomainSelector: false, // e.g. 'a.crossDomain'
		domainName: false, // e.g. 'nottingham.ac.uk'

		evalClickEvents: null, // e.g. {'#menu li a': &quot;'/tabs/'+ $(this).text()&quot;}
		evalSubmitEvents: null, // e.g. {'#menu li a': &quot;'/tabs/'+ $(this).text()&quot;}

		extensions: [
		'pdf','doc','xls','csv','jpg','gif', 'mp3',
		'swf','txt','ppt','zip','gz','dmg','xml'
		], // download extensions to track

		external: '/external/', // prefix to add to external links
		mailto: '/mailto/', // prefix to add to email addresses
		download: '/download/', // prefix to add to downloads

		organicSearch: null, // e.g. {'search-engine': 'query-term', 'google.nottingham.ac.uk': 'q'}
		pageViewsEnabled: true, // can be disabled e.g. if only tracking e.g. click events
		sampleRate: null, // e.g. 50 - set the sample rate at 50%
		submitEvents: {'#personUK': '/personsearch/uk'}
	}
);</pre>
<p>I&#8217;ve not added any eCommerce tracking to this release as we simply don&#8217;t have the need for it.</p>
<p>If you use this script, pplease leave a comment!</p>
<div class="topsy_widget_data topsy_theme_blue" style=""><script type="text/javascript" src="http://button.topsy.com/widget/retweet-small?url=http://davidsimpson.me/2008/06/18/jgoogleanalytics-google-analytics-integration-for-jquery/&amp;title=jGoogleAnalytics+-+Google+Analytics+integration+for+jQuery&amp;theme=blue&amp;order=count,retweet,badge&amp;txt_tweet=tweet&amp;txt_retweet=retweet"></script></div>
]]></content:encoded>
			<wfw:commentRss>http://davidsimpson.me/2008/06/18/jgoogleanalytics-google-analytics-integration-for-jquery/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
	</channel>
</rss>
