Steven Mileham – General Geekery

October 23, 2009

Google Analytics – Tracking page categories

Filed under: Technology — Tags: , , — smileham @ 2:30 pm

I’ve recently been looking at how I can use Google Analytics to track website usage of content based on the category it has been assigned.  We are using META tags in the page headings to store the category name and title of the content.

Google have just rolled out a bunch of excessively handy features allowing custom variables in their most recent update to the analytics package, unfortunetly my Analytics account hasn’t yet been updated to include them.  As a fall back I’ve used the Event Tracking functionality instead.

At the bottom of each page which I want to track the category of, added the following code;

  1.  
  2. <script type="text/javascript">
  3.   var pageTracker = _gat._getTracker("<%= googleAnalyticsId %>");
  4.  
  5.   function getMeta(name) {
  6.     var metas = document.getElementsByTagName(‘META’);
  7.     for (var i = 0; i < metas.length; i++){
  8.       if (metas[i].getAttribute(‘NAME’) == name){
  9.         return metas[i].getAttribute(‘CONTENT’);
  10.       }
  11.     }
  12.     return "null";
  13.   }
  14.  
  15.   try {
  16.     var cat = getMeta("CATEGORY");
  17.     var title = getMeta("ARTICLE_NAME");
  18.  
  19.     if(cat != "null" &amp;&amp; title != "null"){
  20.       pageTracker._trackEvent(‘Category’,cat,title);
  21.     }
  22.   }catch(ex){
  23.     /* do nothing */
  24.   }
  25.   pageTracker._trackPageview();
  26. </script>
  27.  

Using this codes means that I can put these meta tags into the headings of any page;

  1.  
  2. <meta name="CATEGORY" content="Analytics" />
  3. <meta name="ARTICLE_NAME" content="Custom Variables" />
  4.  

And Google Analytics will track the my each of my articles based on the category they have been tagged with.

March 12, 2009

Random Weather

Filed under: Technology — Tags: , — smileham @ 11:56 am

Similar to the foliagometer a while ago, I stumbled across another “fun” feature on a website today.

The random weather generator of devthought.com.  Worth checking out for a bit of inspiration.

Built using MooTools rather than jQuery, but I wouldn’t hold that against it :)

Devthought — JavaScript, MooTools, PHP, Symfony, WordPress and all the stuff you love.

February 26, 2009

The future of Google Chrome

Filed under: Technology — Tags: , , , , — smileham @ 6:14 pm

Google as a company just seem to get it, by introducing (yet) another browser into the wild, they began another round of the browser wars. Kicking off a flurry of innovation, which browser manages to render the acid tests? Who can perform the most javascript calls per milli-second? etc.

All Google seems to care about is that this innovation continues, so that they can build web applications to run on these platforms.

This interview is really worth a read to see the direction of Google and the Chrome browser.

Interview: what’s next for Google Chrome

Always the Google fan boy!

February 23, 2009

JQuery 1.3.2 Released

Filed under: Technology — Tags: , , — smileham @ 2:51 pm

I am definitely a huge fan of jQuery.  Every release seems to astound and amaze in it’s sheer brilliance and genius.  The new ad spinner on the home page is written in jQuery, as well as the small bit of functionality on the Photography page.

Anyway, go and check out the newest release, mostly a maintenance update, it still has a few new features too! I shall certainly be using jQuery in all future developments!

jQuery 1.3.2

February 13, 2009

Your Software Made Me Cry: How to Select an Open-Source Java Portal for your Enterprise

Filed under: Technology — Tags: , — smileham @ 5:00 pm

The sad hideous truth of Liferay…

I still love Liferay, but this may save some people a bit of heart break!  I went through almost exactly the same journey in choosing Liferay for a new large scale website.

At first it seems to offer everything you ever wanted in a portal system, even more so (including making the coffee), but once you start to look beneath the hood, things become a little murkier.  It was after a shambolic training course that I fell out of love with Liferay, but after looking through a few alternatives, it became the best contender again.

It’s all about managing expectations…

Your Software Made Me Cry: How to Select an Open-Source Java Portal for your Enterprise.

