<?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>Tom Anthony</title>
	<atom:link href="http://www.tomanthony.co.uk/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tomanthony.co.uk</link>
	<description>SEO, Web Development and Research</description>
	<lastBuildDate>Mon, 16 Apr 2012 11:52:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Monitor Which Social Networks Your Visitors are Logged Into With Google Analytics (on SEOmoz)</title>
		<link>http://www.seomoz.org/blog/visitor-social-network-login-status-google-analytics</link>
		<comments>http://www.seomoz.org/blog/visitor-social-network-login-status-google-analytics#comments</comments>
		<pubDate>Sun, 19 Feb 2012 22:49:25 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[All Posts]]></category>
		<category><![CDATA[APIs/Mashups]]></category>
		<category><![CDATA[SEO/SEM]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://www.tomanthony.co.uk/?p=453</guid>
		<description><![CDATA[Recently Mat Clayton from Mixcloud provided a great snippet of Javascript that could be used to record whether visitors to your site were logged into Facebook or not. I extend that idea to present similar code for Twitter and Google+ and then wrap it all up in Google Analytics goodness. Using this code you can monitor which social networks your website visitors are logged into.]]></description>
			<content:encoded><![CDATA[<p>Recently Mat Clayton from Mixcloud provided a great snippet of Javascript that could be used to record whether visitors to your site were logged into Facebook or not. I extend that idea to present similar code for Twitter and Google+ and then wrap it all up in Google Analytics goodness. Using this code you can monitor which social networks your website visitors are logged into.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.seomoz.org/blog/visitor-social-network-login-status-google-analytics/feed/</wfw:commentRss>
		<slash:comments>71</slash:comments>
		</item>
		<item>
		<title>Detect if visitors are logged into Twitter, Facebook or Google+</title>
		<link>http://www.tomanthony.co.uk/blog/detect-visitor-social-networks/</link>
		<comments>http://www.tomanthony.co.uk/blog/detect-visitor-social-networks/#comments</comments>
		<pubDate>Sun, 19 Feb 2012 19:52:44 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[All Posts]]></category>
		<category><![CDATA[SEO/SEM]]></category>

		<guid isPermaLink="false">http://www.tomanthony.co.uk/?p=385</guid>
		<description><![CDATA[<a href="http://www.tomanthony.co.uk/blog/wp-content/uploads/2012/02/social-media-login-status.png"><img src="http://www.tomanthony.co.uk/blog/wp-content/uploads/2012/02/social-media-login-status-300x165.png" alt="" title="Social Network Login Status" width="150" height="82" class="aligncenter size-medium wp-image-408" style="float: right;" /></a>Here I describe a way to abuse the login mechanism for both Twitter and Google to detect whether a user is logged in to that service. Facebook provides an API for this. So I provide a cross-browser javascript template that works for all 3 networks. If you want to get straight to the code <a href="#code">jump to the implementation section</a> or check out the <a href="http://www.tomanthony.co.uk/tools/detect-social-network-logins/">Social Network Login Status Detector Demo</a>.]]></description>
			<content:encoded><![CDATA[<div style="float: right;"><a href="http://www.tomanthony.co.uk/blog/wp-content/uploads/2012/02/social-media-login-status.png" rel="lightbox[385]"><img src="http://www.tomanthony.co.uk/blog/wp-content/uploads/2012/02/social-media-login-status-300x165.png" alt="" title="Social Network Login Status" width="300" height="165" class="size-medium wp-image-408" /></a><br />Example output &#8211; try it <a href="http://www.tomanthony.co.uk/tools/detect-social-network-logins/" target="_blank">here</a>.</div>
<p>The quick version: I&#8217;ve found a way to abuse the login mechanism for both Twitter and Google to detect whether a user is logged in to that service. Facebook provides an API for this. So I provide a cross-browser javascript template that works for all 3 networks. If you want to get straight to the code <a href="#code">jump to the implementation section</a> or check out the <a href="http://www.tomanthony.co.uk/tools/detect-social-network-logins/">Social Network Login Status Detector Demo</a>.</p>
<h2>Introduction</h2>
<p>I was interested in seeing whether it would be possible to track which social networks a website visitor is logged into at the time of their visit; it could be cool for selecting which social media buttons you show them, what sort of marketing you do to them, or simply to evaluate whether you should be participating more on a certain social network. I was interested in Facebook, Twitter and Google+; as an SEO I was also interested in whether people were logged into a general Google account so I could compare which percentage of those had a Google+ account.</p>
<p>A quick search turned up an interesting post from Mike Cardwell who had a <a href="https://grepular.com/Abusing_HTTP_Status_Codes_to_Expose_Private_Information">method for doing this</a> for Facebook, Twitter and Gmail, but unfortunately it didn&#8217;t work in Internet Explorer. Secondly, I knew there was a better method than Mike&#8217;s for Facebook, which I&#8217;d seen presented by Mat Clayton of Mixcloud; he uses Facebook&#8217;s API to do the same thing (<a href="http://www.slideshare.net/matclayton/the-next-level-of-social-integration">see slide 15</a>). Mat&#8217;s method works great across browsers, so that solved the Facebook side of this.</p>
<h2>Finding a way in to Twitter and Google+</h2>
<p>Wat I needed was a method for detecting whether a visitor to my site was logged in to Twitter, Google and more specifically Google+.</p>
<p>Thanks to <a href="http://news.ycombinator.com/item?id=2151850">abraham</a> from Hacker News I discovered that Twitter has an undocumented endpoint that simply returns true or false for whether the current user is logged in! It is very simple:</p>
<div class="geshi no javascript">
<ol>
<li class="li1">
<div class="de1"><span class="sy0">&lt;</span>script<span class="sy0">&gt;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw2">function</span> twitterLoginStatus<span class="br0">&#40;</span>state<span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; <span class="kw3">alert</span><span class="br0">&#40;</span>state<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="sy0">&lt;/</span>script<span class="sy0">&gt;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="sy0">&lt;</span>script src=<span class="st0">&#39;https://api.twitter.com/sessions/present.js?callback=twitterLoginStatus&#39;</span><span class="sy0">&gt;&lt;/</span>script<span class="sy0">&gt;</span></div>
</li>
</ol>
</div>
<p>However, due to boring technical details concerning MIME types this code doesn&#8217;t work on IE9, which (unfortunately) for many purposes makes it less than ideal.</p>
<p>Browsers nowadays are very sensitive to cross site requests and the all to common exploits that abuse them, and so unless the 3rd party site plans to allow it using javascript for this is probably going to be difficult. The other great way to make cross domain requests is with image tags.</p>
<h2>Tricking login mechanisms</h2>
<p>I came up with the theory that I needed to try to access and image on Twitter/Google&#8217;s sites that would only be available to users when they are logged in. Using javascript I could detect whether the image loaded or not and thus determine whether the user was loggedin. However, these are obviously going to be few and far between (image assets are often static and so on CDNs and/or not protected in such a manner), if they exist at all (I didn&#8217;t find any), so I was back to square one. I needed a protected area of the site, but needed the file contents to be an image.</p>
<p>My winning moment was realising that some naive login systems might be open to abuse for exactly this purpose. It is often the case that you try to access a specific page on a site, lets say the &#8220;Upload a photo&#8221; page but you need to be logged in to do so. If you are not logged into the site in question, when you visit the URL the page redirects to the Login page to authenticate you are who you say you are; however the site wants to be helpful and send you to the page you were looking for so they keep a track of that target page in the URL as a parameter and then helpfully redirect you to that page after login is complete.</p>
<p>What happens if you visit the login page with a &#8216;redirect on login&#8217; parameter and you are already logged in? When implemented in a naive fashion you are simply immediately redirected to the page specified in the parameter. Some sites limit that parameter to being another page on the same domain, but we&#8217;ll see that doesn&#8217;t help for this trick.</p>
<p>This mechanism is open to abuse in exactly the way I needed; I could set the &#8216;redirect on login&#8217; page to be an image file on the same domain. For example:</p>
<div class="geshi no html4strict">
<ol>
<li class="li1">
<div class="de1"><span class="sc2"><span class="kw2">&lt;img</span> <span class="kw3">src</span><span class="sy0">=</span><span class="st0">&quot;https://twitter.com/login?redirect_after_login=%2Fimages%2Fspinner.gif&quot;</span> <span class="sy0">/</span><span class="kw2">&gt;</span></span></div>
</li>
</ol>
</div>
<p>In this example, if I am logged in Twitter is kind enough to 302 redirect me to the image file I specified, but if I am not logged in I am show the login page. It turns out that both Twitter and Google&#8217;s login mechanisms are susceptible to exactly this trick. It seems LinkedIn and Tumblr are currently immune to this, though I didn&#8217;t dig too deep so there might be another redirect URL for them.</p>
<h2>Putting it all together</h2>
<p><a name="code"></a></p>
<p>From this point on it was quite easy to hack together some javascript; just stick this code in the &lt;head&gt;&lt;/head&gt; section of your page:</p>
<div class="geshi no javascript">
<ol>
<li class="li1">
<div class="de1">&nbsp;<span class="sy0">&lt;</span>script type=<span class="st0">&quot;text/javascript&quot;</span><span class="sy0">&gt;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="kw2">function</span> show_login_status<span class="br0">&#40;</span>network, <span class="kw3">status</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span><span class="kw3">status</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;<span class="kw3">alert</span><span class="br0">&#40;</span><span class="st0">&quot;Logged in to &quot;</span> + network<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="br0">&#125;</span><span class="kw1">else</span><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;<span class="kw3">alert</span><span class="br0">&#40;</span><span class="st0">&quot;Not logged in to &quot;</span> + network<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;<span class="sy0">&lt;/</span>script<span class="sy0">&gt;</span></div>
</li>
</ol>
</div>
<p>Then, anywhere in your code that seems like a nice place stick this HTML:</p>
<div class="geshi no html4strict">
<ol>
<li class="li1">
<div class="de1"><span class="sc2"><span class="kw2">&lt;img</span> <span class="kw3">style</span><span class="sy0">=</span><span class="st0">&quot;display:none;&quot;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw3">onload</span><span class="sy0">=</span><span class="st0">&quot;show_login_status(&#39;Google&#39;, true)&quot;</span></div>
</li>
<li class="li1">
<div class="de1">onerror<span class="sy0">=</span><span class="st0">&quot;show_login_status(&#39;Google&#39;, false)&quot;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw3">src</span><span class="sy0">=</span><span class="st0">&quot;https://accounts.google.com/CheckCookie?continue=https%3A%2F%2Fwww.google.com%2Fintl%2Fen%2Fimages%2Flogos%2Faccounts_logo.png&amp;followup=https%3A%2F%2Fwww.google.com%2Fintl%2Fen%2Fimages%2Flogos%2Faccounts_logo.png&amp;chtml=LoginDoneHtml&amp;checkedDomains=youtube&amp;checkConnection=youtube%3A291%3A1&quot;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="sy0">/</span><span class="kw2">&gt;</span></span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="sc2"><span class="kw2">&lt;img</span> <span class="kw3">style</span><span class="sy0">=</span><span class="st0">&quot;display:none;&quot;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw3">onload</span><span class="sy0">=</span><span class="st0">&quot;show_login_status(&#39;GooglePlus&#39;, true)&quot;</span></div>
</li>
<li class="li1">
<div class="de1">onerror<span class="sy0">=</span><span class="st0">&quot;show_login_status(&#39;GooglePlus&#39;, false)&quot;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw3">src</span><span class="sy0">=</span><span class="st0">&quot;https://plus.google.com/up/?continue=https://www.google.com/intl/en/images/logos/accounts_logo.png&amp;type=st&amp;gpsrc=ogpy0&quot;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="sy0">/</span><span class="kw2">&gt;</span></span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="sc2"><span class="kw2">&lt;img</span> <span class="kw3">style</span><span class="sy0">=</span><span class="st0">&quot;display:none;&quot;</span> <span class="kw3">src</span><span class="sy0">=</span><span class="st0">&quot;https://twitter.com/login?redirect_after_login=%2Fimages%2Fspinner.gif&quot;</span> <span class="kw3">onload</span><span class="sy0">=</span><span class="st0">&quot;show_login_status(&#39;Twitter&#39;, true)&quot;</span> onerror<span class="sy0">=</span><span class="st0">&quot;show_login_status(&#39;Twitter&#39;, false)&quot;</span> <span class="sy0">/</span><span class="kw2">&gt;</span></span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="sc2"><span class="kw2">&lt;div</span> <span class="kw3">id</span><span class="sy0">=</span><span class="st0">&quot;fb-root&quot;</span><span class="kw2">&gt;</span></span><span class="sc2"><span class="kw2">&lt;/div&gt;</span></span></div>
</li>
</ol>
</div>
<p>Finally, somewhere after that HTML stick this Javascript:</p>
<div class="geshi no javascript">
<ol>
<li class="li1">
<div class="de1"><span class="sy0">&lt;</span>script<span class="sy0">&gt;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;window.<span class="me1">fbAsyncInit</span> = <span class="kw2">function</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; FB.<span class="me1">init</span><span class="br0">&#40;</span><span class="br0">&#123;</span> appId:<span class="st0">&#39;xxxxxxxxxxxx&#39;</span>, <span class="kw3">status</span>:<span class="kw2">true</span>, &nbsp;cookie:<span class="kw2">true</span>, xfbml:<span class="kw2">true</span><span class="br0">&#125;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; FB.<span class="me1">getLoginStatus</span><span class="br0">&#40;</span><span class="kw2">function</span><span class="br0">&#40;</span>response<span class="br0">&#41;</span><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="kw1">if</span> <span class="br0">&#40;</span>response.<span class="kw3">status</span> <span class="sy0">!</span>= <span class="st0">&quot;unknown&quot;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; show_login_status<span class="br0">&#40;</span><span class="st0">&quot;Facebook&quot;</span>, <span class="kw2">true</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="br0">&#125;</span><span class="kw1">else</span><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; show_login_status<span class="br0">&#40;</span><span class="st0">&quot;Facebook&quot;</span>, <span class="kw2">false</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="br0">&#125;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;<span class="br0">&#125;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;<span class="co1">// Load the SDK Asynchronously</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;<span class="br0">&#40;</span><span class="kw2">function</span><span class="br0">&#40;</span>d<span class="br0">&#41;</span><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="kw2">var</span> js, id = <span class="st0">&#39;facebook-jssdk&#39;</span>; <span class="kw1">if</span> <span class="br0">&#40;</span>d.<span class="me1">getElementById</span><span class="br0">&#40;</span>id<span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><span class="kw1">return</span>;<span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; js = d.<span class="me1">createElement</span><span class="br0">&#40;</span><span class="st0">&#39;script&#39;</span><span class="br0">&#41;</span>; js.<span class="me1">id</span> = id; js.<span class="me1">async</span> = <span class="kw2">true</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; js.<span class="me1">src</span> = <span class="st0">&quot;//connect.facebook.net/en_US/all.js&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; d.<span class="me1">getElementsByTagName</span><span class="br0">&#40;</span><span class="st0">&#39;head&#39;</span><span class="br0">&#41;</span><span class="br0">&#91;</span><span class="nu0">0</span><span class="br0">&#93;</span>.<span class="me1">appendChild</span><span class="br0">&#40;</span>js<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;<span class="br0">&#125;</span><span class="br0">&#40;</span>document<span class="br0">&#41;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="sy0">&lt;/</span>script<span class="sy0">&gt;</span></div>
</li>
</ol>
</div>
<p>You will need to replace xxxxxxxxx above with the appID for an app created for your domain; if you don&#8217;t have one you can create one in about 60 seconds. Simply visit <a href="https://developers.facebook.com/apps">https://developers.facebook.com/apps</a> whilst logged in to Facebook, and click &#8220;Create New App&#8221;. You will be prompted for a &#8220;Display Name&#8221;, and you can enter any old dummy text here and press Continue. On the next page it is only necessary to fill out the &#8220;App Domain&#8221; and the &#8220;Website&#8221; with the URL of the domain you want to use this code on. Do that, save changes and grab the &#8220;App ID&#8221; from the top of the page and enter it in the code above.</p>
<p>You should be all set! Now you can change your alert() functions to do whatever you want based on the login status of the user. See a demo of it in action <a href="http://www.tomanthony.co.uk/tools/detect-social-network-logins/">Social Network Login Status Detector Demo</a>.</p>
<h2>Wrap up</h2>
<p>In my testing this worked on a range of versions of Firefox and Chrome, IE versions 7 and up, Safari and Opera. It may be that these loopholes get fixed, but in the meantime I implore you to only use this in nice ways. There is an argument that a 3rd party even knowing what other sites you are logged into is a breach of your privacy, and I can certainly see why some people would feel like that (especially if this was scaled up to more <em>personal</em> sites that you might be logged into). If you want to prevent this then for Firefox you can try <a href="https://addons.mozilla.org/en-US/firefox/addon/requestpolicy/">RequestPolicy</a> or <a href="https://addons.mozilla.org/en-US/firefox/addon/noscript/">NoScript</a>. For Chrome you can give <a href="https://chrome.google.com/webstore/detail/oiigbmnaadbkfbmpbfijlflahbdbdgdf/reviews">ScriptNo</a> a shot. On IE you can try giving Firefox or Chrome a try. <img src='http://www.tomanthony.co.uk/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>However, I do also think that this sort of thing can be used in good ways &#8211; serving only a subset of social buttons to your users, or determining whether you should be providing support on a given social platform etc. If anyone has any nice suggestions for other ways you could use (nicely) use this, I&#8217;d love to hear.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tomanthony.co.uk/blog/detect-visitor-social-networks/feed/</wfw:commentRss>
		<slash:comments>52</slash:comments>
		</item>
		<item>
		<title>3 Quick and Easy Ways to Check the Main Social Metrics (on Distilled)</title>
		<link>http://www.distilled.net/blog/social-media/3-quick-ways-to-check-social-metrics/</link>
		<comments>http://www.distilled.net/blog/social-media/3-quick-ways-to-check-social-metrics/#comments</comments>
		<pubDate>Thu, 22 Dec 2011 17:31:40 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[All Posts]]></category>
		<category><![CDATA[SEO/SEM]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://www.tomanthony.co.uk/?p=378</guid>
		<description><![CDATA[<img class="size-full wp-image-379 alignleft" title="social-metrics-chrome" src="http://www.tomanthony.co.uk/blog/wp-content/uploads/2011/12/social-metrics-chrome1.png" alt="" width="156" height="97" />Most SEOs have a veritable plethora of tools but I still get asked often about simple ways to check the main social metrics for a page.

I've broken the need for quick checks of these data down into 3 categories and continuing my recent trend of throwing together tools for the SEO community to use I've put together 3 tools to help out in these instances.]]></description>
			<content:encoded><![CDATA[<p><img class="size-full wp-image-379 alignleft" title="social-metrics-chrome" src="http://www.tomanthony.co.uk/blog/wp-content/uploads/2011/12/social-metrics-chrome1.png" alt="" width="156" height="97" />Most SEOs have a veritable plethora of tools but I still get asked often about simple ways to check the main social metrics for a page.</p>
<p>I&#8217;ve broken the need for quick checks of these data down into 3 categories and continuing my recent trend of throwing together tools for the SEO community to use I&#8217;ve put together 3 tools to help out in these instances.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.distilled.net/blog/social-media/3-quick-ways-to-check-social-metrics/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>SEOmoz API Signed Authentication with Javascript</title>
		<link>http://www.tomanthony.co.uk/blog/seomoz-api-authentication-javascript/</link>
		<comments>http://www.tomanthony.co.uk/blog/seomoz-api-authentication-javascript/#comments</comments>
		<pubDate>Sat, 10 Dec 2011 23:34:33 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[All Posts]]></category>
		<category><![CDATA[APIs/Mashups]]></category>
		<category><![CDATA[SEO/SEM]]></category>

		<guid isPermaLink="false">http://www.tomanthony.co.uk/?p=339</guid>
		<description><![CDATA[Whilst creating my International SEO Backlink Analysis Tool, I wanted a way for people to use their SEOmoz API key in the same secure fashion as they would for their homebrew tools. That meant that their Secret Key shouldn't be transmitted over the wire, but instead only a signed hash. Here is a Javascript library I crafted for this purpose.]]></description>
			<content:encoded><![CDATA[<p>Whilst creating my <a href="http://www.tomanthony.co.uk/tools/international-seo-backlinks-tool/ ">International SEO Backlink Analysis Tool</a>, I wanted a way for people to use their SEOmoz API key in the same secure fashion as they would for their homebrew tools. That meant that their Secret Key shouldn&#8217;t be transmitted over the wire, but instead only a signed hash. You can read the docs on the <a href="http://apiwiki.seomoz.org/w/page/29574176/SignedAuthentication">SEOmoz API authentication</a>, if you&#8217;re not familiar.</p>
<p>I created a simple Javascript function which generates the signed authentication hash. It&#8217;s very easy to use:</p>
<div class="geshi no javascript">
<ol>
<li class="li1">
<div class="de1"><span class="kw2">var</span> SEOmozCredentials = &nbsp;getSEOmozCredentials<span class="br0">&#40;</span>accessid, secret<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">var</span> timeStamp = SEOmozCredentials<span class="br0">&#91;</span><span class="st0">&#39;theTimeStamp&#39;</span><span class="br0">&#93;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">var</span> signature = SEOmozCredentials<span class="br0">&#91;</span><span class="st0">&#39;signature&#39;</span><span class="br0">&#93;</span>;</div>
</li>
</ol>
</div>
<p>The parameters you must pass are the SEOmoz Access ID and the Secret Key. Once you have the timeStamp and signature, in addition to the Access ID you can easily form the request on the server side; here is some example PHP code:</p>
<div class="geshi no php">
<ol>
<li class="li1">
<div class="de1"><span class="re1">$credentials</span> &nbsp;<span class="sy0">=</span> <span class="st0">&quot;AccessID=&quot;</span> <span class="sy0">.</span> <span class="re1">$accessID</span> <span class="sy0">.</span> <span class="st0">&quot;&amp;amp;Expires=&quot;</span> <span class="sy0">.</span> <span class="re1">$timeStamp</span> <span class="sy0">.</span> <span class="st0">&quot;&amp;amp;Signature=&quot;</span> <span class="sy0">.</span> <span class="kw3">urlencode</span><span class="br0">&#40;</span><span class="re1">$signature</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="re1">$apiURL</span> <span class="sy0">=</span> <span class="st0">&quot;http://lsapi.seomoz.com/linkscape/links/&quot;</span> <span class="sy0">.</span> <span class="kw3">urlencode</span><span class="br0">&#40;</span><span class="re1">$url</span><span class="br0">&#41;</span> <span class="sy0">.</span> <span class="st0">&quot;?&quot;</span> <span class="sy0">.</span> <span class="re1">$credentials</span> <span class="sy0">.</span> <span class="st0">&quot;&amp;amp;SourceCols=5&amp;amp;TargetCols=0&amp;amp;Filter=external+follow&amp;amp;Sort=page_authority&amp;amp;Scope=page_to_page&amp;amp;Limit=1000&quot;</span><span class="sy0">;</span></div>
</li>
</ol>
</div>
<p>Make sure you don&#8217;t transmit the Secret Key. You can grab the standalone Javascript file here: <a href="http://www.tomanthony.co.uk/tools/international-seo-backlinks-tool/seomoz.js">SEOmoz API Javascript</a>.</p>
<p>You may want to consider, as an alternative to using JS in this way doing full <a href="http://apiwiki.seomoz.org/w/page/27005771/Application%20Authorization">SEOmoz Application Authorization</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tomanthony.co.uk/blog/seomoz-api-authentication-javascript/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Setting up Amazon Mechanical Turk with SERP Turkey</title>
		<link>http://www.tomanthony.co.uk/blog/amazon-mechanical-turk-serp-turkey/</link>
		<comments>http://www.tomanthony.co.uk/blog/amazon-mechanical-turk-serp-turkey/#comments</comments>
		<pubDate>Mon, 21 Nov 2011 03:00:17 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[All Posts]]></category>
		<category><![CDATA[SEO/SEM]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://www.tomanthony.co.uk/?p=301</guid>
		<description><![CDATA[<img src="http://www.tomanthony.co.uk/blog/wp-content/uploads/2011/11/logo_350-300x108.png" alt="SERP Turkey logo" title="" width="200" height="71" class="alignright size-medium wp-image-326" />This post details how to setup and use <a href="https://www.mturk.com/mturk/welcome">Amazon's Mechanical Turk</a> with the <a href="http://www.tomanthony.co.uk/tools/serp-turkey/">SERP Turkey</a> tool. If you're not familiar with SERP Turkey, or want instructions on that tool then you should first read the <a href="http://www.seomoz.org/blog/split-test-gather-ctr-analytics-serps">SERP Turkey introduction</a>.]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.tomanthony.co.uk/blog/wp-content/uploads/2011/11/logo_350-300x108.png" alt="SERP Turkey logo" title="" width="300" height="108" class="alignright size-medium wp-image-326" />This post details how to setup and use <a href="https://www.mturk.com/mturk/welcome">Amazon&#8217;s Mechanical Turk</a> with the <a href="http://www.tomanthony.co.uk/tools/serp-turkey/">SERP Turkey</a> tool. If you&#8217;re not familiar with SERP Turkey, or want instructions on that tool then you should first read the <a href="http://www.seomoz.org/blog/split-test-gather-ctr-analytics-serps">SERP Turkey introduction</a>.</p>
<p>If you&#8217;ve never heard of mTurk then there are good introductions <a href="http://www.slideshare.net/amjludden/introduction-to-amazon-mechanical-turk">here</a> and <a href="http://castingwords.com/consulting/Mechanical-Turk-Overview">here</a>. Basically mTurk provides a huge online pool of workers &#8211; people at home who get paid anywhere between a few cents to a few dollars to complete simple tasks online. Anyone can join the workforce as a &#8216;worker&#8217;, and people in the US can become &#8216;requesters&#8217; that set tasks. Here I describe how to become a requester and how to setup tasks that bring workers to your SERP Turkey tests. Don&#8217;t despair if you are not in the US &#8211; there is a method for you to get Amazon Turk workers with an extra step &#8211; see the section below.</p>
<p>Once you&#8217;ve registered as a requester (which may take a day for your first payment to go through), and created your template (10 mins) you&#8217;ll be able to create new SERP Turkey tests and get the live in SERP Turkey in less than 5 minutes.</p>
<h2>Registering as a requester</h2>
<p>So &#8211; lets get started. Head over to the mTurk <a href="https://requester.mturk.com/start">request start page</a>, and fill in your email and press the button to proceed. You&#8217;ll be asked for your name, email confirmation and to create a password. Next you&#8217;ll be asked for your company name and US address and phone number. Check the box to agree to the terms and proceed to the next screen. So far so good!</p>
<p>Ok, if you&#8217;d like to take the tour you&#8217;re offered now, go for it and I&#8217;ll see you on the over side. Otherwise just press &#8216;Get Started&#8217; and start setting up your first task.</p>
<h2>But some credit</h2>
<p>mTurk works on a prepayment system and you have to buy credit to start. This is simple &#8211; just goto &#8216;Account Settings&#8217; and then click the &#8216;Prepay for Mechanical Turk HITs&#8217; link.</p>
<p>You&#8217;ll need a US registered credit card (though I&#8217;ve heard some people got through without one) to make the payment. be aware that your first payment might take 24-36 hours to get approved.</p>
<h2>Creating a task (HIT) for SERP Turkey</h2>
<p>mTurk tasks are called HITs (Human Intelligence Task) and are generally created using re-usable templates. Templates will define:</p>
<ul>
<li>HIT Title, Description &amp; Keywords</li>
<li>Payment per task (per worker)</li>
<li>How many workers you want</li>
<li>Time allotted per assignment</li>
<li>How long before the task expires?</li>
<li>Worker required qualifications</li>
</ul>
<p>Templates will also define how you wish the question of the task to be presented to the user.</p>
<p>So, lets get going&#8230; You&#8217;ll be asked what sort of work you want the user to do:</p>
<p><img src="http://www.tomanthony.co.uk/blog/wp-content/uploads/2011/11/work_types.png" alt="categories of mTurk work" title="" width="512" height="276" class="aligncenter size-full wp-image-304" /></p>
<p>Select &#8216;Categorization&#8217; and you&#8217;ll be presented with a list of pre-built template types:</p>
<p><img src="http://www.tomanthony.co.uk/blog/wp-content/uploads/2011/11/template_types-1024x465.png" alt="Template types" title="" width="512" height="232" class="aligncenter size-large wp-image-306" /></p>
<p>Select the Search Relevance template, which we&#8217;ll customise.</p>
<p>Here are the settings I&#8217;ve been using:</p>
<p><strong>Title:</strong> Click the best result from a set of Search Results<br />
<strong>Description:</strong> Simply click on the result that you&#8217;d select yourself for that search.<br />
<strong>Keywords:</strong> search, evaluate, opinion, google, quick</p>
<p><strong>Time allotted per assignment:</strong> 2 minutes<br />
<strong>HIT expires in:</strong> 7 days (generally I&#8217;ve not been fussed about needing the results before a deadline &#8211; at $0.05 per HIT you should allow 24-36 hours per 100 users)</p>
<p><strong>HIT Approval rate:</strong> >=90% or >=95% depending how quickly I wanted the results. Obviously >=95% gets slightly improved results but a little slower.<br />
Number of HITS approved: >100 or >500, once again depending on speed vs. quality</p>
<p><strong>Reward per assignment:</strong> $0.05 &#8211; I experimented with $0.10 but didn&#8217;t see any real benefit in speed or quality. I&#8217;d rather twice the number of users!<br />
<strong>Number of assignments per hit:</strong> 200 &#8211; this is entirely up to you and your budget and the number of variants you want. The more the better! I&#8217;d say ~100 per variant is an absolute minimum. If you&#8217;re experiment has subtle changes only between the variants then you&#8217;ll need even more. Note that each worker can only do a HIT once.</p>
<p>If you want to read more about your configuration options then look at page 10 of this <a href="http://s3.amazonaws.com/awsdocs/MechTurk/latest/amt-ui.pdf ">mTurk guide</a>.</p>
<p>Once you&#8217;ve chosen your settings press the &#8216;Design Layout&#8217; button to proceed. We&#8217;ll overwrite the template provided &#8211; press the &#8220;Edit HTML Source&#8221; button you see at the  top of the text area. Paste in the code here:</p>
<p><textarea style="height: 100px;"><br />
&lt;h3 style=&quot;font-weight: normal; &quot;&gt;Pick a Search Result&lt;/h3&gt;<br />
&lt;p style=&quot;font-weight: normal; &quot;&gt;Imagine you searched for &quot;&lt;b&gt;${term}&lt;/b&gt;&quot; in Google.&lt;/p&gt;<br />
&lt;p style=&quot;font-weight: normal; &quot;&gt;When you click the link&nbsp;you will see&nbsp;(in new window)&nbsp;&nbsp;a list of &lt;i&gt;dummy&lt;/i&gt; search results for that search; please click the result that you&#8217;d deem most relevant:&lt;/p&gt;<br />
&lt;p&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal; &quot;&gt;&lt;b&gt;&lt;a target=&quot;_blank&quot; href=&quot;${result_page}&quot;&gt;${result_page}&lt;/a&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;<br />
&lt;p&gt;Please paste the result code on the second screen into the answer box below. Thanks!&lt;/p&gt;<br />
&lt;p&gt;&lt;textarea name=&quot;comment&quot; cols=&quot;80&quot; rows=&quot;3&quot;&gt;&lt;/textarea&gt;&lt;/p&gt;<br />
</textarea></p>
<p>Click the &#8216;Edit HTML source&#8217; button again to toggle back to display mode and you should see something like this (click to enlarge):</p>
<p><a href="http://www.tomanthony.co.uk/blog/wp-content/uploads/2011/11/turk_template.png" target="_blank" rel="lightbox[301]"><img src="http://www.tomanthony.co.uk/blog/wp-content/uploads/2011/11/turk_template.png" alt="mTurk Template" title="" width="415" height="120" class="aligncenter size-full wp-image-315" /></a></p>
<p>The <strong>${term}</strong> and <strong>${result_page}</strong> markers you see will be filled in when you create a task from this template. This makes the template re-usable for multiple SERP Turkey tasks. We ask the user to paste the response code they get back from mTurk as we have to ask them a question (mTurk rules), and this response code encodes whether their click was recorded or not (if they timed out by taking longer than 5 minutes, or fiddled with the page somehow they&#8217;ll get a failure code). Only you will know which codes are a success for a test (shown in your SERP Turkey dashboard).</p>
<p>Hit the &#8220;Preview and Finish&#8221; button and you&#8217;re template will be saved and ready to use. Woo!</p>
<h2>Creating a SERP Turkey task in mTurk</h2>
<p>Now you have a template, you need to create a HIT when you want to run a SERP Turkey test.</p>
<p><strong>Step 1:</strong> Create your test in SERP Turkey. If you&#8217;re not sure how, then read the <a href="http://www.seomoz.org/blog/split-test-gather-ctr-analytics-serps">SERP Turkey introduction</a> blog post I wrote on SEOmoz.</p>
<p><strong>Step 2:</strong> On the SERP Turkey Dashboard page you&#8217;ll find a download link for an mTurk input file; download it. This input file will fill in the <strong>${term}</strong> and <strong>${result_page}</strong> variables we created in our template.</p>
<p><strong>Step 3:</strong> Login to mTurk and hit the chubby &#8220;Publish&#8221; button at the top. Select whichever template you want (you probably just have the one we just created if this is your first time).</p>
<p><strong>Step 4:</strong> Upload the input file you downloaded (or select a previously uploaded one).</p>
<p><strong>Step 5:</strong> Now you&#8217;ll see a preview of how the HIT will look to workers. If everything looks in order press &#8220;Next&#8221; to see the final screen.</p>
<p><strong>Step 6:</strong> You can now give this batch of HITs a name, review how much it is likely to cost etc. If everything looks good then hit &#8220;Publish&#8221;.</p>
<p>Now you&#8217;re test is live and out there in the world!</p>
<h2>Monitoring results</h2>
<p>You can now monitor (and download) the results in realtime via the SERP Turkey interface. You can also view the &#8220;Manage&#8221; tab in mTurk to see how many workers have recorded completing the job on your end.</p>
<p>You should periodically review the results in mTurk and approve the workers work, so they get paid (you want to establish a good relationship as a requester so try to pay within a couple of days &#8211; you can automate payment in your template settings). If you&#8217;re so inclined you can see what response code each worker entered and compare this to the &#8216;success&#8217; response code in SERP Turkey&#8217;s dashboard to see whether their click was counted or not &#8211; they are only not counted currently if they took longer than 5 minutes from viewing the SERPs to clicking a result. You should be able to safely ignore this and just pay all the workers.</p>
<h2>Cancelling a job</h2>
<p>If you&#8217;re monitoring the results and realise that the test isn&#8217;t going how you planned, there is a problem or you think you already have enough data then you can cancel a job at any time in the Manage page of mTurk.</p>
<h2>Outside of the US?</h2>
<p>If you are outside of the US and cannot access mTurk directly, worry not. There is another solution: <a href="http://www.smartsheet.com/help-categories/smartsourcing-amazon-mechanical-turk">Smartsheet Crowdsourcing</a> actually leverages Amazon&#8217;s Mechanical Turk, but you don&#8217;t need to be in the US to use it. You do have to pay a $30 monthly subscription but then you can leverage Turk. If someone wants to write a Smartsheet SERP Turkey post I&#8217;ll happily add a link in here and on the SERP Turkey page!</p>
<h2>Future</h2>
<p>IF SERP Turkey proves popular I will look at adding more features, and either way I will soon make it so you can download all the raw click data for your tests to do your own more detailed analysis. I just haven&#8217;t had time!</p>
<h2>Wrap up</h2>
<p>That&#8217;s pretty much all there is to it! <img src='http://www.tomanthony.co.uk/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>If you have any feedback or suggestions then contact me by email at <a href="mailto:turkey@tomanthony.co.uk">turkey@tomanthony.co.uk</a> or via twitter at <a href="http://twitter.com/TomAnthonySEO">@TomAnthonySEO</a>, or leave a comment here.</p>
<p>Happy Turkeying!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tomanthony.co.uk/blog/amazon-mechanical-turk-serp-turkey/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Introducing SERP Turkey: A Free Tool to Split-Test and Gather CTR Analytics of SERP Entries  (on SEOmoz)</title>
		<link>http://www.seomoz.org/blog/split-test-gather-ctr-analytics-serps</link>
		<comments>http://www.seomoz.org/blog/split-test-gather-ctr-analytics-serps#comments</comments>
		<pubDate>Sun, 20 Nov 2011 17:37:27 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[All Posts]]></category>
		<category><![CDATA[APIs/Mashups]]></category>
		<category><![CDATA[SEO/SEM]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://www.tomanthony.co.uk/?p=334</guid>
		<description><![CDATA[<img src="http://www.tomanthony.co.uk/blog/wp-content/uploads/2011/11/logo_350-300x108.png" alt="SERP Turkey logo" title="" width="200" height="71" class="alignright size-medium wp-image-326" /> Measuring CTR data in search engine results is notoriously difficult. What I wanted was a simple way to measure the change in CTR for a given search query's results when I adjusted entries, but nothing existed.... so I built the SERP Turkey tool.]]></description>
			<content:encoded><![CDATA[<p>Measuring CTR data in search engine results is notoriously difficult, and with Google&#8217;s recent move to HTTPS for logged in users it is probably going to keep on getting harder. What I wanted was a simple way to measure the change in CTR for a given search query&#8217;s results when I adjusted entries, but nothing existed&#8230;. so I built the SERP Turkey tool.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.seomoz.org/blog/split-test-gather-ctr-analytics-serps/feed/</wfw:commentRss>
		<slash:comments>47</slash:comments>
		</item>
		<item>
		<title>Link Profile Tool to Discover Paid Links or Other Anomalous Linking Activity (on SEOmoz)</title>
		<link>http://www.seomoz.org/blog/link-profile-tool-to-discover-linking-activity</link>
		<comments>http://www.seomoz.org/blog/link-profile-tool-to-discover-linking-activity#comments</comments>
		<pubDate>Sat, 01 Oct 2011 10:05:40 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[All Posts]]></category>
		<category><![CDATA[APIs/Mashups]]></category>
		<category><![CDATA[SEO/SEM]]></category>

		<guid isPermaLink="false">http://www.tomanthony.co.uk/?p=297</guid>
		<description><![CDATA[<img class="alignright size-full wp-image-30" src="http://www.tomanthony.co.uk/images/client_link_profile_normalised.png" alt="Client link profile" width="120" />What I'm sharing here is a tool I've built that automates the process of evaluating a domains link profile. I'm going to show you the real data I saw for that client (who we knew had bought links) and how you can use the same tool to identify domains that have maybe bought links or other anomalous link profiles.]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-30" src="http://www.tomanthony.co.uk/images/client_link_profile_normalised.png" alt="Client link profile" width="120" />What I&#8217;m sharing here is a tool I&#8217;ve built that automates the process of evaluating a domains link profile. I&#8217;m going to show you the real data I saw for that client (who we knew had bought links) and how you can use the same tool to identify domains that have maybe bought links or other anomalous link profiles.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.seomoz.org/blog/link-profile-tool-to-discover-linking-activity/feed/</wfw:commentRss>
		<slash:comments>81</slash:comments>
		</item>
		<item>
		<title>Fixing 5 common SEO problems with HTML5… today! (on Distilled)</title>
		<link>http://www.distilled.net/blog/seo/fixing-seo-problems-with-html5/</link>
		<comments>http://www.distilled.net/blog/seo/fixing-seo-problems-with-html5/#comments</comments>
		<pubDate>Wed, 20 Jul 2011 09:19:57 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[All Posts]]></category>
		<category><![CDATA[SEO/SEM]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.tomanthony.co.uk/?p=196</guid>
		<description><![CDATA[<img src="http://www.tomanthony.co.uk/blog/wp-content/uploads/2011/07/super_html5_man.jpg" alt="Super HTML5man" title="Super HTML5man" width="180" class="alignleft size-full wp-image-197" /> HTML5 is not a tool but as a toolset; a collection of new features, of which many are ready to use now. Here I outline some common SEO problems and how you can use aspects of HTML5 right now to help with them.]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.tomanthony.co.uk/blog/wp-content/uploads/2011/07/super_html5_man.jpg" alt="Super HTML5man" title="Super HTML5man" width="180" class="alignleft size-full wp-image-197" /> HTML5 is not a tool but as a toolset; a collection of new features, of which many are ready to use now. Here I outline some common SEO problems and how you can use aspects of HTML5 right now to help with them.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.distilled.net/blog/seo/fixing-seo-problems-with-html5/feed/</wfw:commentRss>
		<slash:comments>28</slash:comments>
		</item>
		<item>
		<title>Google +1 Button SEO &#8211; Getting Bulk Counts with the hidden API</title>
		<link>http://www.tomanthony.co.uk/blog/google_plus_one_button_seo_count_api/</link>
		<comments>http://www.tomanthony.co.uk/blog/google_plus_one_button_seo_count_api/#comments</comments>
		<pubDate>Sun, 05 Jun 2011 18:25:10 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[All Posts]]></category>
		<category><![CDATA[APIs/Mashups]]></category>
		<category><![CDATA[SEO/SEM]]></category>

		<guid isPermaLink="false">http://www.tomanthony.co.uk/?p=163</guid>
		<description><![CDATA[<img src="http://www.tomanthony.co.uk/blog/wp-content/uploads/2011/06/plus_one_pile.png" alt="Pile of +1 Buttons" width="120" class="alignleft size-full wp-image-164" />We know the search engines are using social shares and likes to impact the rankings. Both Facebook and Twitter have APIs for pulling in Likes and Tweets, but currently we are left without a public API for doing this with Google's +1 button. However, I dug about a bit behind the scenes and found their 'hidden' API.
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.tomanthony.co.uk/blog/wp-content/uploads/2011/06/plus_one_pile.png" rel="lightbox[163]"><img src="http://www.tomanthony.co.uk/blog/wp-content/uploads/2011/06/plus_one_pile.png" alt="Pile of +1 Buttons" width="283" height="283" class="alignleft size-full wp-image-164" /></a> Now that the Google +1 button is out the Social SEO battle will inevitably be stepped up a gear. We know the search engines are using social shares and likes to impact the rankings, and Google&#8217;s +1 button is their way of ensuring at least some of this data is directly in their hands.</p>
<p>So obviously, tracking this data is very important for SEOs, and both Facebook and Twitter have APIs for pulling in Likes and Tweets, but currently we are left without a public API for doing this with Google&#8217;s +1 button. With a little digging behind the scenes I managed to find the API they use for the button. So now us SEOs can use it to pull out the Google +1 counts for lists of URLs (if you are interested in the technical details then see the optional section below).</p>
<p>I&#8217;ve put together a public Google Spreadsheet which can do all of this automatically for you &#8211; you just need to enter a list of URLs and the spreadsheet will pull in the counts for you. To get started, open the spreadsheet (download it <a href="https://spreadsheets.google.com/spreadsheet/ccc?key=0AjwUYlXENiGndGVLQTFHTXpBcU5zTGVDVDdCcWttWVE&#038;hl=en_US&#038;authkey=COS0uMII">right here</a>) and select &#8220;Make a copy&#8221; from the File menu (you&#8217;ll need to be logged into a Google account to do this). Enter the URLs in the the A column (ensuring you pay attention to trailing slashed and they include http:// at the start), and the counts will appear in column B. You should see something like this:</p>
<p><a href="http://www.tomanthony.co.uk/blog/wp-content/uploads/2011/06/spreadsheet_plusone_counts.png" rel="lightbox[163]"><img src="http://www.tomanthony.co.uk/blog/wp-content/uploads/2011/06/spreadsheet_plusone_counts.png" alt="Google Spreadsheet showing Google +1 Counts" width="649" height="316" class="aligncenter size-full wp-image-166" /></a></p>
<p><strong>Technical Bits</strong></p>
<p>If you want to write your own solution, you can rip the code from the spreadsheet. The URL for the service is:</p>
<p>https://clients6.google.com/rpc?key=AIzaSyCKSbrvQasunBoV16zDH9R33D88CeLr9gQ</p>
<p>It is a JSON-RPC setup, meaning you send a JSON formatted request and get a JSON formatted response. The request should be via POST in the following format:</p>
<p><small></p>
<div class="geshi no javascript">
<ol>
<li class="li1">
<div class="de1"><span class="br0">&#91;</span><span class="br0">&#123;</span><span class="st0">&quot;method&quot;</span>:<span class="st0">&quot;pos.plusones.get&quot;</span>,<span class="st0">&quot;id&quot;</span>:<span class="st0">&quot;p&quot;</span>,<span class="st0">&quot;params&quot;</span>:<span class="br0">&#123;</span><span class="st0">&quot;nolog&quot;</span>:<span class="kw2">true</span>,<span class="st0">&quot;id&quot;</span>:<span class="st0">&quot;http://www.test.com&quot;</span>,<span class="st0">&quot;source&quot;</span>:<span class="st0">&quot;widget&quot;</span>,<span class="st0">&quot;userId&quot;</span>:<span class="st0">&quot;@viewer&quot;</span>,<span class="st0">&quot;groupId&quot;</span>:<span class="st0">&quot;@self&quot;</span><span class="br0">&#125;</span>,<span class="st0">&quot;jsonrpc&quot;</span>:<span class="st0">&quot;2.0&quot;</span>,<span class="st0">&quot;key&quot;</span>:<span class="st0">&quot;p&quot;</span>,<span class="st0">&quot;apiVersion&quot;</span>:<span class="st0">&quot;v1&quot;</span><span class="br0">&#125;</span><span class="br0">&#93;</span></div>
</li>
</ol>
</div>
<p></small></p>
<p>The request will be returned like so:</p>
<p><small></p>
<div class="geshi no javascript">
<ol>
<li class="li1">
<div class="de1"><span class="br0">&#91;</span><span class="br0">&#123;</span><span class="st0">&quot;result&quot;</span>: <span class="br0">&#123;</span> <span class="st0">&quot;kind&quot;</span>: <span class="st0">&quot;pos#plusones&quot;</span>, <span class="st0">&quot;id&quot;</span>: <span class="st0">&quot;http://www.google.com/&quot;</span>, <span class="st0">&quot;isSetByViewer&quot;</span>: <span class="kw2">false</span>, <span class="st0">&quot;metadata&quot;</span>: <span class="br0">&#123;</span><span class="st0">&quot;type&quot;</span>: <span class="st0">&quot;URL&quot;</span>, <span class="st0">&quot;globalCounts&quot;</span>: <span class="br0">&#123;</span><span class="st0">&quot;count&quot;</span>: <span class="nu0">3097.0</span><span class="br0">&#125;</span> <span class="br0">&#125;</span> <span class="br0">&#125;</span> <span class="st0">&quot;id&quot;</span>: <span class="st0">&quot;p&quot;</span><span class="br0">&#125;</span><span class="br0">&#93;</span></div>
</li>
</ol>
</div>
<p></small></p>
<p><strong>Example PHP Code</strong></p>
<p>If you want to implement this server side, here is some example PHP code to get you going:</p>
<p><small></p>
<div class="geshi no php">
<ol>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">&lt;?php</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;<span class="re1">$url</span> <span class="sy0">=</span> <span class="st0">&quot;http://www.tomanthony.co.uk/&quot;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;<span class="re1">$ch</span> <span class="sy0">=</span> curl_init<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span> &nbsp; </div>
</li>
<li class="li1">
<div class="de1">&nbsp;curl_setopt<span class="br0">&#40;</span><span class="re1">$ch</span><span class="sy0">,</span> CURLOPT_URL<span class="sy0">,</span> <span class="st0">&quot;https://clients6.google.com/rpc?key=AIzaSyCKSbrvQasunBoV16zDH9R33D88CeLr9gQ&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span> </div>
</li>
<li class="li1">
<div class="de1">&nbsp;curl_setopt<span class="br0">&#40;</span><span class="re1">$ch</span><span class="sy0">,</span> CURLOPT_POST<span class="sy0">,</span> <span class="nu0">1</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;curl_setopt<span class="br0">&#40;</span><span class="re1">$ch</span><span class="sy0">,</span> CURLOPT_POSTFIELDS<span class="sy0">,</span> <span class="st0">&#39;[{&quot;method&quot;:&quot;pos.plusones.get&quot;,&quot;id&quot;:&quot;p&quot;,&quot;params&quot;:{&quot;nolog&quot;:true,&quot;id&quot;:&quot;&#39;</span> <span class="sy0">.</span> <span class="re1">$url</span> <span class="sy0">.</span> <span class="st0">&#39;&quot;,&quot;source&quot;:&quot;widget&quot;,&quot;userId&quot;:&quot;@viewer&quot;,&quot;groupId&quot;:&quot;@self&quot;},&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;key&quot;:&quot;p&quot;,&quot;apiVersion&quot;:&quot;v1&quot;}]&#39;</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;curl_setopt<span class="br0">&#40;</span><span class="re1">$ch</span><span class="sy0">,</span> CURLOPT_RETURNTRANSFER<span class="sy0">,</span> <span class="kw2">true</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;curl_setopt<span class="br0">&#40;</span><span class="re1">$ch</span><span class="sy0">,</span> CURLOPT_HTTPHEADER<span class="sy0">,</span> <span class="kw3">array</span><span class="br0">&#40;</span><span class="st0">&#39;Content-type: application/json&#39;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;<span class="re1">$curl_results</span> <span class="sy0">=</span> curl_exec <span class="br0">&#40;</span><span class="re1">$ch</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;curl_close <span class="br0">&#40;</span><span class="re1">$ch</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;<span class="re1">$parsed_results</span> <span class="sy0">=</span> json_decode<span class="br0">&#40;</span><span class="re1">$curl_results</span><span class="sy0">,</span> <span class="kw2">true</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;<span class="kw3">echo</span> <span class="re1">$parsed_results</span><span class="br0">&#91;</span><span class="nu0">0</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#39;result&#39;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#39;metadata&#39;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#39;globalCounts&#39;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#39;count&#39;</span><span class="br0">&#93;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; </div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">?&gt;</span></div>
</li>
</ol>
</div>
<p></small></p>
<p>There is an interactive demo here: <a href="http://www.tomanthony.co.uk/google_plus_one_api_example.php">Google +1 Button API demo</a>.</p>
<p><strong>Wrap Up</strong></p>
<p>If you want to track social shares and likes and aren&#8217;t already setup with a Google Doc for the Twitter/Facebook parts you can head over to <a href="http://www.distilled.net/blog/seo/how-to-build-agile-seo-tools-using-google-docs/">this post on Distilled</a> which will help you get going. Combined with the above and you can build a complete system for tracking social search signals. Have fun!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tomanthony.co.uk/blog/google_plus_one_button_seo_count_api/feed/</wfw:commentRss>
		<slash:comments>39</slash:comments>
		</item>
		<item>
		<title>Competitive Analysis in Under 60 Seconds Using Google Docs (on SEOmoz)</title>
		<link>http://www.seomoz.org/blog/competitive-analysis-in-under-60-seconds-using-google-docs-12649</link>
		<comments>http://www.seomoz.org/blog/competitive-analysis-in-under-60-seconds-using-google-docs-12649#comments</comments>
		<pubDate>Sun, 15 May 2011 12:14:16 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[All Posts]]></category>
		<category><![CDATA[APIs/Mashups]]></category>
		<category><![CDATA[SEO/SEM]]></category>

		<guid isPermaLink="false">http://www.tomanthony.co.uk/?p=131</guid>
		<description><![CDATA[<img class="alignright size-full wp-image-30" src="http://www.tomanthony.co.uk/images/serp_report_graph.jpg" alt="SERP report" width="120" />Want to evaluate the competition to find out what sites are dominating the SERPs for these keywords? However... being an SEO you're a busy guy (or gal), and you need it done right now. I've built a Google Docs tool to automagically do exactly that and this post will walk you through it.]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-30" src="http://www.tomanthony.co.uk/images/serp_report_graph.jpg" alt="SERP report" width="180" />Faced with a new client, and having established a list of keywords they need to target, you want to evaluate the competition to find out what sites are dominating the SERPs for these keywords. However&#8230; being an SEO you&#8217;re a busy guy (or gal), and you need it done right now. I&#8217;ve built a Google Docs tool to automagically do exactly that and this post will walk you through it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.seomoz.org/blog/competitive-analysis-in-under-60-seconds-using-google-docs-12649/feed/</wfw:commentRss>
		<slash:comments>152</slash:comments>
		</item>
	</channel>
</rss>

