<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Google Analytics unblocks the Web w/ Async support</title>
	<atom:link href="http://ajaxian.com/archives/google-analytics-unblocks-the-web-w-async-support/feed" rel="self" type="application/rss+xml" />
	<link>http://ajaxian.com/archives/google-analytics-unblocks-the-web-w-async-support</link>
	<description>Cleaning up the web with Ajax</description>
	<lastBuildDate>Thu, 17 May 2012 07:43:39 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: Aphrodisiac</title>
		<link>http://ajaxian.com/archives/google-analytics-unblocks-the-web-w-async-support/comment-page-1#comment-277896</link>
		<dc:creator>Aphrodisiac</dc:creator>
		<pubDate>Fri, 15 Jan 2010 11:51:45 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8089#comment-277896</guid>
		<description>i like it
thanks</description>
		<content:encoded><![CDATA[<p>i like it<br />
thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rosamez</title>
		<link>http://ajaxian.com/archives/google-analytics-unblocks-the-web-w-async-support/comment-page-1#comment-277022</link>
		<dc:creator>rosamez</dc:creator>
		<pubDate>Sat, 05 Dec 2009 18:04:12 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8089#comment-277022</guid>
		<description>Afaik Firefox 3.5 supports &quot;defer&quot;, or am I wrong? Plus according to the spec async and defer are not exactly the same - though I do understand they&#039;re pretty close to each other.

Also if one does lots and lots of event tracking (some immediately) then I think it&#039;s better to *wait* for the script to arrive, but that&#039;s a fair trade.</description>
		<content:encoded><![CDATA[<p>Afaik Firefox 3.5 supports &#8220;defer&#8221;, or am I wrong? Plus according to the spec async and defer are not exactly the same &#8211; though I do understand they&#8217;re pretty close to each other.</p>
<p>Also if one does lots and lots of event tracking (some immediately) then I think it&#8217;s better to *wait* for the script to arrive, but that&#8217;s a fair trade.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: BenGerrissen</title>
		<link>http://ajaxian.com/archives/google-analytics-unblocks-the-web-w-async-support/comment-page-1#comment-276998</link>
		<dc:creator>BenGerrissen</dc:creator>
		<pubDate>Fri, 04 Dec 2009 11:37:03 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8089#comment-276998</guid>
		<description>Hmm, or just put the *bleep* thing high up in the head to get it over with and have a white page for a few miliseconds.
.
labjs is a nice solution, though people get the opportunity to click away before ga.js fires, that might be an issue for the stat freaks.</description>
		<content:encoded><![CDATA[<p>Hmm, or just put the *bleep* thing high up in the head to get it over with and have a white page for a few miliseconds.<br />
.<br />
labjs is a nice solution, though people get the opportunity to click away before ga.js fires, that might be an issue for the stat freaks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: holy2050</title>
		<link>http://ajaxian.com/archives/google-analytics-unblocks-the-web-w-async-support/comment-page-1#comment-276966</link>
		<dc:creator>holy2050</dc:creator>
		<pubDate>Thu, 03 Dec 2009 15:11:23 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8089#comment-276966</guid>
		<description>Thank you!
i will test it in this website http://www.electric-power.us</description>
		<content:encoded><![CDATA[<p>Thank you!<br />
i will test it in this website <a href="http://www.electric-power.us" rel="nofollow">http://www.electric-power.us</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jordan1</title>
		<link>http://ajaxian.com/archives/google-analytics-unblocks-the-web-w-async-support/comment-page-1#comment-276962</link>
		<dc:creator>Jordan1</dc:creator>
		<pubDate>Thu, 03 Dec 2009 14:32:38 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8089#comment-276962</guid>
		<description>Or they could just go with [script defer src=&quot;&quot;][/script] to get async scripts working for the majority of users. Won&#039;t work in Firefox though.
&lt;</description>
		<content:encoded><![CDATA[<p>Or they could just go with [script defer src=""][/script] to get async scripts working for the majority of users. Won&#8217;t work in Firefox though.<br />
&lt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Afraithe</title>
		<link>http://ajaxian.com/archives/google-analytics-unblocks-the-web-w-async-support/comment-page-1#comment-276960</link>
		<dc:creator>Afraithe</dc:creator>
		<pubDate>Thu, 03 Dec 2009 11:25:08 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8089#comment-276960</guid>
		<description>Correct me if i am wrong, but by not waiting for the script, isn&#039;t there a chance that the user can navigate away before the script gets loaded and this the stats get screwed?</description>
		<content:encoded><![CDATA[<p>Correct me if i am wrong, but by not waiting for the script, isn&#8217;t there a chance that the user can navigate away before the script gets loaded and this the stats get screwed?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tung148</title>
		<link>http://ajaxian.com/archives/google-analytics-unblocks-the-web-w-async-support/comment-page-1#comment-276954</link>
		<dc:creator>tung148</dc:creator>
		<pubDate>Thu, 03 Dec 2009 04:38:48 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8089#comment-276954</guid>
		<description>Wow, Cool!</description>
		<content:encoded><![CDATA[<p>Wow, Cool!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: eyelidlessness</title>
		<link>http://ajaxian.com/archives/google-analytics-unblocks-the-web-w-async-support/comment-page-1#comment-276952</link>
		<dc:creator>eyelidlessness</dc:creator>
		<pubDate>Thu, 03 Dec 2009 03:29:44 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8089#comment-276952</guid>
		<description>pablop: The easiest way is probably to send a .js file with several megabytes of whitespace down the tubes.</description>
		<content:encoded><![CDATA[<p>pablop: The easiest way is probably to send a .js file with several megabytes of whitespace down the tubes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pablop</title>
		<link>http://ajaxian.com/archives/google-analytics-unblocks-the-web-w-async-support/comment-page-1#comment-276946</link>
		<dc:creator>pablop</dc:creator>
		<pubDate>Wed, 02 Dec 2009 20:36:29 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8089#comment-276946</guid>
		<description>I&#039;m providing a widget to websites.
When my hosting provider went down, websites complained that the page took to much time to load.

I was trying to simulate this scenario so I&#039;ll be able to fix it by putting a non-existing script url but it didn&#039;t slow down the page.

Can someone recommend a way to simulate a non responding third party script scenario?

Thanks</description>
		<content:encoded><![CDATA[<p>I&#8217;m providing a widget to websites.<br />
When my hosting provider went down, websites complained that the page took to much time to load.</p>
<p>I was trying to simulate this scenario so I&#8217;ll be able to fix it by putting a non-existing script url but it didn&#8217;t slow down the page.</p>
<p>Can someone recommend a way to simulate a non responding third party script scenario?</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: getify</title>
		<link>http://ajaxian.com/archives/google-analytics-unblocks-the-web-w-async-support/comment-page-1#comment-276943</link>
		<dc:creator>getify</dc:creator>
		<pubDate>Wed, 02 Dec 2009 19:12:06 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8089#comment-276943</guid>
		<description>http://yura.thinkweb2.com/jstests/document_head_test_by_Garrett.html
.
Try that in certain browsers (like Chrome and Opera 10), and you&#039;ll see that in fact the comment node is the first node returned (which is of course invalid to nest a &lt;script&gt; element under). 
.
My feeling is the GA code is *NOT* safe as is. They should use a more robust option.</description>
		<content:encoded><![CDATA[<p><a href="http://yura.thinkweb2.com/jstests/document_head_test_by_Garrett.html" rel="nofollow">http://yura.thinkweb2.com/jstests/document_head_test_by_Garrett.html</a><br />
.<br />
Try that in certain browsers (like Chrome and Opera 10), and you&#8217;ll see that in fact the comment node is the first node returned (which is of course invalid to nest a &lt;script&gt; element under).<br />
.<br />
My feeling is the GA code is *NOT* safe as is. They should use a more robust option.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jadet</title>
		<link>http://ajaxian.com/archives/google-analytics-unblocks-the-web-w-async-support/comment-page-1#comment-276941</link>
		<dc:creator>Jadet</dc:creator>
		<pubDate>Wed, 02 Dec 2009 18:54:42 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8089#comment-276941</guid>
		<description>@westonruter: yeah that would be better, document.documentElement.firstChild isn&#039;t a safe way to find a node you can append a script to.</description>
		<content:encoded><![CDATA[<p>@westonruter: yeah that would be better, document.documentElement.firstChild isn&#8217;t a safe way to find a node you can append a script to.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: westonruter</title>
		<link>http://ajaxian.com/archives/google-analytics-unblocks-the-web-w-async-support/comment-page-1#comment-276940</link>
		<dc:creator>westonruter</dc:creator>
		<pubDate>Wed, 02 Dec 2009 18:45:17 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8089#comment-276940</guid>
		<description>&lt;blockquote&gt;…that fails if the document doesn’t have a head element. This is a more robust implementation.&lt;/blockquote&gt;

Actually, there’s a problem with &lt;code&gt;document.documentElement.firstChild.appendChild(ga)&lt;/code&gt;… in my XHTML documents (at least) &lt;code&gt;document.documentElement.firstChild&lt;/code&gt; is a text node, not an element, so the &lt;code&gt;appendChild&lt;/code&gt; operation fails. Don’t HTML parsers automatically insert a HEAD element into the DOM even when one isn’t specified in the markup? Wouldn’t &lt;code&gt;document.getElementsByTagName(&quot;head&quot;)[0].appendChild(ga)&lt;/code&gt; still be a better approach?</description>
		<content:encoded><![CDATA[<blockquote><p>…that fails if the document doesn’t have a head element. This is a more robust implementation.</p></blockquote>
<p>Actually, there’s a problem with <code>document.documentElement.firstChild.appendChild(ga)</code>… in my XHTML documents (at least) <code>document.documentElement.firstChild</code> is a text node, not an element, so the <code>appendChild</code> operation fails. Don’t HTML parsers automatically insert a HEAD element into the DOM even when one isn’t specified in the markup? Wouldn’t <code>document.getElementsByTagName("head")[0].appendChild(ga)</code> still be a better approach?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: meandmycode</title>
		<link>http://ajaxian.com/archives/google-analytics-unblocks-the-web-w-async-support/comment-page-1#comment-276935</link>
		<dc:creator>meandmycode</dc:creator>
		<pubDate>Wed, 02 Dec 2009 16:33:20 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8089#comment-276935</guid>
		<description>Seems like they should have made the entire way you call the api a lot better if you were making a new version.</description>
		<content:encoded><![CDATA[<p>Seems like they should have made the entire way you call the api a lot better if you were making a new version.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: eyelidlessness</title>
		<link>http://ajaxian.com/archives/google-analytics-unblocks-the-web-w-async-support/comment-page-1#comment-276934</link>
		<dc:creator>eyelidlessness</dc:creator>
		<pubDate>Wed, 02 Dec 2009 16:21:41 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8089#comment-276934</guid>
		<description>mcsnolte,

A script right at the end of body will still block running scripts, and possibly other resources that load async.

What I want to know is how this works in IE. Why not add the defer attribute for compatibility?</description>
		<content:encoded><![CDATA[<p>mcsnolte,</p>
<p>A script right at the end of body will still block running scripts, and possibly other resources that load async.</p>
<p>What I want to know is how this works in IE. Why not add the defer attribute for compatibility?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Remi</title>
		<link>http://ajaxian.com/archives/google-analytics-unblocks-the-web-w-async-support/comment-page-1#comment-276933</link>
		<dc:creator>Remi</dc:creator>
		<pubDate>Wed, 02 Dec 2009 16:18:49 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8089#comment-276933</guid>
		<description>@mcsnolte : when directly inserting before the &quot;html&quot; closed tag, it prevents browsers (or JS frameworks) to fire the &quot;pageReady&quot; event. For sites which are dependent on this event to perform some actions (DOM manipulations, ...), having a blocker call to google-analytics.com could be a huge problem !</description>
		<content:encoded><![CDATA[<p>@mcsnolte : when directly inserting before the &#8220;html&#8221; closed tag, it prevents browsers (or JS frameworks) to fire the &#8220;pageReady&#8221; event. For sites which are dependent on this event to perform some actions (DOM manipulations, &#8230;), having a blocker call to google-analytics.com could be a huge problem !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: AbelGonzalez</title>
		<link>http://ajaxian.com/archives/google-analytics-unblocks-the-web-w-async-support/comment-page-1#comment-276932</link>
		<dc:creator>AbelGonzalez</dc:creator>
		<pubDate>Wed, 02 Dec 2009 15:35:25 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8089#comment-276932</guid>
		<description>This is a great improvement.  At Keynote we see many of our client&#039;s sites get delayed due to the placement of JavaScript from an analytics tag.  These delays can either be transparent to the user (loads at the end) or actually block the entire page from loading if it is one of the first things to be requested.</description>
		<content:encoded><![CDATA[<p>This is a great improvement.  At Keynote we see many of our client&#8217;s sites get delayed due to the placement of JavaScript from an analytics tag.  These delays can either be transparent to the user (loads at the end) or actually block the entire page from loading if it is one of the first things to be requested.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mcsnolte</title>
		<link>http://ajaxian.com/archives/google-analytics-unblocks-the-web-w-async-support/comment-page-1#comment-276931</link>
		<dc:creator>mcsnolte</dc:creator>
		<pubDate>Wed, 02 Dec 2009 15:15:40 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8089#comment-276931</guid>
		<description>This seems very nice, but can someone explain how this is an improvement over putting the GA script right before the closing BODY?  Won&#039;t everything before the GA script be rendered before the script is fetched anyway?

Thanks in advance</description>
		<content:encoded><![CDATA[<p>This seems very nice, but can someone explain how this is an improvement over putting the GA script right before the closing BODY?  Won&#8217;t everything before the GA script be rendered before the script is fetched anyway?</p>
<p>Thanks in advance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: blepore</title>
		<link>http://ajaxian.com/archives/google-analytics-unblocks-the-web-w-async-support/comment-page-1#comment-276930</link>
		<dc:creator>blepore</dc:creator>
		<pubDate>Wed, 02 Dec 2009 14:55:10 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8089#comment-276930</guid>
		<description>I am very glad to see this finally get pushed out to the masses!

Has anyone here seen this on their Tracking Code page&#039;s in GA? I&#039;ve checked my accounts and I haven&#039;t seen it listed there. If I hadn&#039;t caught the GA blog post or this article I&#039;d have never noticed they added support.

BTW, was this code updated since it was posted last night? I swear that when I looked at it before they also added the type attribute to the ga variable.

Lastly, I just checked and if anyone hadn&#039;t noticed Google has re-enabled gzip compression on ga.js!</description>
		<content:encoded><![CDATA[<p>I am very glad to see this finally get pushed out to the masses!</p>
<p>Has anyone here seen this on their Tracking Code page&#8217;s in GA? I&#8217;ve checked my accounts and I haven&#8217;t seen it listed there. If I hadn&#8217;t caught the GA blog post or this article I&#8217;d have never noticed they added support.</p>
<p>BTW, was this code updated since it was posted last night? I swear that when I looked at it before they also added the type attribute to the ga variable.</p>
<p>Lastly, I just checked and if anyone hadn&#8217;t noticed Google has re-enabled gzip compression on ga.js!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sixtyseconds</title>
		<link>http://ajaxian.com/archives/google-analytics-unblocks-the-web-w-async-support/comment-page-1#comment-276929</link>
		<dc:creator>sixtyseconds</dc:creator>
		<pubDate>Wed, 02 Dec 2009 14:52:10 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8089#comment-276929</guid>
		<description>self.promote(+1);</description>
		<content:encoded><![CDATA[<p>self.promote(+1);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: getify</title>
		<link>http://ajaxian.com/archives/google-analytics-unblocks-the-web-w-async-support/comment-page-1#comment-276928</link>
		<dc:creator>getify</dc:creator>
		<pubDate>Wed, 02 Dec 2009 14:13:48 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8089#comment-276928</guid>
		<description>It’s obviously a HUGE improvement over the default document.write() mess from before. And if GA is the only script you are loading onto your page, I think this is probably the best answer.
.
But, if you are loading a couple (or several) scripts, and you want to take advantage of simple async loading of scripts, you can use LABjs. http://labjs.com
.
The simple code to load GA with LABjs would be this:
.
$LAB
.script((’https:’ == document.location.protocol ? ‘https://ssl’ : ‘http://www’) + ‘.google-analytics.com/ga.js’)
.wait(function(){
pageTracker = _gat._getTracker(”UA-XXX-XX”);
pageTracker._trackPageview();
});</description>
		<content:encoded><![CDATA[<p>It’s obviously a HUGE improvement over the default document.write() mess from before. And if GA is the only script you are loading onto your page, I think this is probably the best answer.<br />
.<br />
But, if you are loading a couple (or several) scripts, and you want to take advantage of simple async loading of scripts, you can use LABjs. <a href="http://labjs.com" rel="nofollow">http://labjs.com</a><br />
.<br />
The simple code to load GA with LABjs would be this:<br />
.<br />
$LAB<br />
.script((’https:’ == document.location.protocol ? ‘https://ssl’ : ‘http://www’) + ‘.google-analytics.com/ga.js’)<br />
.wait(function(){<br />
pageTracker = _gat._getTracker(”UA-XXX-XX”);<br />
pageTracker._trackPageview();<br />
});</p>
]]></content:encoded>
	</item>
</channel>
</rss>

