Looking to sell products online but don’t like to keep inventory, invest a lot of money to test out the viability of a new niche, or have to deal with the hassle of shipping products yourself? Dropshipping is for you.

Dropshipping is nothing new in the business world, or online. However, over the last couple of years it’s really taken off since Internet Marketers have been diversifying their income with all the crazy regulations that they’ve started getting hit with that killed off the revenue streams they were using to make money.

Why is Dropshipping the future?

  • Zero Inventory
  • Complete Customization
  • Scalability

Zero Inventory

With traditional eCommerce models, there’s a large amount of overhead. You have to set up a store, physical or online, and maintain a warehouse for the products in that store. That’s fine for physical retailers that also have an online presence. It’s bad for everyone else that are just starting their online ventures to diversify their income.

Sure, you could come close with using a fulfillment center to manage your warehouse and ship out your orders, Amazon offers this service. You still have the problem with having to order a set quantity in order to purchase at wholesale prices. This is where using a dropshipper allows you to gain an advantage.

By using a dropshipper to dropship your products to customers, you have nearly $0 overhead in trying a new market out with a few items before investing more resources into it. You only pay when someone buys a product.

Complete Customization

This is what appeals to me with dropshipping. You have complete control over the order process. That’s something you don’t have with other online endeavours, such as affiliate marketing where you don’t get to see how the visitor progressed through the site before converting. For all you know, the advertiser you were promoting could have shaved a fair amount of your earnings and get away with it by saying they didn’t convert.

So, once you find a supplier you want to use for a certain product line, you pull their product feed with picture, description, pricing, etc. and can use it in a shopping cart like Magento, a WordPress blog, or your own custom installation; tweak all the on-site optimization, and know exactly how the user’s experience is going.

It’s not all having your cake and eating it too. There are some drawbacks – such as having to manually source and define terms before using the dropshipper. Fortunately, there are many online directories that keep a list of them. Two major ones are Worldwide Brands and GoGo Dropship.

Each of those directories comes with a fee to view the contact information. Worldwide Brands costs a lifetime membership fee of about $300, and GoGo Dropship’s is over $800 for a lifetime fee, but you can pay monthly or yearly depending on how often you’re wanting to source suppliers. One distinguishing feature I like about GoGo Dropship is that you can have them source suppliers for you if you can’t find any in their directory for the particular niche you want.

Scalability

This is another selling point that I think a lot of Internet Marketers are loving once they realize the full potential of using a Dropshipper to run an eCommerce site: it scales far more in many different verticals and horizontals.

Once you have the site up and running, your main maintenance is contacting the dropshipper each morning, paying them, and having them send out the products. Depending on how involved you want to get with your customers, you could add phone support and accept returns. Still, you could be running a few different eCommerce sites yourself before having to hire someone.

Once your site gets big enough, hire some people to manage the sites, build more, and keep growing. Unlike affiliate marketing, you don’t have to rely on others to pay you. You’ve already got the money. If your supplier bails on you, there are usually several others in your niche. Your entire revenue stream isn’t dependent on a few potential offers to place on your website.

In addition to that, you can bring in affiliates to promote your store and get extra traffic. Sign up with Commission Junction or some other major CPA network and they can handle the distribution of fees for you and help you integrate it with your store if you don’t want to mess with managing affiliates yourself.

If it all gets too much for you, you can easily sell the site off on Flippa. More people are willing to take over an eCommerce site than other revenue models because they are easier to understand and maintain.

Final Thoughts

There’s a lot that goes into setting up a site to dropship with and Eli over at BlueHatSEO covers it really well in his The Real Secrets to E-Commerce post. The main thing is, get organized and get off your butt and make it happen.

, ,

Ever wanted to get a list of information such as URLs, Articles, tabular data, or whatever else that you know is on one website or across multiple websites, then manipulate it to reuse elsewhere? Stop wondering, because we are about to get down to business!