February 4, 2009

Liferay 5.2 Released

Filed under: Technology — Tags: , , — smileham @ 6:11 pm

The guys at Liferay have unleashed Liferay 5.2 upon the world.

Liferay is a fantastic Java based portal system.  I’m currently involved in a project to deliver a website integrating a CMS system and the Liferay portal.  Through development of JSR 168 based portlets written using the Spring Portlet MVC framework, Liferay can enable a huge amount of flexibility to the business to create, update and maintain a hugely complex site with little effort.

As an open source product, it is a shining star of what can be achieved with a focused team.  Liferay has become an enterprise level product powering the web sites and intranets of several large brand name companies.

All in all, congratulations are in order for a VERY good job done!

PRESS RELEASE: Liferay Portal 5.2 Released

December 18, 2008

WordPress 1.7

Filed under: Technology — Tags: , , — smileham @ 1:15 pm

WordPress LogoJust upgraded to the latest version of WordPress.  Each release seems to come on leaps and bounds.  The new admin interface is fantastic, usable and feature rich.

The ability to automatically upgrade plugins, and to newer versions of wordpress once their released is a brilliant addition, meaning maintainence of the system is now a doddle.

The inclusion of a fair swaith of jQuery helps keep the interface smooth, the code small and compatible across all the browsers.

It’s a very impressive release!

Keep up the good work guys!

May 17, 2008

Wild Wild Wiki

Filed under: Technology — Tags: , — smileham @ 10:04 am

Wild Wild WestSites like Wikipedia have had a meteoric rise to fame (and potential fortune) over the last few years. There was a time when a random question was answered with a plain “I have no idea” now it’s generally a question of who can type in www.wikipedia.com the fastest.

In some ways, the prominence of Wikipedia has almost “sullied” the concept of a wiki. When someone says “wiki” it’s the first example that springs to mind, with all of the baggage that accompanies it. Some see Wikipedia as a resource of knowledge, others as a chaotic tangle of mis-truths and flame wars. Some of the fairly recent press on Wikipedia hasn’t helped this image.

This prejudice towards wikipedia spills out onto wiki’s in general, which has made selling the concept of a wiki to the corporate world something of a challenge.

Wiki’s allow communities of people to share knowledge and experience on relevant topics in a structured yet flexible manner.  In order to leverage the power of this collaborative resource, a level or order must be imposed on the evolution of a wiki.  Wikipedia benefits from a core group of dedicated administrators policing the site, re-writing, linking and trimming the articles entered from the collective conscious of the internet.  In a corporate environment where resources (people) are more limited in the time they can spend enforcing structure, sections of the wiki need to be organised in a consistent and logical manner.

Companies can greatly benefit from the wiki concepts.  Corporate Wiki’s can become vast stores of knowledge, all interlinked from article to article, allowing a user reading the policy regarding the Disaster Recovery policy immediate links to related pages on back-up procedures or fire regulations, etc.  Were these documents each stored in a static Word document, it would increase complexity.

When looking for advice on introducing a wiki into the business world, I trawled the web looking for some kind of “best practice” which would help me to define a structure and hierarchy which would encourage use and growth in a scalable and maintainable way.  The best resource I discovered in this capacity was WikiPatterns, an excellent resource of Patterns and Anti-Patterns, how you can get the best use out of them, or solve their issues as they arise.

I am currently working on a project to implement the Confluence wiki from Atlassian.  This is a Java based, fully supported enterprise level wiki.  In my own webspace, I plan to use MediaWiki, the open source wiki behind Wikipedia.

May 13, 2008

Site Update

Filed under: Technology — Tags: — smileham @ 11:38 pm

I’ve added a page showing pictures from my Flickr account.  Mainly as a quick proof of concept of integrating Flickr with WordPress.

February 14, 2008

Lists

Filed under: Technology — Tags: , — smileham @ 2:56 pm

Web development sites are ten a penny, but A List Apart is one of the best resources on the net. Great articles on standards, design, freelancing and technical crunch.

Older Posts »

Powered by WordPress