<?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>Ravelrumba by Rob Flaherty</title>
	<atom:link href="http://www.ravelrumba.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ravelrumba.com</link>
	<description>web design &#38; development</description>
	<lastBuildDate>Mon, 28 May 2012 13:01:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Squander</title>
		<link>http://www.ravelrumba.com/blog/squander/</link>
		<comments>http://www.ravelrumba.com/blog/squander/#comments</comments>
		<pubDate>Sat, 26 May 2012 18:46:20 +0000</pubDate>
		<dc:creator>Rob Flaherty</dc:creator>
				<category><![CDATA[eMedia]]></category>
		<category><![CDATA[General Web]]></category>
		<category><![CDATA[Publishing]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[media]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[publishing]]></category>
		<category><![CDATA[social media]]></category>

		<guid isPermaLink="false">http://www.ravelrumba.com/?p=1677</guid>
		<description><![CDATA[A few weeks ago Aaron Gustafson wrote a post explaining how third-party widgets can compromise user privacy by tracking users&#8217; browsing activity. It&#8217;s something many developers are familiar with but Aaron took the additional step of detailing a roll-your-own solution for popular third-party widgets. It&#8217;s good. If you make websites you should check it out. The [...]]]></description>
			<content:encoded><![CDATA[<p>A few weeks ago Aaron Gustafson wrote a post explaining how <a href="http://blog.easy-designs.net/archives/2012/04/24/dont-sell-out-your-users/" target="_blank">third-party widgets can compromise user privacy</a> by tracking users&#8217; browsing activity. It&#8217;s something many developers are familiar with but Aaron took the additional step of detailing a roll-your-own solution for popular third-party widgets. It&#8217;s good. If you make websites you should check it out.</p>
<p>The shadowy transmission of user data that Aaron mentions raises concerns for multiple reasons. For one, end users have an interest in protecting their own privacy. Two, people who make websites have an obligation to protect user privacy for the benefit of their users (to what degree they are obliged is of course the subject of <a href="http://www.guardian.co.uk/technology/2012/may/26/cookies-law-changed-implied-consent" target="_blank">much debate</a>).</p>
<p>There&#8217;s a third case that gets less attention, and it has to do with the interest that audience-monetized websites have in protecting user data <em>for their own benefit.</em> And I don&#8217;t mean it in the sense that honorable websites that look out for their users will be rewarded by appreciative customers. I&#8217;m referring to the importance of not letting valuable audience data escape to your competitors&#8217; servers. That&#8217;s what this post is about.</p>
<p>First, I&#8217;ll restate the problem and concerned parties so you can decide if this is something you&#8217;re interested in.</p>
<p><strong>Problem:</strong> Adding third-party widgets like Facebook&#8217;s Like button and Twitter&#8217;s Tweet button to your site opens up a one-way channel of data transmission between your site and the widget provider. This data allows the widget provider to know which pages on your site their users view.</p>
<p><strong>Who should care about this:</strong> In the broadest sense, anyone who works on digital products. In particular, digital products with revenue streams dependent on providing third parties access to audiences. More particularly, products that generate revenue from advertising. Most particularly, the publishing industry, who, having spent the better part of the last decade hoping the internet would go away, is most vulnerable as it tries to wobble up off the mat.</p>
<p>What&#8217;s the big deal if Facebook knows that one of their users viewed certain pages on your site? Let&#8217;s get into it.</p>
<h5>Free content cannot be monetized</h5>
<p>First off let&#8217;s agree that free content is never monetized. Content you give away for free has no exchange value. That&#8217;s why it&#8217;s free. You can, of course, make lots of money offering free content by monetizing the audience that consumes your content.</p>
<p>Niche media markets provide an easy way to illustrate how this works. Imagine you&#8217;re in the business of selling vintage gumball machines to gumball machine enthusiasts. How do you get exposure to the small group of people interested in your product?</p>
<p>Ten years ago you would buy an ad in a print publication aimed at gumball machine enthusiasts. The publication would contain all sorts of interesting content for people who love antique gumball machines but the person paying for this whole operation—you, the advertiser—would obviously not be paying for the content but for access to a particular audience. And access to that audience would be worth a lot because how the hell else are you going to find those people?</p>
<p>For the publisher this is all good until someone else slithers into the market with a competing publication and offers access to the same audience for less.</p>
<p>OK, so this is Publishing 101, Advertising 101, nothing new, you already know this, everyone who works in the industry already knows it. And yet&#8230;</p>
<h5>Who are we competing with?</h5>
<p>Last year a financial institution invited a handful of media companies to their offices to talk about an upcoming rebranding campaign. I was in attendance and the list of invitees was made up of standard players like The Economist, Dow Jones, and Time. But there was one name that stood out from the others: LinkedIn.</p>
<p>I was delighted because LinkedIn&#8217;s name on the schedule was proof of something that I and one of my tech colleagues had been trying to impress upon others for awhile—that social networks like LinkedIn and Facebook are not partners with media companies, but competitors.</p>
<p>At first the response from some of my colleagues was one of confusion. &#8220;LinkedIn? Why are they here?&#8221; What was surprising was how quickly the confusion was dismissed and the threat shrugged off. Here we were competing for the <em>same advertising budget on the same afternoon</em> and yet they could still not see a social media company as a competitor. Now I was confused.</p>
<p>After a little discussion the answer emerged: &#8220;Yeah, but LinkedIn doesn&#8217;t write news.&#8221; Right. So as long as LinkedIn doesn&#8217;t start writing news we&#8217;re all good. Hmmm.</p>
<h5>Fuuuuuuungibility</h5>
<p>One of the very best pieces I&#8217;ve read on the state of online journalism is a recent article by Stijn Debrouwere titled <a href="http://stdout.be/2012/05/04/fungible/" target="_blank">Fungible</a>. If you&#8217;re unfamiliar with the term, a fungible object is one that can be exchanged for another object of identical substance and value. It&#8217;s a basic economic concept&#8230; and a brilliant title.</p>
<p>The article&#8217;s thesis is that &#8220;&#8230;journalism is not being disrupted by better journalism but by things that are hardly recognizable as journalism at all.&#8221; Stijn writes about how sites like Quora, Wikipedia, IMDB, and EveryBlock now fulfill many of the needs that people used to turn to journalism for. Audiences are exchanging journalism for non-journalism. And the thing is that they&#8217;re not exchanging it for something else, but for something that amounts to the same thing. (That&#8217;s the fungible part.)</p>
<h5>Eggs</h5>
<p>So again, it&#8217;s audience and not content that is the true business asset. Your audience, whether it&#8217;s a literal database of registered users or a free-roaming anonymous swarm of eyeballs (as is the case with most free content sites) is the thing to guard.</p>
<p>Mark Twain said, &#8220;Put all of your eggs in one basket—and watch that basket!&#8221; Media companies already have all the eggs in the audience basket. How well are they watching it?</p>
<p>This gets us back to the main point, which is that the web makes it very easy for one site to leak its precious audience data to another. All it takes is one widget, one little snippet of Javascript, to open up the gates.</p>
<p>Take the gumball machine example again but fast forward to the present and swap roles. Now you&#8217;re the publisher of GumballGuru.com and companies buy advertising on your site to gain access to your audience. On each of the pages on your site you have a Facebook Like button that reports back to Facebook which of their users are regular visitors to your site. This allows Facebook to build a database of people interested in gumball machines. The like button earns you some traffic from Facebook. Woot. But in exchange, you hand over your users. You squander your eggs.</p>
<p>Now your advertisers have another way to reach their target audience. Instead of buying ads on GumballGuru.com—as well as on your competitor GumballManiac.com—they can go to Facebook and purchase ads targeted at both users who like GumballGuru and GumballManiac. And they can do this at a much better cost.</p>
<p>By the way, if you don&#8217;t know, this is a real thing. You can go to Facebook today and purchase advertising exactly this way.</p>
<p>The sad thing is that publishers have been an accomplice to a heist they don&#8217;t yet realize they&#8217;re the victim of. It&#8217;s true that Facebook can collect this sort of data in other ways but they could never gather it so quickly and in such detail without cooperation from sites that did the hard work of building the audiences in the first place.</p>
<p>I&#8217;m using Facebook only as an example. It&#8217;s probably safe to say that the majority of third party widget providers are harvesting user data in some way. <a href="http://www.addthis.com/privacy#.T8DrLHlYs1c" target="_blank">AddThis does</a>, <a href="http://sharethis.com/privacy" target="_blank">ShareThis does</a>, <a href="http://twitter.com/privacy" target="_blank">Twitter does</a>, <a href="http://www.linkedin.com/static?key=privacy_policy" target="_blank">LinkedIn does</a>. We shouldn&#8217;t vilify them. The fact that the data is being collected doesn&#8217;t mean it&#8217;s been used in nefarious ways. You should just understand that when you add a piece of third-party JavaScript to your site, in exchange for whatever service you&#8217;re getting you&#8217;re giving the provider access to your user base.</p>
<h5>It&#8217;s not the end of the world</h5>
<p>I&#8217;ve painted a stark picture and admittedly reached out to extremes in an effort to clearly illustrate the problem. Not all media outfits are critically exposed to this threat. Advertisers and media agencies are not shifting their entire budgets to Facebook and LinkedIn tomorrow. There&#8217;s still question about the value of social network advertising. Journalism still has value and publishers are still more than capable of cultivating important relationships with their audiences. Facebook is not going to replace The New York Times (although it may replace GumballGuru).</p>
<p>The goal of this post was to draw attention to two ideas. One, that in a digital world, data about your audience IS your audience. And two, that data on the web is incredibly exposed and prone to being shared in ways even the people building the websites aren&#8217;t aware of.</p>
<p>What&#8217;s the solution? I have no idea. Building a fence around your product isn&#8217;t the answer. Probably the best thing to do is to continue to focus on building products that solve problems for people. Products that people will pull into their lives. While at the same time being aware of who you&#8217;re competing with and who you&#8217;re sharing data with.</p>
<p>That should make for a good start.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ravelrumba.com/blog/squander/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Third-Party Cookies Explained</title>
		<link>http://www.ravelrumba.com/blog/third-party-cookies/</link>
		<comments>http://www.ravelrumba.com/blog/third-party-cookies/#comments</comments>
		<pubDate>Sun, 13 May 2012 20:51:47 +0000</pubDate>
		<dc:creator>Rob Flaherty</dc:creator>
				<category><![CDATA[General Web]]></category>
		<category><![CDATA[cookies]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[privacy]]></category>
		<category><![CDATA[third-party cookies]]></category>

		<guid isPermaLink="false">http://www.ravelrumba.com/?p=1686</guid>
		<description><![CDATA[For reasons I don&#8217;t understand, the subject of HTTP cookies tends to attract confusion, vague understanding, and outright misinformation. For instance, you may have read that cookies are scripts, or &#8220;programs&#8221;, or software, all of which are untrue. You may have read that cookies can transmit viruses or install malware on your computer. Also untrue. [...]]]></description>
			<content:encoded><![CDATA[<p>For reasons I don&#8217;t understand, the subject of HTTP cookies tends to attract confusion, vague understanding, and outright misinformation. For instance, you may have read that cookies are scripts, or &#8220;programs&#8221;, or software, all of which are untrue. You may have read that cookies can transmit viruses or install malware on your computer. Also untrue.</p>
<p>The misunderstandings grow further when you get into the matter of different types of cookies: first-party cookies, third-party cookies, Flash cookies, etc.</p>
<p>This post is concerned with third-party cookies, a subject I&#8217;ve singled out because of its day-to-day relevancy, importance to user privacy, and ease with which users can exercise control of it. It&#8217;s also something that I find even web developers can be easily confused about.</p>
<p>I hope this provides a clear understanding of how third-party cookies work and answers some of the questions you may have. First&#8230;</p>
<h5>There&#8217;s no such thing as a third-party cookie</h5>
<p>Right? OK, I&#8217;ll explain. Your browser maintains a collection of cookies. It receives a request from a website to store a cookie and it adds the cookie to the collection. There isn&#8217;t a collection of first-party cookies and a collection of third-party cookies, there&#8217;s just a collection of cookies.</p>
<p>The thing to understand is that there is <strong>no intrinsic difference</strong> between a first-party cookie and a third-party cookie. There are just cookies. The distinction only exists at runtime, within the context of a particular visit.</p>
<p>If a cookie is associated with a file requested from the same domain as the page you are viewing, it&#8217;s a first-party cookie. A cookie associated with a file requested from a different domain is a third-party cookie. That&#8217;s it.</p>
<p>Notice that the same cookie can be a first-party cookie one moment and a third-party cookie the next. For instance, when you visit twitter.com your browser sets several cookies associated wth the *.twitter.com domain name. In the context of your stay on Twitter these are first-party cookies. If you then visit huffingtonpost.com, Huffington Post requests files from twitter.com and those requests include the same *.twitter.com cookies, which are now third-party cookies.</p>
<h5>What&#8217;s a cookie again?</h5>
<p>We&#8217;ll do this real quick. (Begin obligatory http-request-as-casual-conversation-to-explain-how-cookies-work):</p>
<p>You visit a website and your browser starts requesting all the files that constitute the website. So your browser asks the server, &#8220;Can I have sleepy-cat.gif?&#8221; and the server is like, &#8220;Yeah, here you go oh and take this thing and bring it with you when you come back for more files. So I know it&#8217;s you.&#8221; Your browser says &#8220;kthxbye&#8221; and then returns a nanosecond later: &#8220;Hi can I have invisible-bike-cat.jpg? Oh and here, I have this thing.&#8221; And then the server goes, &#8220;Oh it&#8217;s <em>you</em>.&#8221;</p>
<p>At this point you&#8217;ve probably figured out that the mentioned thing is the cookie. That&#8217;s far from a complete description and it doesn&#8217;t explain why a server might want to recognize a browser but that&#8217;s stuff you can easily look up <a href="http://en.wikipedia.org/wiki/HTTP_cookie" target="_blank">elsewhere</a> and also I said we were going to keep this short.</p>
<h5>Cookies are powerful</h5>
<p>So in a sense, cookies connect the dots for the server. Without cookies there&#8217;s no way for the server to know that the requests for sleepy-cat.gif and invisible-bike-cat.jpg came from the same browser—from the same user.</p>
<p>There&#8217;s the rub. Cookies enable servers to aggregate requests—and thus data—around a particular user.</p>
<p>At the first-party level this is (mostly) all well and good. If you&#8217;re logged into Twitter the server uses a cookie to maintain your session, letting you stay logged in with each request.</p>
<p>But third-party cookie transactions perform no such value and instead tend to be used for behind-the-scenes tracking purposes. Again, if you&#8217;re reading an article on the Huffington Post, identification information is sent back to Twitter when the requests are made for the Tweet and Follow buttons. And just to be clear, you don&#8217;t have to interact with these buttons for the cookies to be sent. They are sent automatically as soon as the page loads.</p>
<p><img src="http://s.ravelrumba.com/uploads/2012/05/third-party-cookie-twitter.jpg" alt="Screenshot showing Twitter third party cookie data on Huffington Post" title="third-party-cookie-twitter" class="alignnone size-full wp-image-1689" style="border: 1px solid #ddd;" /></p>
<p><em>Network inspector screenshot showing third-party cookie sent to Twitter.</em></p>
<h5>What happens when you disable third-party cookies</h5>
<p>So third-party cookies can be pretty gross. The good news is that you have the ability to shut this whole party down by disabling third-party cookies in your browser preferences. Disabling third-party cookies does two things.</p>
<p>One, it prevents HTTP responses and scripts from other domains from setting cookies. The instruction to store a cookie is simply ignored.</p>
<p>Is that enough? Just block third-party cookies from being <em>set</em>? Nope. Because you&#8217;ll remember that there is no intrinsic difference between first- and third-party cookies and that the same cookie can act as both in different contexts.</p>
<p>So the second thing disabling third-party cookies does is remove cookies from requests to domains that are not the document origin domain. In other words cookies are only sent to the current site that you&#8217;re viewing.</p>
<h5>Privacy</h5>
<p>I want to mention that not all third-party cookie activity is part of a data mining effort to stalk you across the web. Once a cookie is set the receiving site has no say about when the cookies are sent. They&#8217;re simply sent all the time. So just because a cookie is pinned to a request doesn&#8217;t mean the receiving server is tracking your activity.</p>
<p>In other cases, tracking your activity across different sites is exactly what the third-party cookies are for.</p>
<p>As users, most of us have an interest in protecting our privacy. Disabling third-party cookies is recommended for anyone concerned with privacy, as it can drastically reduce the amount of data collected about what we do online.</p>
<p>If you make websites you also have to worry about the privacy of your users. This means being aware of the privacy implications of third-party code and knowing how these vendors use third-party cookies. (Aaron Gustafson wrote a great post about this a few weeks ago. You should check it out. Link below.)</p>
<p>I hope this helped with your understanding of third-party cookies. If you have any questions or recommended additions/subtractions, please leave a note in the comments.</p>
<h5>Related Articles</h5>
<ul>
<li><a href="http://blog.easy-designs.net/archives/2012/04/24/dont-sell-out-your-users/" target="_blank">Don&#8217;t Sell Out Your Users</a> by Aaraon Gustafson</li>
<li><a href="http://www.nczonline.net/blog/2009/05/05/http-cookies-explained/" target="_blank">HTTP Cookies Explained</a> by Nicholas Zakas</li>
<li><a href="/blog/static-cookieless-domain/" target="_blank">Serving Static Content from a Cookieless Domain</a> by Me</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.ravelrumba.com/blog/third-party-cookies/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Should optional link disabling for touch interfaces be a thing?</title>
		<link>http://www.ravelrumba.com/blog/link-disabling-for-touch-interfaces/</link>
		<comments>http://www.ravelrumba.com/blog/link-disabling-for-touch-interfaces/#comments</comments>
		<pubDate>Fri, 04 May 2012 03:16:20 +0000</pubDate>
		<dc:creator>Rob Flaherty</dc:creator>
				<category><![CDATA[General Web]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Touch]]></category>
		<category><![CDATA[UX]]></category>
		<category><![CDATA[tablet]]></category>
		<category><![CDATA[touch]]></category>
		<category><![CDATA[UI]]></category>

		<guid isPermaLink="false">http://www.ravelrumba.com/?p=1650</guid>
		<description><![CDATA[I don&#8217;t know if this happens to you but every now and then when I&#8217;m reading an article on my iPhone or iPad, I touch the screen to scroll and my finger inadvertently bumps into a link. Woops. Most times it&#8217;s not a problem but it can be annoying if I&#8217;m on a low-bandwidth connection, [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t know if this happens to you but every now and then when I&#8217;m reading an article on my iPhone or iPad, I touch the screen to scroll and my finger inadvertently bumps into a link. Woops. Most times it&#8217;s not a problem but it can be annoying if I&#8217;m on a low-bandwidth connection, reading offline, or viewing a site not optimized for mobile.</p>
<p>Clumsiness on my part is mostly to blame. But it also has something to do with the fact that the primary interaction method on touch screens is overloaded (i.e., the same action has to perform multiple functions).</p>
<p>Anyway, when this happens I sometimes wish there was a way to &#8220;link lock&#8221; a page the same way that the orientation lock works. Toggle a switch and links are turned off so that scrolling, zooming, and gesturing can be performed without risk of leaving the page.</p>
<p>Of course this doesn&#8217;t make a ton of sense, considering that links and page interconnectedness are sort of the whole point of the web, but I think it&#8217;s an idea worth poking at, if only for the length of this short blog post.</p>
<p><img class="alignnone size-full wp-image-1651" title="linklock-multi-touch-gesture" src="http://s.ravelrumba.com/uploads/2012/04/linklock-multi-touch-gesture.png" alt="Screenshot of gesture required to activate Link Lock" width="600" height="319" /></p>
<p>So here&#8217;s a working demo. If you&#8217;re reading this on a device that supports touch events, tap-and-hold with three fingers anywhere on the screen. If it worked you&#8217;ll see a lock icon in the center of the screen and an opacity effect on all of the page&#8217;s links. At this point links are disabled. Repeating the gesture will turn them back on.</p>
<p>If you&#8217;re not using a touch device you can <a href="http://www.ravelrumba.com/code/demos/linklock/">view this desktop demo</a> that I hacked together. Just click and hold and you&#8217;ll see how the link lock toggling works.</p>
<p>That&#8217;s pretty much it. Deactivate links with a gesture to enable a less distracting reading experience.</p>
<p>Surely there&#8217;s a better gesture than tapping-and-holding (something faster would be preferred) but I wanted to choose something that was unlikely to conflict with OS-level gestures—also something that was easy to detect reliably with JavaScript.</p>
<p>If you want to play with the code or try it on your own site (I currently have it running throughout my blog), you can <a href="https://github.com/robflaherty/link-lock">find it on Github</a>.</p>
<p>Again, this is just a rough concept and not something that I think has much practical potential. To the degree that accidental link activation is a problem (not very much I assume) a better solution would be to do a better job of identifying intent rather than toggling an on/off state for the entire page. Still, if you have any thoughts on it I&#8217;d love to hear them.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ravelrumba.com/blog/link-disabling-for-touch-interfaces/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Tracking Scroll Depth with jQuery and Google Analytics</title>
		<link>http://www.ravelrumba.com/blog/tracking-scroll-depth-jquery-google-analytics/</link>
		<comments>http://www.ravelrumba.com/blog/tracking-scroll-depth-jquery-google-analytics/#comments</comments>
		<pubDate>Wed, 11 Apr 2012 23:49:24 +0000</pubDate>
		<dc:creator>Rob Flaherty</dc:creator>
				<category><![CDATA[eMedia]]></category>
		<category><![CDATA[General Web]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[google analytics]]></category>
		<category><![CDATA[Scroll Depth]]></category>

		<guid isPermaLink="false">http://www.ravelrumba.com/?p=1629</guid>
		<description><![CDATA[Scroll depth—the measure of how far a user scrolls on a particular page—is an interesting but lesser-known engagement metric. It&#8217;s not something you can find in your Google Analytics or Omniture account but you may be familiar with it from other analytics services (e.g., Chartbeat). If you&#8217;ve ever participated in an ontological debate about &#8220;the fold&#8221;, [...]]]></description>
			<content:encoded><![CDATA[<p>Scroll depth—the measure of how far a user scrolls on a particular page—is an interesting but lesser-known engagement metric. It&#8217;s not something you can find in your Google Analytics or Omniture account but you may be familiar with it from other analytics services (e.g., Chartbeat).</p>
<p>If you&#8217;ve ever participated in an <strong>ontological debate</strong> about &#8220;the fold&#8221;, you know that how far users are willing to scroll down a page (and whether they&#8217;re willing to scroll at all) is an important concern for both designers and business stakeholders.</p>
<p>So how can we measure it? One option is to sign up for a service like Chartbeat that offers scroll depth as a reporting metric. Another option is to use a little jQuery to record the data in Google Analytics. Here&#8217;s a plugin for that.</p>
<h5>jQuery Scroll Depth</h5>
<p>This is a plugin that watches for scroll events and then reports data back to Google Analytics using the Events API. By the default the plugin will record Baseline (0%), 25%, 50%, 75%, and 100% scroll events. You can find the data in the Events section of Google Analytics. The category is &#8220;Scroll Depth&#8221;, the action is &#8220;Percentage&#8221; and the label is the scroll depth percentage.</p>
<p><img src="http://robflaherty.github.com/jquery-scrolldepth/images/google-analytics-scroll-depth.png" alt="Google Analytics Scroll Depth Tracking" style="border: 1px solid #ddd;" /></p>
<p>Google Analytics Events can be viewed at both the site and page level. This means you can see site-wide scroll depth as well as scroll depth for individual pages.</p>
<p>In addition to the 25%, 50%, 75%, and 100% marks you can record scroll events for specific elements on the page. Has an ad been scrolled into view? Did the user scroll down to the article comments section? To track these elements you just pass the selector as one of the plugin options.</p>
<h5>Setting it up</h5>
<p>It&#8217;s easy to set up. First, make sure you&#8217;re using the Google Analytics <a href="http://code.google.com/apis/analytics/docs/tracking/asyncUsageGuide.html" target="_blank">asynchronous tracking code</a>. This is required; the plugin will not work with the old version of the tracking code. Then include <a href="http://jquery.com/" target="_blank">jQuery</a> and the plugin. After that you just have to initialize the plugin. It looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;script src=&quot;https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;jquery.scrolldepth.js&quot;&gt;&lt;/script&gt;
&lt;script&gt;
$(function() {
  $.scrollDepth();
});
&lt;/script&gt;</pre></div></div>

<p>The code should be placed after your Google Analytics snippet and preferably at the bottom of the page, just before the closing <code>body</code> tag. (Note: If you&#8217;ve put the code at the bottom of the page, wrapping the plugin initialization in jQuery&#8217;s document ready event is not necessary.)</p>
<h5>Try it out</h5>
<p>To download the plugin or read more about the options, check out the <a href="http://robflaherty.github.com/jquery-scrolldepth/" target="_blank">jQuery Scroll Depth project page</a>. If you have suggestions for improvement or would like to report bugs, please visit the <a href="https://github.com/robflaherty/jquery-scrolldepth" target="_blank">Github repo</a>.</p>
<h5>Update (5/11/12)</h5>
<p>I&#8217;ve posted a <a href="http://gopollgo.com/is-scroll-depth-a-metric-for-tracking-scroll-activity-or-content-visibility" target="_blank">one-question poll</a> asking for people&#8217;s opinion about what goal the &#8220;scroll depth&#8221; metric really tracks. If you have an opinion on this and would like to help advance this plugin, please take a second to weigh in!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ravelrumba.com/blog/tracking-scroll-depth-jquery-google-analytics/feed/</wfw:commentRss>
		<slash:comments>34</slash:comments>
		</item>
		<item>
		<title>firstImpression.js: A micro-library for detecting new visitors</title>
		<link>http://www.ravelrumba.com/blog/firstimpression-js-library-detecting-new-visitors/</link>
		<comments>http://www.ravelrumba.com/blog/firstimpression-js-library-detecting-new-visitors/#comments</comments>
		<pubDate>Sat, 31 Mar 2012 16:39:25 +0000</pubDate>
		<dc:creator>Rob Flaherty</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.ravelrumba.com/?p=1603</guid>
		<description><![CDATA[firstImpression.js is a micro/nano-library (1 kb minified) that answers the simple question, &#8220;Has this user visited this site before?&#8221; The detection doesn&#8217;t require much logic, so the majority of the code is just a Plain JavaScript port of the popular jquery.cookie plugin. Using it Writing and reading your own cookies is easy enough but if [...]]]></description>
			<content:encoded><![CDATA[<p><strong>firstImpression.js</strong> is a micro/nano-library (1 kb minified) that answers the simple question, &#8220;Has this user visited this site before?&#8221; The detection doesn&#8217;t require much logic, so the majority of the code is just a <strong>Plain JavaScript</strong> port of the popular <a href="https://github.com/carhartl/jquery-cookie" target="_blank">jquery.cookie plugin</a>.</p>
<h5>Using it</h5>
<p>Writing and reading your own cookies is easy enough but if you want to operate at a slightly higher level firstImpression.js offers a simple API for detecting first-time visitors.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">// Basic usage</span>
<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span> firstImpression<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  console.<span style="color: #660066;">log</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'New user'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// Specify cookie name</span>
<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span> firstImpression<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'foo'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  console.<span style="color: #660066;">log</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'New user'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// Specify cookie name and expiration in days</span>
<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span> firstImpression<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'foo'</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">365</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  console.<span style="color: #660066;">log</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'New user'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Some stuff:</p>
<ul>
<li>firstImpression() returns <strong>true</strong> for a new user, <strong>false</strong> for a returning user.</li>
<li>Calling firstImpression() also sets a cookie if one does not already exist.</li>
<li>The default cookie name is &#8220;_firstImpression&#8221; and the default expiration is 2 years (730 days).</li>
<li>You can specify your own cookie names if you want to manage multiple instances of firstImpression across a single site.</li>
<li>If you want to check if someone has visited within a certain time frame you can specify the cookie expiration (in days).</li>
</ul>
<h5>Deleting Cookies</h5>
<p>If you need to delete cookies you can do so via firstImpression.js like this:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">// Remove default cookie</span>
firstImpression<span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// Remove custom named cookie</span>
firstImpression<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'foo'</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h4>Browser Support</h4>
<p>This should work in any browser that supports cookies. Tested briefly in Chrome, Firefox, Opera, IE6-10, iOS, Android, and Opera Mobile.</p>
<h4>Download or Contribute</h4>
<p><a class="button" href="https://github.com/downloads/robflaherty/firstImpression.js/firstImpression-v0.1.zip" target="_blank">Download</a></p>
<p><a class="button" href="https://github.com/robflaherty/firstImpression.js" target="_blank">Contribute on Gitub</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ravelrumba.com/blog/firstimpression-js-library-detecting-new-visitors/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.446 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-05-28 11:31:59 -->

