<?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>Rory Hansen &#187; amazon associates</title>
	<atom:link href="http://www.roryhansen.ca/category/amazon-associates/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.roryhansen.ca</link>
	<description>Affiliate marketing, Internet marketing, web development, and small business ideas.</description>
	<lastBuildDate>Tue, 06 Oct 2009 06:55:47 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>My November 2008 AdSense and Affiliate Earnings</title>
		<link>http://www.roryhansen.ca/2008/12/01/my-november-2008-adsense-and-affiliate-earnings/</link>
		<comments>http://www.roryhansen.ca/2008/12/01/my-november-2008-adsense-and-affiliate-earnings/#comments</comments>
		<pubDate>Tue, 02 Dec 2008 02:29:55 +0000</pubDate>
		<dc:creator>Rory</dc:creator>
				<category><![CDATA[affiliate marketing]]></category>
		<category><![CDATA[amazon associates]]></category>
		<category><![CDATA[dealdotcom]]></category>
		<category><![CDATA[google adsense]]></category>
		<category><![CDATA[make money online]]></category>
		<category><![CDATA[mortgage goal]]></category>
		<category><![CDATA[ppc]]></category>
		<category><![CDATA[text-link-ads]]></category>

		<guid isPermaLink="false">http://www.roryhansen.ca/2008/12/01/my-november-2008-adsense-and-affiliate-earnings/</guid>
		<description><![CDATA[November Recap
Early on in November, I realized that this was going to be a challenging month for my Internet marketing efforts. Natural search engine traffic for my most profitable niche site was way down, which has affected both AdSense earnings as well as affiliate earnings from Clickbank.
I attempted to remedy that by driving targetted search [...]]]></description>
			<content:encoded><![CDATA[<p><strong>November Recap</strong><br />
Early on in November, I realized that this was going to be a <a href="http://www.roryhansen.ca/2008/11/15/affiliate-earnings-look-to-be-way-down-for-november/">challenging month</a> for my Internet marketing efforts. Natural search engine traffic for my most profitable niche site was <a href="http://www.roryhansen.ca/2008/10/31/my-serps-where-did-they-go/">way down</a>, which has affected both AdSense earnings as well as affiliate earnings from Clickbank.</p>
<p>I attempted to remedy that by driving targetted search engine traffic to the site via PPC advertising with Findology, only to discover that the <a href="http://www.roryhansen.ca/2008/11/20/no-success-converting-findology-traffic/">Findology traffic was difficult/impossible to convert</a>.</p>
<p>In the end, I fellÂ well short of the earnings mark I set last month when I earned a profit of $718.21.<br />
<span id="more-115"></span><br />
<strong>Gross Earnings</strong><br />
AdSense: $65.53<br />
Affiliate Sales: $230.05<br />
Text-Link-Ads: $85.93<br />
Sedo: $21.45 (<a href="http://www.roryhansen.ca/2008/11/19/my-first-sedocom-earnings-cheque/">My first Sedo earnings payment</a> ever!)<br />
Paid Reviews: $11.45<br />
<strong>Total earnings:</strong> $414.41</p>
<p><strong>Costs</strong><br />
Findology PPC Advertising: $25.00 (What a waste of money!)<br />
<strong>Total costs:</strong> $25.00</p>
<p><strong>November Net Earnings: $389.41</strong></p>
<p><a href="http://www.roryhansen.ca/2008/11/02/my-october-2008-adsense-and-affiliate-earnings/">October Earnings: $718.21</a><br />
<a href="http://www.roryhansen.ca/2008/10/19/my-september-2008-adsense-results-a-starting-point-for-the-mortgage-challenge/">September Earnings: $335.79</a></p>
<p><strong>Earnings AnalysisÂ <br />
</strong>Compared to my October earnings, my November earnings reflect a <u>decrease in earnings of 46% month-over-month</u>. While that decrease is quite sharp, my <u>net earningsÂ are still up byÂ 16%Â from September 2008</u> when I began my renewed efforts in Internet marketing. Considering the search engine traffic issues this month, I&#8217;m satisfied with this month&#8217;s result, although not happy.</p>
<p><strong><a href="http://www.roryhansen.ca/2008/10/14/my-affiliate-and-internet-marketing-goal-cover-my-monthly-mortgage-payment-by-june-2009/">Mortgage Goal</a></strong><br />
As you may recall, my goal is to earn enough each month through AdSense and affiliate marketing to cover the cost of my monthly mortgage payment. For the sake of the experiment, we&#8217;re saying it&#8217;s $1500/month.</p>
<p>This month I earned $389.41 profit, which is 26% of the way there. I have until June 2009 to hit my goal, so that leaves me with 7 more months to make up the remaining 74%.</p>
<p><strong>Plans Going Forward</strong><br />
As the New Year is approaching, I&#8217;m in the process ofÂ developing a 5-step plan on how to further increase my earnings next year. I&#8217;ll be detailing the plan here once it&#8217;s complete, but in a nutshell, it has to do with setting goals, creating objectives, and measuring success.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.roryhansen.ca/2008/12/01/my-november-2008-adsense-and-affiliate-earnings/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>My October 2008 AdSense and Affiliate earnings</title>
		<link>http://www.roryhansen.ca/2008/11/02/my-october-2008-adsense-and-affiliate-earnings/</link>
		<comments>http://www.roryhansen.ca/2008/11/02/my-october-2008-adsense-and-affiliate-earnings/#comments</comments>
		<pubDate>Sun, 02 Nov 2008 21:13:09 +0000</pubDate>
		<dc:creator>Rory</dc:creator>
				<category><![CDATA[affiliate marketing]]></category>
		<category><![CDATA[amazon associates]]></category>
		<category><![CDATA[dealdotcom]]></category>
		<category><![CDATA[google adsense]]></category>
		<category><![CDATA[google adwords]]></category>
		<category><![CDATA[internet marketing]]></category>
		<category><![CDATA[mortgage goal]]></category>
		<category><![CDATA[ppc]]></category>
		<category><![CDATA[text-link-ads]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[yahoo search marketing]]></category>

		<guid isPermaLink="false">http://www.roryhansen.ca/2008/11/02/my-october-2008-adsense-and-affiliate-earnings/</guid>
		<description><![CDATA[Earnings
AdSense: $166.53
Clickbank: $437.58
Text-Link-Ads: $89.56
Sedo, Amazon Associates: ~$2
Paid Reviews: $22.54
Total earnings: $718.21
Costs
No AdWords costs this month.
Signed up for Findology, but have yet to start any campaigns.
Total costs: $0.00
October Earnings: $718.21
September Earnings: $335.79
This represents a 214% improvement month-over-month.
Mortgage Goal
As you may recall, my goal is to earn enough each month through AdSense and affiliate marketing to cover [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Earnings</strong><br />
AdSense: $166.53<br />
Clickbank: $437.58<br />
Text-Link-Ads: $89.56<br />
Sedo, Amazon Associates: ~$2<br />
Paid Reviews: $22.54<br />
<strong>Total earnings:</strong> $718.21</p>
<p><strong>Costs</strong><br />
No AdWords costs this month.<br />
Signed up for <a href="https://www.findology.com/adv/signup.php?referrer=9800" rel="nofollow">Findology</a>, but have yet to start any campaigns.<br />
<strong>Total costs:</strong> $0.00</p>
<p><strong>October Earnings: $718.21</strong></p>
<p><a href="http://www.roryhansen.ca/2008/10/19/my-september-2008-adsense-results-a-starting-point-for-the-mortgage-challenge/">September Earnings: $335.79</a><br />
This represents a 214% improvement month-over-month.</p>
<p><strong><a href="http://www.roryhansen.ca/2008/10/14/my-affiliate-and-internet-marketing-goal-cover-my-monthly-mortgage-payment-by-june-2009/">Mortgage Goal</a></strong><br />
As you may recall, my goal is to earn enough each month through AdSense and affiliate marketing to cover the cost of my monthly mortgage payment. For the sake of the experiment, we&#8217;re saying it&#8217;s $1500/month.</p>
<p>This month I earned $718.21 profit, which is 48% of the way there. I have until June 2009 to hit my goal, so that leaves me with 8 more months to make up the remaining 52%.</p>
<p><strong>Concerns going forward</strong><br />
As I had mentioned in a previous post, my main contributing site has seen it&#8217;s traffic dive in recent days. By dive, I mean <a href="http://www.roryhansen.ca/2008/10/31/my-serps-where-did-they-go/">traffic has reduced by about 75%</a> (natural, search engine traffic). This concerns me because unless things pick up again, November earnings could potentially be 75% lower than October earnings.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.roryhansen.ca/2008/11/02/my-october-2008-adsense-and-affiliate-earnings/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>I broke the $100 in a day mark on Friday!</title>
		<link>http://www.roryhansen.ca/2008/10/26/i-broke-the-100-in-a-day-mark-on-friday/</link>
		<comments>http://www.roryhansen.ca/2008/10/26/i-broke-the-100-in-a-day-mark-on-friday/#comments</comments>
		<pubDate>Mon, 27 Oct 2008 01:14:15 +0000</pubDate>
		<dc:creator>Rory</dc:creator>
				<category><![CDATA[affiliate marketing]]></category>
		<category><![CDATA[amazon associates]]></category>
		<category><![CDATA[dealdotcom]]></category>
		<category><![CDATA[google adsense]]></category>
		<category><![CDATA[google adwords]]></category>
		<category><![CDATA[internet marketing]]></category>
		<category><![CDATA[mortgage goal]]></category>
		<category><![CDATA[ppc]]></category>
		<category><![CDATA[text-link-ads]]></category>

		<guid isPermaLink="false">http://www.roryhansen.ca/2008/10/26/i-broke-the-100-in-a-day-mark-on-friday/</guid>
		<description><![CDATA[On Friday, I earned more than $125 through my small network of sites andÂ couldn&#8217;t help but tell everyone around me! I was ecstatic! It was the first time that I&#8217;d earned more than $100 in one day.
It&#8217;s amazing how small, incremental earnings improvements can do wonders for personal motivation. I&#8217;m not making a 6-figure income [...]]]></description>
			<content:encoded><![CDATA[<p>On Friday, I earned more than $125 through my small network of sites andÂ couldn&#8217;t help but tell everyone around me! I was ecstatic! It was the first time that I&#8217;d earned more than $100 in one day.</p>
<p align="left">It&#8217;s amazing how small, incremental earnings improvements can do wonders for personal motivation. I&#8217;m not making a 6-figure income from affiliate marketing or blogging, but I feel like I&#8217;m headed in the right direction. In September, I was <a href="http://www.roryhansen.ca/2008/10/19/my-september-2008-adsense-results-a-starting-point-for-the-mortgage-challenge/">averaging about $10 per day</a>, which added up to $330 that month. And, with one week to go in October, I know I&#8217;ll be surpassing that by QUITE A BIT, but I&#8217;m trying to avoid calculating anything til after the 31st. I&#8217;m looking to be surprised!</p>
<p align="left">I&#8217;ve had some good days in the past, but none as good as this. Some readers might recall my Firefox experiment for Google Referrals. During my most successful days, I hadÂ <a href="http://www.roryhansen.ca/2006/11/30/earnings-summary-for-first-month-of-firefox-referrals/">Google ReferralsÂ earnings of over $175/day</a>. But this is a bit deceiving, because I was also PAYING for Google AdWords. In all, I saw <a href="http://www.roryhansen.ca/2007/01/01/december-earnings-summary-for-adsense-and-firefox-referrals/">profits of about $1000/month during the experiment</a>, which would average to about $30/day.</p>
<p>Perhaps this was just a lucky day for me. And I doubt I&#8217;ll even hit the $1000 mark for the month of October. Regardless, I&#8217;m so pleased with where I am this month and am even more motivated to hit my <a href="http://www.roryhansen.ca/2008/10/14/my-affiliate-and-internet-marketing-goal-cover-my-monthly-mortgage-payment-by-june-2009/">Mortgage Goal</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.roryhansen.ca/2008/10/26/i-broke-the-100-in-a-day-mark-on-friday/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>My September 2008 AdSense results; a starting point for the Mortgage Challenge</title>
		<link>http://www.roryhansen.ca/2008/10/19/my-september-2008-adsense-results-a-starting-point-for-the-mortgage-challenge/</link>
		<comments>http://www.roryhansen.ca/2008/10/19/my-september-2008-adsense-results-a-starting-point-for-the-mortgage-challenge/#comments</comments>
		<pubDate>Sun, 19 Oct 2008 21:52:35 +0000</pubDate>
		<dc:creator>Rory</dc:creator>
				<category><![CDATA[affiliate marketing]]></category>
		<category><![CDATA[amazon associates]]></category>
		<category><![CDATA[google adsense]]></category>
		<category><![CDATA[internet marketing]]></category>
		<category><![CDATA[mortgage goal]]></category>
		<category><![CDATA[ppc]]></category>
		<category><![CDATA[text-link-ads]]></category>

		<guid isPermaLink="false">http://www.roryhansen.ca/2008/10/19/my-september-2009-adsense-results-a-starting-point-for-the-mortgage-challenge/</guid>
		<description><![CDATA[Earlier this week, I wrote about my affiliate marketing goal of making enough money online per month to cover my mortgage. Effectively, this is around $1500/month.
I figured that I was bringing in around $300 per month already, as it&#8217;s been pretty steady for the last year. Up until September 2008, I&#8217;d been coasting, doing less [...]]]></description>
			<content:encoded><![CDATA[<p>Earlier this week, I wrote about <a href="http://www.roryhansen.ca/2008/10/14/my-affiliate-and-internet-marketing-goal-cover-my-monthly-mortgage-payment-by-june-2009/">my affiliate marketing goal</a> of making enough money online per month to cover my mortgage. Effectively, this is around $1500/month.</p>
<p>I figured that I was bringing in around $300 per month already, as it&#8217;s been pretty steady for the last year. Up until September 2008, I&#8217;d been coasting, doing less than an hour per month of work to support that $300/month income stream, as I had no motivation to invest anything more.</p>
<p>As a baseline measurement to understand where I am with respect to meeting my goal, I need to know my September 2008 results. Well, I just took a couple minutes to tabulate them, and here they are:</p>
<p>Mortgage Goal: $1500 / month</p>
<p>September Results:<br />
AdSense For Content: $254.25<br />
Text-Link-Ads: $81.54<br />
<strong>Total:</strong> $335.79</p>
<p>(No earnings from Amazon Affiliates, and neglible earnings from Chitika and other programs during September.)</p>
<p>Mortgage Goal Remaining: $1164.21 / month<br />
Percent of Mortgage Goal Met: 22%</p>
]]></content:encoded>
			<wfw:commentRss>http://www.roryhansen.ca/2008/10/19/my-september-2008-adsense-results-a-starting-point-for-the-mortgage-challenge/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>My affiliate and internet marketing goal: Cover my monthly mortgage payment by June 2009</title>
		<link>http://www.roryhansen.ca/2008/10/14/my-affiliate-and-internet-marketing-goal-cover-my-monthly-mortgage-payment-by-june-2009/</link>
		<comments>http://www.roryhansen.ca/2008/10/14/my-affiliate-and-internet-marketing-goal-cover-my-monthly-mortgage-payment-by-june-2009/#comments</comments>
		<pubDate>Wed, 15 Oct 2008 01:48:37 +0000</pubDate>
		<dc:creator>Rory</dc:creator>
				<category><![CDATA[affiliate marketing]]></category>
		<category><![CDATA[amazon associates]]></category>
		<category><![CDATA[business ideas]]></category>
		<category><![CDATA[dealdotcom]]></category>
		<category><![CDATA[google adsense]]></category>
		<category><![CDATA[google adwords]]></category>
		<category><![CDATA[internet marketing]]></category>
		<category><![CDATA[mortgage goal]]></category>
		<category><![CDATA[msn adcenter]]></category>
		<category><![CDATA[text-link-ads]]></category>
		<category><![CDATA[yahoo search marketing]]></category>

		<guid isPermaLink="false">http://www.roryhansen.ca/2008/10/14/my-affiliate-and-internet-marketing-goal-cover-my-monthly-mortgage-payment-by-june-2009/</guid>
		<description><![CDATA[Many of the big names in internet marketing are proponents of setting goals for their affiliate and internet marketing campaigns. And, while I&#8217;m also a firm believer in goal-setting, I&#8217;ve never actually sat down and thought about my affiliate marketing goals&#8211; at least, not in any way which would result in a firm, realistic goal.
But, [...]]]></description>
			<content:encoded><![CDATA[<p>Many of the <a target="_blank" href="http://selfmademinds.com/200706/adsense-goals/" rel="nofollow">big</a> <a target="_blank" href="http://affiliate-marketing-forums.5staraffiliateprograms.com/general-topics-affiliate-forum/4039-affiliate-goals-07-important-lessons-learned-06-a.html" rel="nofollow">names</a> <a target="_blank" href="http://www.shoemoney.com/2006/12/10/goals-for-2007-here-are-mine-what-are-yours/" rel="nofollow">in</a> <a target="_blank" href="http://www.johnchow.com/2006-year-in-review/" rel="nofollow">internet</a> <a href="http://www.johnchow.com/2006-year-in-review/" rel="nofollow">marketing</a> are proponents of setting goals for their affiliate and internet marketing campaigns. And, while I&#8217;m also a firm believer in goal-setting, I&#8217;ve never actually sat down and thought about my affiliate marketing goals&#8211; at least, not in any way which would result in a firm, realistic goal.</p>
<p>But, that&#8217;s all changing today. I&#8217;ve decided that, after many months of saying I&#8217;m going to actually start trying to make money online, that I&#8217;m finally going to put forth a somewhat serious effort to do so. And the first step in reaching my goal is to state it in black-and-white, here on this blog, so that I can be held accountableÂ for reaching it.</p>
<p><strong>My goal: By June 30, 2009, my monthly net earnings from all affiliate and search marketing efforts are to exceed the amount of my monthly mortgage payments.</strong> (For the sake of security and privacy, my target goal will be simplified to $1500/mo.)</p>
<p>So where am I today with respect to that goal? It&#8217;s been a while since I&#8217;ve actually tallied up the numbers from the myriad of affiliate and internet marketing programs that I participate in. But here&#8217;s a decent estimate:</p>
<p><strong>Current status:</strong></p>
<ul>
<li><strong>Time effort per month:</strong> ~3Â man hours</li>
<li><strong>Earnings per month:</strong> $250Â US</li>
<li><strong>Costs per month:</strong> &lt; $10 (web hosting)</li>
</ul>
<p>So, as you can see, although I only spend about 3 hours per month working on the niche sites I run, I still earn about $250 US per month through a variety of programs. To reach my goal of $1500/month, I&#8217;ll obviously have to spend more time developing my sites, but hopefully, I&#8217;llÂ also be spending this time smarter than I have been to this point.</p>
<p>Anyway, I&#8217;ve got a number of ideas bouncing around my head that I&#8217;ll need to start executing on, so I&#8217;ll end this post here. I&#8217;ll be posting monthly summaries of my earnings results, so that my visitors can track my progress. I challenge you to set your own affiliate marketing goals, too, on your own blog, and through friendly competition,Â naybe we&#8217;ll meet our goals together.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.roryhansen.ca/2008/10/14/my-affiliate-and-internet-marketing-goal-cover-my-monthly-mortgage-payment-by-june-2009/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unexpected success with Amazon aStore: $225 in sales with no effort</title>
		<link>http://www.roryhansen.ca/2007/09/24/unexpected-success-with-amazon-astore/</link>
		<comments>http://www.roryhansen.ca/2007/09/24/unexpected-success-with-amazon-astore/#comments</comments>
		<pubDate>Mon, 24 Sep 2007 22:25:01 +0000</pubDate>
		<dc:creator>Rory</dc:creator>
				<category><![CDATA[amazon associates]]></category>
		<category><![CDATA[internet marketing]]></category>

		<guid isPermaLink="false">http://www.roryhansen.ca/2007/09/24/73/</guid>
		<description><![CDATA[Introduction to AmazonÂ aStoreÂ 
As you&#8217;ve seen with DealDotCom, when new affiliate services come out, I generally give each of them an honestÂ shot, to see how they work, as well asÂ to gauge the return one might expect with minimal time investment into the service.
That was exactly the case when I set up a niche Amazon aStore a [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Introduction to AmazonÂ aStore</strong>Â <br />
As you&#8217;ve seen with <a href="http://www.dealdotcom.com/invite/11666/" rel="nofollow">DealDotCom</a>, when new affiliate services come out, I generally give each of them an honestÂ shot, to see how they work, as well asÂ to gauge the return one might expect with minimal time investment into the service.</p>
<p>That was exactly the case when I set up a <a target="_blank" href="http://affiliate-program.amazon.com/gp/associates/join?tag=roryonrails-20" rel="nofollow">niche Amazon aStore</a> a couple months back. At the time, I was already no stranger to Amazon&#8217;s affiliate programs; I had used their AWS services to add content to other websites I had setup, as well as hotlinked individual products from time to time. But as you probably know, Amazon aStore isÂ a little different. In the most basic sense, it&#8217;s a personal online store that you can setup, where you list Amazon products to sell.Â You can leave this as a stand-alone website or embed this store into your existing website in an &lt;iframe&gt;. Then,Â each time someone visits your aStore and makes a purchase, you are rewarded with a small referral fee in the 5% to 7% range of the purchase cost.</p>
<p>Well, anyway, after choosing my niche and <a href="http://affiliate-program.amazon.com/gp/associates/join?tag=roryonrails-20" rel="nofollow">setting up my store</a>, I did the #1 most important thing to drive visitors to the website: I linked to it from a couple of my other websites.Â I really only did that so that Google and the other search engines would have an easier time finding my site to index. Other than that, I did no SEO activities at all. Nor did I do any online advertising or marketing. I basically let the site sit.</p>
<p><strong>My Amazon aStore results</strong><br />
Anyway, the first month passed and I made a whopping $0.75. One person had purchased one item from my site and that $0.75 was my take from the purchase.</p>
<p>But things seem to be totally different this month. We&#8217;re only 3 weeks into September and my affiliate income has already accumulated to nearly $13, based on purchases of over $225. Again, this is with No Advertising and No SEO!</p>
<p>Here&#8217;s a quick snapshot of the recent purchases that have come through my Amazon aStore:</p>
<p><a href="http://affiliate-program.amazon.com/gp/associates/join?tag=roryonrails-20" title="Amazon aStore Success" rel="nofollow"><img border="0" src="http://www.roryhansen.ca/wp-content/uploads/2007/09/astore-sept.jpg" alt="Amazon aStore Success" title="Amazon aStore Success" /></a></p>
<p>You should be able to identify my niche marketÂ pretty easily from the product list above. ;-)</p>
<p><strong>MyÂ impressions thus far</strong>Â <br />
Anyway, I&#8217;m rather pleased with the performance so far of my Amazon aStore. I really didn&#8217;t expect anything, and considering I didn&#8217;t invest much time at all, I think the site is doing rather well. I did a quick guess of some of the keywords that my visitors may be using to find my site, and in Google, my aStore has SERPSsÂ of #1, #2, and a couple other high positions.</p>
<p>My only gripe so far is that I don&#8217;t think Amazon has any built-in web analytics for their aStores, so I cannot be sure to the means at which visitors are come to my store. On top of that, there doesn&#8217;t seem to be any way to embed third-party web statistics either.</p>
<p>Stay tuned for a month-end summary.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.roryhansen.ca/2007/09/24/unexpected-success-with-amazon-astore/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Amazon Web Services on Rails</title>
		<link>http://www.roryhansen.ca/2005/07/18/amazon-web-services-on-rails/</link>
		<comments>http://www.roryhansen.ca/2005/07/18/amazon-web-services-on-rails/#comments</comments>
		<pubDate>Tue, 19 Jul 2005 01:45:50 +0000</pubDate>
		<dc:creator>Rory</dc:creator>
				<category><![CDATA[amazon associates]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.roryhansen.ca/?p=25</guid>
		<description><![CDATA[If you&#8217;re looking to make use of the Amazon Web Services through your Rails app, here&#8217;s a tip: avoid trying to communicate with them using the Ruby on Rails ActiveWebServices classes. I spent a couple hours trying to patch together a solution, but nothing would work. I believe what currently exists is geared towards making [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re looking to make use of the <a href="http://www.amazon.com/gp/browse.html/103-8838522-5067008?%5Fencoding=UTF8&amp;node=3435361">Amazon Web Services</a> through your Rails app, here&#8217;s a tip: avoid trying to communicate with them using the Ruby on Rails <a href="http://api.rubyonrails.com/classes/ActionWebService/Base.html">ActiveWebServices</a> classes. I spent a couple hours trying to patch together a solution, but nothing would work. I believe what currently exists is geared towards making your Rails app accessible through Soap or XMLRPC, rather than consuming exisiting web services.</p>
<p>Instead, use <a href="http://www.caliban.org/ruby/ruby-amazon.shtml">Ruby/Amazon</a>, a &#8220;Ruby language library that allows programmatic access to the popular Amazon Web site via the REST (XML over HTTP) based Amazon Web Services.&#8221; Installation of the library on my development box was a breeze (just read the installation document to learn how) and, plus, it&#8217;s already preinstalled on the servers at TextDrive, so getting going using the Ruby/Amazon library is not a problem at all. For a quick tutorial on how to use the library, check out the <a href="http://www.caliban.org/ruby/ruby-amazon/classes/Amazon.html">documentation on the top-level Amazon module</a> or read <a href="http://gleepglop.com/journal/articles/2005/06/06/amazon-on-rails">this entry</a> on the GleepGlop blog. Both contain examples that show you how to make a basic connection to Amazon through the web services and how to query for products.</p>
<p>Once you get this far, though, you&#8217;ll realize that making calls to the Amazon Web Services with every page view is going to decrease the speed at which your website will render for your users. So what can you do instead? Cache the results in your database, that&#8217;s what. On my lyrics website, I want to have links back to Amazon for every artist that I have lyrics for. So, what I did was create an administrative function that will connect to Amazon and return a list of items for a given artist. This process is repeated over and over so that I have a huge archive of products for each of the artists. Then, instead of querying Amazon with each page view, I just need to call this administrative function every month or so, to update the products in my database.</p>
<p align="center"><iframe src="http://rcm.amazon.com/e/cm?t=roryonrails-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=0596529260&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=cccccc&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe></p>
<p>Below, you&#8217;ll see a body of code that updates all products for all artists whose names begin with a particular letter (for example, &#8220;A&#8221;). For each artist, all existing products are deleted from the database. Then, a new list of products is retrieved and each product is added to the database.</p>
<p>amazon_controller.rb<br />
<code>require 'amazon/search'</p>
<p>class AmazonController &lt; AdminController<br />
Â Â Â include Amazon::Search</p>
<p>Â Â Â ASSOCIATES_ID = "amazonaffiliateid-20" # Your Amazon Affiliate ID<br />
Â Â Â DEV_TOKEN = "0222NLPJQD0A7633Q182" # Your Amazon Web Services Key</p>
<p>Â Â Â def update<br />
Â Â Â Â Â Â artists = Artist.find_by_first_letter(@params["letter"])</p>
<p>Â Â Â Â Â Â artists.each do |artist|<br />
Â Â Â Â Â Â Â Â Â # Delete all existing "out-dated" products<br />
Â Â Â Â Â Â Â Â Â existing_products = Product.find_all_by_artist_id(artist.id)<br />
Â Â Â Â Â Â Â Â Â existing_products.each do |existing_product|<br />
Â Â Â Â Â Â Â Â Â Â Â Â existing_product.destroy<br />
Â Â Â Â Â Â Â Â Â end</p>
<p>Â Â Â Â Â Â Â Â Â # Query Amazon<br />
Â Â Â Â Â Â Â Â Â request = Request.new(DEV_TOKEN, ASSOCIATES_ID)<br />
Â Â Â Â Â Â Â Â Â response = request.artist_search(artist.artist_name)<br />
Â Â Â Â Â Â Â Â Â products = response.products</p>
<p>Â Â Â Â Â Â Â Â Â # Loop over each product and add them to the database, one at a time<br />
Â Â Â Â Â Â Â Â Â products.each do |product|<br />
Â Â Â Â Â Â Â Â Â Â Â Â new_product = Product.new</p>
<p>Â Â Â Â Â Â Â Â Â Â Â Â new_product.artist_id = artist.id<br />
Â Â Â Â Â Â Â Â Â Â Â Â new_product.product_name = product.product_name<br />
Â Â Â Â Â Â Â Â Â Â Â Â new_product.url = product.url<br />
Â Â Â Â Â Â Â Â Â Â Â Â new_product.image_url_small = product.image_url_small<br />
Â Â Â Â Â Â Â Â Â Â Â Â new_product.image_url_medium = product.image_url_medium<br />
Â Â Â Â Â Â Â Â Â Â Â Â new_product.image_url_large= product.image_url_large</p>
<p>Â Â Â Â Â Â Â Â Â Â Â Â new_product.save<br />
Â Â Â Â Â Â Â Â Â Â Â Â new_product = nil<br />
Â Â Â Â Â Â Â Â Â end<br />
Â Â Â Â Â Â end</p>
<p>Â Â Â Â Â Â redirect_to(:controller =&lt; "admin", :action =&gt; "index") # Return to the list page if it suceeds<br />
Â Â Â end<br />
end</code></p>
<p>What I&#8217;d like to do now is to have a Ruby script run nightly that updates a portion of the products in the database. For example, at midnight on the first day of each month, all artists whose names begin with A would have their products updated from Amazon. At midnight on day two, all B artists would have their products updated. I just have to figure out how to do this&#8230; but once I do, I&#8217;ll post it here.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.roryhansen.ca/2005/07/18/amazon-web-services-on-rails/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>
