This is the first in a series of how to build a datafeed site. I’m building the site right now, and will share the experience with you.

This will be an intermediate to advanced method of using datafeeds to build a site. If you’re looking for a simple way to get started, go check out Pop Shops or Datafeedr. What I’m going to show you is how to build a high-quality site, driven by a datafeed, for free.

The absolute first thing you need to do is pick a niche. I’m not going to help you here, but because I’ve been talking with Deborah Carney (aka Loxly), I’m going to build a tea site. Loxly manages the American Tea Room affiliate program, so I’m going to use their feed, along with Art of Tea (both ShareASale merchants). After the site is “done”, I’ll look at adding a CJ merchant feed in there.

ShareASale's datafeed iconTo find merchants in ShareASale that have datafeeds, login and look under “Find/Join Merchants” and click on “View those with Datafeeds“. To keep things simple, pick a merchant (or two, or three) with a couple hundred products. If you choose ecampus, with 2.7mm products, you’re on your own.

Choosing a domain name isn’t extremely important, but as Vinny O’Hare reminded me, have the keyword in there. So I’m building out Just make sure you keep the domain under 35 characters, so you can use it as your AdWords display URL.

Set-up the hosting, and make sure you create a MySQL database when you do this. We’re going to save the datafeed in MySQL, to make a dynamic site. Don’t worry, I’ll give you the products table structure… all 41 fields!

Next, find a template from Free CSS Templates that matches the theme of your niche. You’ll see on I’m using the Begrimed theme.

Themes from Free CSS Templates include a single index.html file, but I want you to break this into 3 php files: header.php, index.php, and footer.php. Index.php should include header.php, then have the content unique to the index page, then include footer.php. My index.php file is simply:

<!--?php 	include('./vars.php'); 	$bNavHome = true; 	include('./header.php'); ?--></pre>
<div class="post">
<h2 class="title">Welcome to</h2>
<div class="entry">
This is <strong>Begrimed </strong>, a free, fully standards-compliant CSS template designed by FreeCssTemplates for <a href="">Free CSS Templates</a>. This free template is released under a <a href="">Creative Commons Attributions 2.5</a> license, so you’re pretty much free to do whatever you want with it (even use it commercially) provided you keep the links in the footer intact. Aside from that, have fun with it 🙂

Sed lacus. Donec lectus. Nullam pretium nibh ut turpis. Nam bibendum. In nulla tortor, elementum ipsum. Proin imperdiet est. Phasellus dapibus semper urna. Pellentesque ornare, orci in felis. Donec ut ante. In id eros. Suspendisse lacus turpis, cursus egestas at sem.</div>
<!-- ends class="post" -->
<!--?php 	include('./footer.php'); ?-->

Don’t worry about vars.php right now.

That’s enough for one day. Next, we need to download the datafeeds, and get them into MySQL.

Datafeed Site Navigation