There’re many ways to scrape / mine data, but I’ve found that the easiest and most efficient way is to use a combination of cURL and XPATH. cURL is neat because it will easily let you use proxies, manipulate browser information, catch errors, etc. XPATH is great because you don’t need to write a bunch of regular expressions or other functions to manage the data – you just manipulate the DOM tree with a single string and you can get the group of elements that you want in an array. Both of these modules are available in nearly every programming language, so your code, if written correctly, can easily be ported from one language to another.

What We’ll Touch On

Before We Begin

Our Goal

I called this post “advanced data scraping” because we are going to be doing more than just getting a small bit of information. We are going to be crawling multiple pages, gathering URLs, and then parsing those URLs and scraping data on those pages. The techniques taught here are used by many programmers for a variety of reasons, and will even let you scrape pages rendered entirely in Javascript (such as Google)!

So, we’ll start with a generic site meeting that criteria, such as EzineArticles.

Our Tools

If you don’t have Firebug yet, you need it. It’s amazing for quickly checking the elements of a page, especially when setting up XPATH queries. You’ll also want to grab Xpath Checker to quickly see if your XPATH queries are selecting the correct elements. Both are FireFox extensions.

Pre Coding

Before we start coding, we want to gather our XPATH queries to make sure we can select the data we want and get a feel for how we’re going to program the scraper.

First, we need to figure out what section of EzineArticles we’re going to scrape. I think Business >> Ethics is a suitable section. We have two options here, only scrape the RSS feed, or scrape the pages directly. For this tutorial, we are scraping the pages directly so that we can get all the articles, not just the 100 or so most recent. It also lets you see how you would scrape sites with pagination (a section broken up into multiple sections of 10, 20, 30, etc.).

Category Section Page

EzineArticles Article Snippits DOM

EzineArticles Article Snippits DOM

In order to see how you want to go about selecting sections of the DOM with XPATH, you need to look at the code. Firebug is great for this.

On the section page, the XPATH query to get the information we want is this:
//div[@class='ea-category-list']/ol/li

That query will get an array of every list element within a div that contains the “ea-category-list” class. The list items contain a link to the article, a short description, and the author; so, the only thing we lack now to complete all the article information is the article itself.

If you want a more in depth explanation, the plugin page for Xpath Checker has some, as well as this page about Xpath from W3Schools.

While we are still on the section page, we might as well get the XPATH query that will check if there are still more pages to the section so we can continue grabbing URLs.

//div[@class='ea-category-list']/p[@class='title']/a[text()='Next 30']/@href

This XPATH query is a little different, because we need to check if there is a link for “Next 30″. This type of situation is what makes XPATH such an excellent choice for scraping. Now checking if there are more pages is as simple as just popping in an “if” statement to see if there are elements in an array. In addition, I added “@href” at the end, which will only return the URL of the link to save some coding.

On to the Article Page.

On the article page, the XPATH query to get the information we want is this:
id('body')

This one was simple because EzineArticles puts all their articles into a div with an id.

Writing the Script

Now that we have the XPATH queries, we can begin coding. We’ll want to make this into a class, because you never know if you will want to reuse the script later. We might as well go ahead and take a few additional minutes so that we can use it for “any” section on EzineArticles.

The Constructor

PHP Classes, like most object-oriented programming, allow you to make a constructor that will fire certain actions once the class has been instantiated. This is especially useful for our needs so that we can just have it do stuff once we pass it a URL at instantiation.

class Scraper {
	protected $articles = array();
	protected $domain;

