<?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: Track Downloads and Other Click Events in Analytics with jQuery</title>
	<atom:link href="http://www.ravelrumba.com/blog/track-downloads-and-other-click-events-in-analytics-with-jquery/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ravelrumba.com/blog/track-downloads-and-other-click-events-in-analytics-with-jquery/</link>
	<description>web design &#38; web development</description>
	<lastBuildDate>Tue, 27 Jul 2010 00:01:26 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4261</generator>
	<item>
		<title>By: Rob Flaherty</title>
		<link>http://www.ravelrumba.com/blog/track-downloads-and-other-click-events-in-analytics-with-jquery/comment-page-1/#comment-670</link>
		<dc:creator>Rob Flaherty</dc:creator>
		<pubDate>Mon, 05 Jul 2010 15:53:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.ravelrumba.com/?p=233#comment-670</guid>
		<description>David,
Yes!  For an updated version that uses the async implementation, see &lt;a href=&quot;/blog/tracking-events-in-analytics/&quot; rel=&quot;nofollow&quot;&gt;this post&lt;/a&gt;.</description>
		<content:encoded><![CDATA[<p>David,<br />
Yes!  For an updated version that uses the async implementation, see <a href="/blog/tracking-events-in-analytics/" rel="nofollow">this post</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://www.ravelrumba.com/blog/track-downloads-and-other-click-events-in-analytics-with-jquery/comment-page-1/#comment-669</link>
		<dc:creator>David</dc:creator>
		<pubDate>Mon, 05 Jul 2010 11:13:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.ravelrumba.com/?p=233#comment-669</guid>
		<description>hi,

Do you have an updated plugin for using with asynchronous google analytics?</description>
		<content:encoded><![CDATA[<p>hi,</p>
<p>Do you have an updated plugin for using with asynchronous google analytics?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Track Downloads and Other Click Events in Analytics with jQuery &#124; MirthLab</title>
		<link>http://www.ravelrumba.com/blog/track-downloads-and-other-click-events-in-analytics-with-jquery/comment-page-1/#comment-99</link>
		<dc:creator>Track Downloads and Other Click Events in Analytics with jQuery &#124; MirthLab</dc:creator>
		<pubDate>Mon, 14 Dec 2009 22:00:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.ravelrumba.com/?p=233#comment-99</guid>
		<description>[...] First time here? Subscribe to my  RSS feed or  follow me on Twitter. Thanks for visiting!A great rundown by Rob Flaherty on how to Track Downloads and Other Click Events in Analytics with jQuery: [...]</description>
		<content:encoded><![CDATA[<p>[...] First time here? Subscribe to my  RSS feed or  follow me on Twitter. Thanks for visiting!A great rundown by Rob Flaherty on how to Track Downloads and Other Click Events in Analytics with jQuery: [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Phil Dokas</title>
		<link>http://www.ravelrumba.com/blog/track-downloads-and-other-click-events-in-analytics-with-jquery/comment-page-1/#comment-98</link>
		<dc:creator>Phil Dokas</dc:creator>
		<pubDate>Mon, 14 Dec 2009 21:02:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.ravelrumba.com/?p=233#comment-98</guid>
		<description>I&#039;d have to sit down with it for a bit to check, but in my experience you often need to use the &quot;target&quot; prop of the event object passed to the handler (e.g. $(&#039;foo&#039;).live(&#039;click&#039;, function(event) { /* … */ $(event.target).doStuff(); }); ) to ensure that the event is handled correctly every time. My understanding being that -- at least sometimes, sorry that I don&#039;t have a precise explanation here -- the scope the function will run in is the document and thus &quot;this&quot; will point to the document object.

It&#039;s entirely possible that I&#039;ve been missing something in my projects though. I&#039;ll look into this when I&#039;ve got free time later tonight.</description>
		<content:encoded><![CDATA[<p>I&#8217;d have to sit down with it for a bit to check, but in my experience you often need to use the &#8220;target&#8221; prop of the event object passed to the handler (e.g. $(&#8216;foo&#8217;).live(&#8216;click&#8217;, function(event) { /* … */ $(event.target).doStuff(); }); ) to ensure that the event is handled correctly every time. My understanding being that &#8212; at least sometimes, sorry that I don&#8217;t have a precise explanation here &#8212; the scope the function will run in is the document and thus &#8220;this&#8221; will point to the document object.</p>
<p>It&#8217;s entirely possible that I&#8217;ve been missing something in my projects though. I&#8217;ll look into this when I&#8217;ve got free time later tonight.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob Flaherty</title>
		<link>http://www.ravelrumba.com/blog/track-downloads-and-other-click-events-in-analytics-with-jquery/comment-page-1/#comment-34</link>
		<dc:creator>Rob Flaherty</dc:creator>
		<pubDate>Fri, 04 Dec 2009 22:40:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.ravelrumba.com/?p=233#comment-34</guid>
		<description>Hey Phil, I think you&#039;re absolutely correct.  Since we&#039;re binding multiple classes to the same handler, the .live() method, from a performance perspective, would be the smarter approach.

My only concern is that .live(), as you said, relies on the event bubbling up to the document level.  If an ancestor of our tracking element has a click event handler using &lt;code&gt;return false&lt;/code&gt;, the bubbling chain is terminated before the event reaches the document.  Ben Nadel has a nice &lt;a href=&quot;http://www.bennadel.com/index.cfm?dax=blog:1754.view&quot; rel=&quot;nofollow&quot;&gt;post about this&lt;/a&gt;, where 2 solutions are discussed: using a &lt;code&gt;mousedown&lt;/code&gt; event instead of &lt;code&gt;click&lt;/code&gt;, and using &lt;code&gt;preventDefault&lt;/code&gt; instead of &lt;code&gt;return false&lt;/code&gt;.

How is &quot;this&quot; affected by using .live() in place of .bind()?  I was able to replace bind with live in the aforementioned code and everything worked as before.

Thanks for your comments!</description>
		<content:encoded><![CDATA[<p>Hey Phil, I think you&#8217;re absolutely correct.  Since we&#8217;re binding multiple classes to the same handler, the .live() method, from a performance perspective, would be the smarter approach.</p>
<p>My only concern is that .live(), as you said, relies on the event bubbling up to the document level.  If an ancestor of our tracking element has a click event handler using <code>return false</code>, the bubbling chain is terminated before the event reaches the document.  Ben Nadel has a nice <a href="http://www.bennadel.com/index.cfm?dax=blog:1754.view" rel="nofollow">post about this</a>, where 2 solutions are discussed: using a <code>mousedown</code> event instead of <code>click</code>, and using <code>preventDefault</code> instead of <code>return false</code>.</p>
<p>How is &#8220;this&#8221; affected by using .live() in place of .bind()?  I was able to replace bind with live in the aforementioned code and everything worked as before.</p>
<p>Thanks for your comments!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