11 Comments » for Building a Datafeed Site – Step 1
  1. This is what I like about your blog, Eric, it’s not for the novice programmer (or those afraid of PHP tags)! Since I heard a nice podcast called Both Sides of the Tracks, I have been thinking about datafeeds too.

  2. Angelo says:

    Check out as well. Lots of data feeds from various networks and it’s 100% free unlike Pop Shops and Datafeedr.

  3. Bishop says:

    So, I did everything from the instruction, the result is good! thanks!

  4. Mike Johnson says:

    I understand that you know the technical side of building a site like this, the only problem I see is that there are already a dozen plugins or more available that can do this entire process in minutes as opposed to building it from scratch like this.



  5. ArtMan says:

    The advantage of doing the code is you’ll have more control over the end results and how it works. With an alreday-made plugin you are very much limited to the Author is providing.

    Now I’d like to know if this is easy to implement into wordpress.


  6. Isaac says:

    First visit to your site, a welcomed resource I’ll be following your feed articles closely. I’ve been looking around for a solution for my current website a mobile phone comparison site. Not a great niche I know but I appropriate the effort you have gone to here thank you.

  7. Matt says:

    I’m getting the admin page login screen over and over when I enter in the appropriate values. Any ideas?

    • Eric Nagel says:

      I’d have to do some debugging on your server to find the answer to this. It’s a pretty standard login script. You can try putting a print_r($_SERVER); after the else { in admin-password.php to see what values are in PHP_AUTH_USER and PHP_AUTH_PW.

      • Matt says:

        Thanks for the quick response.

        I use 1&1 shared hosting and I believe the issue lies with the PHP configuration. I read something about it on the web earlier that this type of authentication does not work with PHP running as a CGI – I know my host does that. I did not, however, find any alternative solution to embed into the pages.

        My host has an alternate method of securing individual pages from my site’s control panel, so I will likely just use that in the interim.


  8. Thanks for the post. At ASW11, several people mentioned how they would love to do datafeeds but the technical hurdle was too much. Since Datafeeds are our bread and butter, I don’t mind the chasm. It keeps the pool less crowded so to speak. But thanks for addressing it.

    The main hurdle even beyond just getting a data feed site set up is the ability to update it, and make it automated. The other factor is how to add your own value to the datafeed through content, etc.

    It keeps our programmers busy…

  9. Dev Duff says:

    Well, simply put, that’s a tutorial on how to integrate datafeedr feeds to make a website. I have used Datafeedr’s WordPress plugin and what not but it has certain limitations. Secondly, searching through the datafeedr database is not that easy. You search something and it gives products in some other category. For example, if you are looking for guitars, you make a search query with the keyword guitars, it returns all sorts of products related to guitars such as guitar gear, guitar amps, guitar strings, etc etc. Then again, you are looking for a better solution. There should be some system that should allow you to upload datafeeds from the source like some XML file and then allow you to choose which products to display and which products not to display. Then take it one step ahead, once the products are populated and pages created on your website, you should be able to add content. Displaying datafeed products is not the end, it is just the beginning if you wish to gain ranks on search engines.

    I understand this is an old article but I just bumped into it so thought of leaving a comment .. hope that’s ok.

11 Pings/Trackbacks for "Building a Datafeed Site – Step 1"
  1. […] next step in building a datafeed website is getting the data into the database, but to do this, we need to build an administrative section […]

  2. […] now, we have selected the niche and chosen a template, added some supporting files and created the database, and are now ready to populate the products […]

  3. […] only a select few of us in the States get to enjoy. Anyway you can find his datafeed posts here: Step 1, Step 1b, Step 2, Step 3, and Custom Categories. Thank you so much for this Eric, very […]

  4. […] Here’s the first post in the series, which you can follow all the way to the end through his blog.  If you’re struggling with ppc and need a more robust, long-lasting alternative, then SEO driven revshare sites based on datafeeds might be what you’re looking for.  They definitely take time, but are not hard to throw together at all, and if you outsource the SEO work, you could probably make a solid business out of it. […]

  5. […] into starting up some datafeed sites using Eric Nagel’s case study to get […]

  6. […] I ran across a neat set of posts by Eric Nagel on coding a datafeed site using PHP. That sounded like a lot of fun! I don't get to do much PHP work anymore, and the thought […]

  7. […] shared an example where he posted about Building a Datafeed Site, and had a bit of a disclaimer: This will be an intermediate to advanced method of using datafeeds […]

  8. […] it’s not always that easy. Top affiliate marketer, Eric Nagel, has a great blog post on building a datafeed website. It’s priceless […]

  9. Datafeeds says:

    […] Building a Datafeed Site – Step 1 […]

  10. […] Links • Wine Clubs • Unboxing videos • Eric as King of the Datafeeds • SF Giants Baseball • Affiliate Summit West […]

Leave a Reply

Your email address will not be published. Required fields are marked *