<?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>Graphic Euphoria&#187; google</title>
	<atom:link href="http://www.graphic-euphoria.co.uk/tag/google/feed" rel="self" type="application/rss+xml" />
	<link>http://www.graphic-euphoria.co.uk</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Mon, 12 Oct 2009 14:57:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Google Analyitics &#8211;  fix the &#8216;_gat&#8217; is undefined problem in IE6 with Mootools</title>
		<link>http://www.graphic-euphoria.co.uk/google-analyitics-fix-the-_gat-is-undefined-problem-in-ie6-with-mootools</link>
		<comments>http://www.graphic-euphoria.co.uk/google-analyitics-fix-the-_gat-is-undefined-problem-in-ie6-with-mootools#comments</comments>
		<pubDate>Mon, 02 Mar 2009 14:03:12 +0000</pubDate>
		<dc:creator>Si</dc:creator>
				<category><![CDATA[Inspiration]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[analytics]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[mootools]]></category>

		<guid isPermaLink="false">http://www.graphic-euphoria.co.uk/?p=196</guid>
		<description><![CDATA[Google Analytics is a fantastic, totally free, web tracking service provided by Google. It works by embedding a javascript include at the bottom of your page which loads Google's tracking code. The code then passes all your tracking information to the Anaylitics cloud where it is digested and returned in the web-app.
The Problem

The code has to be included just before your closing body tag, this is because Google doesnt want to hold up your page loading while it crunches this data, by placing it there it guarentees 99% of your page has finished loading. This works perfectly in almost all cases but there have been exceptions. The only time i have come across a problem was when i was testing a site on Internet Explorer 6. I kept recieving this error: '_gat' is undefined]]></description>
			<content:encoded><![CDATA[<strong>Google Analytics</strong> is a fantastic, totally free, <strong>web tracking</strong> service provided by <strong>Google</strong>. It works by embedding a <strong>Javascript </strong>include at the bottom of your page which loads Google&#8217;s tracking code. The code then passes all your tracking information to the <strong>Analytics cloud</strong> where it is digested and returned in the <strong>web-app</strong>.
<h3>The Problem</h3>
The code has to be included just before your closing body tag, this is because Google doesn&#8217;t want to hold up your page loading while it crunches this data, by placing it there it guarantees 99% of your page has finished loading. This works perfectly in almost all cases but there have been exceptions. The only time i have come across a problem was when i was testing a site on <strong>Internet Explorer 6</strong>. I kept receiving this error:
<pre>'_gat' is undefined</pre>
This can only be created when the code tries to call the <strong>Analytics </strong>code before it is launched. Basically, it&#8217;s is trying to call the function _gat too soon. Google have tried to fix this by adding a <strong>Javascript </strong>&#8216;try&#8217; function.
<pre name="code" class="html">&lt;script type="text/javascript"&gt;
	var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
	document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
&lt;/script&gt;
&lt;script type="text/javascript"&gt;
	try {
		var pageTracker = _gat._getTracker("UX-XXXXXX-X");
		pageTracker._trackPageview();
	} catch(err) {}
&lt;/script&gt;</pre>
This helps as the code &#8216;tries&#8217; to run the function and if it can&#8217;t then it runs the catch command. This works because it doesn&#8217;t create any other errors and the site will continue operating normally. The only problem is no tracking information will be passed.
<h4>Fixing it with Mootools</h4>
Firstly, more and more websites are using <strong>Javascript </strong>to provide better <strong>interactivity </strong>and <strong>functionality </strong>so there is a good chance you are already using a <strong>library </strong>in your site. Secondly they provide <strong>core functions</strong> which can detect when the page&#8217;s DOM is ready and when the page itself has actually finished loading. There a couple of things that can improved by converting this code to use a popular <strong>Javascript </strong>framework such as <strong>Mootools</strong>. Page load speed should be improved as we try to insert the tracking code after the page has completely finished loading and has been initiated. As a result we can also hope to improve the code performance by making sure the code has been downloaded before trying to run it.

Using <strong>Mootools </strong>we simply add a new <strong>Javascript </strong>assets into the page using the &#8216;addEvent&#8217; function and then run the <strong>analyitics </strong>function calls when it has loaded.
<pre name="code" class="javascript">
window.addEvent('load', function() {
	var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
	new Asset.javascript(gaJsHost + "google-analytics.com/ga.js", {
		onload: function() {
			try {
			var pageTracker = _gat._getTracker("UX-XXXXXX-X");
			pageTracker._trackPageview();
			} catch(err) {}
		}
	});
});</pre>
As you can see, I have left the try function in, this is to protect against the same problem we faced initially. Only this time the chance of it happening has greatly reduced. Another benefit of using this method is that you can remove the tracking code from your HTML template or masterpage. Now it is simply added into your <strong>Javascript </strong>include instead. If you use <strong>analytics </strong>to track your <strong>AJAX </strong>calls then it helps that all your code is in the same place!

I hope you find this useful, please leave a comment if you know of any improvements or think you know a better method.<script src="http://feeds.feedburner.com/~s/sidonaldson?i=http://www.graphic-euphoria.co.uk/google-analyitics-fix-the-_gat-is-undefined-problem-in-ie6-with-mootools" type="text/javascript" charset="utf-8"></script>]]></content:encoded>
			<wfw:commentRss>http://www.graphic-euphoria.co.uk/google-analyitics-fix-the-_gat-is-undefined-problem-in-ie6-with-mootools/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>iGoogle gets an update and now i can check Gmail at work!</title>
		<link>http://www.graphic-euphoria.co.uk/igoogle-gets-an-update-and-now-i-can-check-gmail-at-work</link>
		<comments>http://www.graphic-euphoria.co.uk/igoogle-gets-an-update-and-now-i-can-check-gmail-at-work#comments</comments>
		<pubDate>Sat, 14 Feb 2009 14:11:26 +0000</pubDate>
		<dc:creator>Si</dc:creator>
				<category><![CDATA[Web-Apps]]></category>
		<category><![CDATA[Websites]]></category>
		<category><![CDATA[google]]></category>

		<guid isPermaLink="false">http://www.graphic-euphoria.co.uk/?p=72</guid>
		<description><![CDATA[Your browser homepage is more important than you think. The days of the old Google are long gone. You can personalise a homepage to include many optional extras such as email, RSS aggregators, calendars, ebay listings and even weather forecasts. Not only that but there are a multitude of similar solutions available. Live.com, yahoo, netvibes to name a few. I have experimented with netvibes and live.com but every time I find myself back with Google.]]></description>
			<content:encoded><![CDATA[<h3>Land Here</h3>
Your <strong>browser </strong>homepage is more important than you think. The days of the old <a title="google" href="http://www.google.com" target="_blank"><strong>Google </strong></a>are long gone. You can <strong>personalise </strong>a homepage to include many optional extras such as email, <strong>RSS aggregators</strong>, <strong>calendars</strong>, <strong>ebay </strong>listings and even <strong>weather forecasts</strong>. Not only that but there are a multitude of similar solutions available. <a title="live.com" href="http://live.com" target="_blank"><strong>Live.com</strong></a>, <a title="yahoo.com" href="http://www.yahoo.com" target="_blank"><strong>yahoo</strong></a>, <a title="netvibes.com" href="http://www.netvibes.com" target="_blank"><strong>netvibes </strong></a>to name a few. I have experimented with netvibes and live.com but every time I find myself back with Google.
<h3>Why?</h3>
Well, these solutions are limited by two problems. <strong>Compatibility </strong>and <strong>speed</strong>. A huge percentage of the add-ons are made by independent programmers and as such they sometimes don’t include all the features you would expect, have compatibility issues and sometimes they are not maintained. The second issue occurs when you add many add-ons to your page thus increasing the load times. Some solutions offer a tab system which only load the visible add-ons but this can still be a problem. As a result I now only have three add-ons. <a title="gmail" href="http://mail.google.com" target="_blank">Gmail</a>, <a title="google calendar" href="http://www.google.com/calendar/" target="_blank">google calendar</a> and a to-do list. Personally I have found anything else is worthless to me as I find it easier to go the site. The only other one I tried was the <a title="google reader" href="http://www.google.com/reader" target="_blank">Google Reader</a> add-on. Again, this simply did not perform well enough to stop me needing to view the actual <strong>web app</strong>. I now have a streamlined and efficient landing page. It shows me the information I need to know when I first start surfing and ONLY the information I would automatically check every time.
<h3>What’s changed</h3>
Google has updated iGoogle! Some would say it’s long over due, I would have to agree. The minimal Google look is surprisingly looking a little bit dated! (strange i know) It’s looking a lot more like netvibes, round corners and more effective tabbing. Check out the screenshot..

<a href="http://www.graphic-euphoria.co.uk/uploads/images/oct_08/iGoogle.jpg" target="blank"><img src="http://www.graphic-euphoria.co.uk/uploads/images/oct_08/iGoogle_thumb.jpg" alt="" /></a>

It gives it a more friendly feel. I much prefer it. There are practical benefits too; you have the option of viewing your add-on at full width and with the more developed add-ons you get much more <strong>functionality</strong>. The two which have impressed me the most is Gmail and Google Calendar. Click on the side nav and you basically get these two as fully functional sites. I now can cancel Gmail from forwarding all my mail to my work email account and can receive it right here in the browser, even though it is blocked. Fantastic. Good work Google. Thanks!

(ps my iGoogle page has the radiohead theme)<script src="http://feeds.feedburner.com/~s/sidonaldson?i=http://www.graphic-euphoria.co.uk/igoogle-gets-an-update-and-now-i-can-check-gmail-at-work" type="text/javascript" charset="utf-8"></script>]]></content:encoded>
			<wfw:commentRss>http://www.graphic-euphoria.co.uk/igoogle-gets-an-update-and-now-i-can-check-gmail-at-work/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