	// Set actions to run when the class is instantiated
	function __construct($url){
		// Set the maximum execution time of the script to unlimited so that it can grab all the articles if there are a lot of them to scrape
		set_time_limit(0);

		// Set the root domain of the URL to concatinate with URLs later
		$this->domain = explode("/", $url);
		$this->domain = 'http://' . $this->domain[2];

		// Pass the page URL you want to start scraping and start scraping through the section pages
		$this->getArticleUrls($url);

		echo count($this->articles) . ' - Done counting articles items, now adding articles.
';

		// Loop through the article pages and grab the full article to finish populating the articles array with data
		foreach ($this->articles as $item){
			$item['article'] = $this->getArticles($item['url']);
		}

		echo count($this->articles) . ' - Done adding articles.';

		// Add function here to start adding items in the article array with articles to a database
	}

The above block of code basically creates a constructor that will do three things (minus the print outs to the screen which can be eliminated): take the given URL and get the root domain name (since EzineArticles uses relative URLs instead of the full URL for it’s article pages), call the getArticleURLs function, and call the getArticles function. So, when we instantiate the Scraper class those three things will happen without any more interaction needed.

Get Article URLs Function

	// Start Get Article Urls
	private function getArticleUrls($url){
		// Instantiate next page variable to check at the end
		$nextPageUrl = NULL;

		// Instantiate cURL to grab the HTML page.
		$c = curl_init($url);
		curl_setopt($c, CURLOPT_HEADER, false);
		curl_setopt($c, CURLOPT_USERAGENT, $this->getUserAgent());
		curl_setopt($c, CURLOPT_FAILONERROR, true);
		curl_setopt($c, CURLOPT_FOLLOWLOCATION, true);
		curl_setopt($c, CURLOPT_AUTOREFERER, true);
		curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
		curl_setopt($c, CURLOPT_TIMEOUT, 10);
		// Add curl_setopt here to grab a proxy from your proxy list so that you don't get 403 errors from your IP being banned by the site

		// Grab the data.
		$html = curl_exec($c);

This part of the function Sets up cURL. It’s basically being told to not return header information, call the function I set to randomly show a common browser’s user agent, fail if it has an error, manage the referer itself, return the page instead of show it once it goes to the URL, and time out after 10 seconds so we won’t be waiting forever if the site is slow.

I’m not going to get into how to setup and use proxies with cURL, but it’d be wise if you did that since EzineArticles, and many high-traffic websites, will limit the number of requests per second or ban IP addresses if they get a lot of traffic from a single IP. It’s fairly simple to have a text file of proxies and randomly choose one to use with cURL.

The last line executes cURL with the above mentioned options and stores it in a variable named $html.

		// Check if the HTML didn't load right, if it didn't - report an error
		if (!$html) {
			echo "

cURL error number: " .curl_errno($c) . " on URL: " . $url ."

" .
				 "

cURL error: " . curl_error($c) . "

";
		}

		// Close connection.
		curl_close($c);

		// Parse the HTML information and return the results.
		$dom = new DOMDocument();
		@$dom->loadHtml($html);

		$xpath = new DOMXPath($dom);

		// Get a list of articles from the section page
		$articleList = $xpath->query("//div[@class='ea-category-list']/ol/li");

		// Add each article to the Articles array
		foreach ($articleList as $item){
			$this->articles[] = array(
										'url' => $this->domain . $item->getElementsByTagName('a')->item(0)->getAttribute('href'),
										'title' => $item->getElementsByTagName('a')->item(0)->nodeValue,
										'author' => $item->getElementsByTagName('em')->item(0)->getElementsByTagName('a')->item(0)->nodeValue,
										'description' => $item->getElementsByTagName('div')->item(0)->nodeValue,
										'article' => ''
									);
		}

The above block of code will output errors that cURL has while parsing the pages and then close the connection. It’s good practice to close a connection as soon as you don’t need it anymore. It frees up memory and CPU on your server.

Next, a DOM object is instantiated, then the page information we got through cURL is broken up into DOM elements that we can traverse with XPATH, which is what is instantiated next.

The XPATH query we setup earlier is plugged into the code and that little bit of the page is stored in $articleList for us to easily use in a foreach loop to grab the bits of information we need and store it in our $articles array.

In case you hadn’t noticed, I’m storing an associative array for each article. This makes it super easy to grab the specific information I want about the article later in the code and if I decided to store the array information into a database later.

Also, take note about how I’m setting the information for each array element. Each DOM element that I call $item in the foreach loop can be accessed just like you would if you’re familiar with JavaScript. It’s sharing the same DOM model for accessing each element, tag, and attribute – which is another reason that XPATH is so powerful and easy to use.

		// Check to see if the Next 30 link is active
		$nextPageUrl = $xpath->query("//div[@class='ea-category-list']/p[@class='title']/a[text()='Next 30']/@href");

		if ($nextPageUrl){
			$nextPageUrl = $nextPageUrl->item(0)->nodeValue;

			// If there is a next page, go to it.
			if (isset($nextPageUrl) && $nextPageUrl != ""){
				$this->getArticleUrls($nextPageUrl);
			}
		}
	}
	// End Get Article Urls

This last bit of the function checks to see if there’s a link around “Next 30″. If there is, it will call the getArticleUrls function again. This is called recursion. Recursive programing is very powerful because it allows you to keep using the same code again and again until it’s done. The function is its own loop!

Get Article Function

I’m not going to display this one since it contains code that’s been touched on earlier: setting up and executing cUrl and XPATH.

Final Thoughts

Scraping data is a very powerful knowledge and skill to have. There’s a ton of ways to use scraped data: sell databases, use articles gotten from sites and spin them to use on your Web 2.0 or blog properties, etc. The possibilities are endless and only limited by your imagination.

Keep in mind, not all scraping is the same. Manipulating data to reuse and do stuff with (such as grabbing a list of sports stats from ESPN) is not the same as grabbing an article off EzineArticles or someone’s site and showing it on your own site. The later is copyright infringement, so be smart about what you do with scraped data.

I used EzineArticles as an example, I’m not advocating ripping their articles without you giving credit to the author and linking back to the main article and leaving their links in tact.

Download the Script

You can get the scraping script in a text file. Have fun and go make some money!

, , , ,

Anyone who’s been around the Internet for more than 5 minutes has stumbled across some pretty nasty landing pages. Do any of these look like stuff you’ve done?

