<?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: Tracking Events in Google Analytics</title>
	<atom:link href="http://www.ravelrumba.com/blog/tracking-events-in-analytics/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ravelrumba.com/blog/tracking-events-in-analytics/</link>
	<description>web design &#38; development</description>
	<lastBuildDate>Sat, 04 Feb 2012 00:48:25 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: TVD</title>
		<link>http://www.ravelrumba.com/blog/tracking-events-in-analytics/comment-page-1/#comment-1516</link>
		<dc:creator>TVD</dc:creator>
		<pubDate>Mon, 05 Sep 2011 16:22:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.ravelrumba.com/?p=421#comment-1516</guid>
		<description>Recently, I extended Google Analytics to add download tracking for Google&#039;s new Asynchronous Google Analytics Model. I call the extension Entourage.js:

http://techoctave.com/c7/posts/58-entourage-js-automatic-download-tracking-for-asynchronous-google-analytics

My approach was to handle each link&#039;s onclick event. The intent was to reduce (if not eliminate) any cross-browser compatibility issues since the onclick event is fairly consistently interpreted.

It&#039;s framework agnostic. Like you, I wanted developers to have the freedom to use the extension and still use whatever JavaScript framework they want.

I love jQuery, but I&#039;ve always had much respect for the MooTools and Prototype.js community too. Didn&#039;t want them to have to load jQuery just to track file downloads.</description>
		<content:encoded><![CDATA[<p>Recently, I extended Google Analytics to add download tracking for Google&#8217;s new Asynchronous Google Analytics Model. I call the extension Entourage.js:</p>
<p><a href="http://techoctave.com/c7/posts/58-entourage-js-automatic-download-tracking-for-asynchronous-google-analytics" rel="nofollow">http://techoctave.com/c7/posts/58-entourage-js-automatic-download-tracking-for-asynchronous-google-analytics</a></p>
<p>My approach was to handle each link&#8217;s onclick event. The intent was to reduce (if not eliminate) any cross-browser compatibility issues since the onclick event is fairly consistently interpreted.</p>
<p>It&#8217;s framework agnostic. Like you, I wanted developers to have the freedom to use the extension and still use whatever JavaScript framework they want.</p>
<p>I love jQuery, but I&#8217;ve always had much respect for the MooTools and Prototype.js community too. Didn&#8217;t want them to have to load jQuery just to track file downloads.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</title>
		<link>http://www.ravelrumba.com/blog/tracking-events-in-analytics/comment-page-1/#comment-1216</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Wed, 04 May 2011 10:17:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.ravelrumba.com/?p=421#comment-1216</guid>
		<description>Where shall I put your code in order for google analytics to record clicks?

thanks!</description>
		<content:encoded><![CDATA[<p>Where shall I put your code in order for google analytics to record clicks?</p>
<p>thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Craig</title>
		<link>http://www.ravelrumba.com/blog/tracking-events-in-analytics/comment-page-1/#comment-693</link>
		<dc:creator>Craig</dc:creator>
		<pubDate>Wed, 18 Aug 2010 21:19:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.ravelrumba.com/?p=421#comment-693</guid>
		<description>I noticed this code is not tracking file names with multiple dots. For example, I&#039;m trying to track a large set of Fw PNG downloads on my site. The file names are like this:

ico.usb.fw.png

Is there a way around this?</description>
		<content:encoded><![CDATA[<p>I noticed this code is not tracking file names with multiple dots. For example, I&#8217;m trying to track a large set of Fw PNG downloads on my site. The file names are like this:</p>
<p>ico.usb.fw.png</p>
<p>Is there a way around this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob Flaherty</title>
		<link>http://www.ravelrumba.com/blog/tracking-events-in-analytics/comment-page-1/#comment-665</link>
		<dc:creator>Rob Flaherty</dc:creator>
		<pubDate>Thu, 01 Jul 2010 15:56:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.ravelrumba.com/?p=421#comment-665</guid>
		<description>Hi James,
You&#039;re correct about the potential race condition, but I think just about every tracking script is exposed to a potential race condition, no?  (FWIW, I don&#039;t think I mentioned it in the post but in my implementation of the script I&#039;ve placed it inside the DOM ready function.)  GA&#039;s Async implementation allows activity to be recorded even before the GA script has loaded by storing the events in the _gaq array.  So the race is between the execution of the click tracking function and the user&#039;s clicking.

I believe your setTimeout method is compatible but I think there&#039;s a better solution.</description>
		<content:encoded><![CDATA[<p>Hi James,<br />
You&#8217;re correct about the potential race condition, but I think just about every tracking script is exposed to a potential race condition, no?  (FWIW, I don&#8217;t think I mentioned it in the post but in my implementation of the script I&#8217;ve placed it inside the DOM ready function.)  GA&#8217;s Async implementation allows activity to be recorded even before the GA script has loaded by storing the events in the _gaq array.  So the race is between the execution of the click tracking function and the user&#8217;s clicking.</p>
<p>I believe your setTimeout method is compatible but I think there&#8217;s a better solution.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Royal-Lawson</title>
		<link>http://www.ravelrumba.com/blog/tracking-events-in-analytics/comment-page-1/#comment-664</link>
		<dc:creator>James Royal-Lawson</dc:creator>
		<pubDate>Thu, 01 Jul 2010 14:06:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.ravelrumba.com/?p=421#comment-664</guid>
		<description>I like the non-jquery solution you&#039;ve done... one question though - Will it potentially suffer from a race condition?

I can&#039;t see a delay anywhere and i&#039;m guessing that any link will still be followed whilst this onclick code is being executed - meaning that there&#039;s a risk the next page starts loading before __utm.gif is returned by GA.

Normally i&#039;d add a 
setTimeout(&#039;document.location = &quot;&#039; + link.href + &#039;&quot;&#039;, 150); to my clicktracking function and then a return false; to the onclick in the &lt;a&gt; tag.  Is that solution compatible with yours?

/James.</description>
		<content:encoded><![CDATA[<p>I like the non-jquery solution you&#8217;ve done&#8230; one question though &#8211; Will it potentially suffer from a race condition?</p>
<p>I can&#8217;t see a delay anywhere and i&#8217;m guessing that any link will still be followed whilst this onclick code is being executed &#8211; meaning that there&#8217;s a risk the next page starts loading before __utm.gif is returned by GA.</p>
<p>Normally i&#8217;d add a<br />
setTimeout(&#8216;document.location = &#8220;&#8216; + link.href + &#8216;&#8221;&#8216;, 150); to my clicktracking function and then a return false; to the onclick in the <a> tag.  Is that solution compatible with yours?</p>
<p>/James.</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>