  • 5,000+ characters of sales copy with little to no whitespace
  • No call to action immediately visible without scrolling
  • Or Worse – No conversion form immediately visible

If you cringed at those points and nodded, then that’s good! Admittance is the first step to recovery.

3 Things You Should Be Doing To Convert

Whitespace Is Your Friend

Whitespace: the portions of a page intentionally left unmarked by text or graphics.

Too many people try and either cram too much into a small area to fit it all on the screen, or get all of their sales copy out on a single page. Too much in a small area can lower your conversions, and excessive scrolling to read it all on a single page can as well.

You have a narrow window between the time the visitor arrives on your page and the time they decide whether or not your page is worth being on. So don’t use that opportunity to annoy them.

I discussed using whitespace, text, and images effectively to increase ROI in my previous article on Using Web Typography to Increase Conversion Rates and SEO.

Clear Call to Action

From the time the visitor arrives on your page, their eyes should immediately shift to a heading for your call to action. It needs to be short, but informative. They should know immediately what to do on your page.

Use whitespace to help draw the eye to the call to action. Also, you can center the call to action near related bullet points to further expand on why someone should be taking action.

Put Your Conversion Form in Eye-View at All Times

If your conversion form, button, or whatever it is that someone does to convert on your page isn’t in eye-view at all times, you risk losing money.

Yes, that means that if you like having one-page sites with a lot of content, you need to get creative about how someone gets their information.

Your entire page should be directing someone to your call to action and convert them. You should be laying out your content in a way that makes them want to stop reading and convert. They should be able to easily get the answers to their questions and take action.

, , ,
Face Palm

Face Palm

For some reason or another, more and more people seem to be posting on WickedFire that have ethical dilemmas with affiliate marketing. Another one of these threads popped up just before my class last Thursday.

Is affiliate marketing ethical?

This is the big question these people have. At its core, affiliate marketing is just helping one company get extra business and you getting a percentage of its profits. There are no shades of gray. Like any business model, there are many ways to go about it; not all of them are ethical.

Products for the ethically conscious

This brings us to the subject of the post. There was a guest speaker from CoffeeCup Software in our class on Thursday. J. Cornelius was there to speak about where the web has come from and where he sees it going. But, he also spoke a lot about the innovations CoffeeCup Software has done in their business and some currently in the pipeline.

Now, like any Internet marketer, I was thinking about how to monetize what he was saying. And this made me think back to those threads I keep seeing on WickedFire. So, after class I had a talk with J. Cornelius.

He’s a cool guy, and said that a lot of their products are on Commission Junction. Now, while I’m not too fond of the CJ platform, it does mean that you get to have a wide choice of products that you don’t feel guilty about. There’s some on every network, so you don’t have to go with Commission Junction.

So, if you’re thinking that affiliate marketing is all about pushing berries and rebills to take people’s money for shitty products, that’s not the case. CoffeeCup Software has a lot of products to choose from, all of which give someone a very useful product. In fact, one of their creatives has a $19 EPC, which isn’t too bad. There’s lots of ways to monetize that stuff, including copying some of their images, writing reviews, and just linking to it with your CJ link. You don’t have to just use their banners provided.

I’m just tired of people thinking that affiliate marketing is just there to rip people off, it’s not. There’s plenty of money to be made, you just have to know how to look for products that you’re comfortable with.

/End Rant

, , ,

With all the new innovations happening in the Web every day, it’s easy to just block it out of your mind and stick to what you know. I recently came across a discussion with Luke Wroblewski discussing innovations in web input. It’s pretty slow moving, but there are a few gems.

Three Areas of Input

  • Rich interactions with input
  • Input can come from anywhere
  • Leverage already inputted information

Rich Interactions with Input

An example Luke discussed for this is Google’s Instant Search. A visitor is inputting information and getting real-time results that appear almost magically as they type. This helps the visitor feel like they are really engaged with the page.

Since websites are constantly upping the ante with new ways that visitors can input and interact with information, a standard “type and submit” form may end up turning off visitors who have come to expect a rich experience from their past dealings with Facebook and Twitter.

Another way this could be used would be to help someone searching for a product from your shopping cart get real-time, relevant results as they type in something. They may not know exactly what they are looking for, but if they are getting back a listing of products with pictures and a brief description as they type, they can better narrow their search when those results help them realize what they are looking for.

Input Can Come From Anywhere

This concept is not often considered. The idea is that a visitor to your site will spend much more time away from your site than on it, even if they are a high-trafficed site like Facebook. So, to better interact with your visitors in ways that they feel comfortable, your site should be open to input that can come from anywhere.

For instance, if you run an article directory, a fair number of your users will be 40+. This demographic tends to use E-mail far more than spending their day using web forms. So, why not be able to take E-mail submissions that go right into the queue of articles?

Leverage Already Inputted Information

This point is something that we all think about on a regular basis when signing up for websites, but oddly enough – is not often remembered when launching your own sites.

Having to enter redundant information is a pain, and often can lead to a lower conversion rate and greater bounce rate. Anytime a visitor has to go hunting information or spend more time typing something in, the greater the probability of them giving up and leaving.

The example that Luke used was Apple’s Ping Social Network for iTunes.

I liked how he described it. He said that Apple’s customers that buy their computers have a great unpacking experience. The whole process from the time they open the box through turning on the computer, loading their personalized profile, etc. is carefully thought out to be as user-friendly as possible.

He contrasted this to Apple’s new Ping Social Network. It’s ignorant of information the user already has on iTunes, requires you to wait while Apple approves your profile photo (He’s been waiting two weeks), restricts your name to what’s on your credit card, requires you to go through Apple’s Store to choose which songs you like rather than grabbing the list from your iTunes account, etc.

Apple already has a lot of the information that Ping wants you to enter, but they don’t grab it from places that you already are storing it.

This same concept can be applied to any website. You can use GEO location data when someone’s filling out a form, grab their name, address, phone number, picture, etc. from their Facebook account, etc. There’s a lot of opportunities out there to apply this concept, but not many websites embrace this concept.

, , ,