Building a Datafeed Site – Step 1

I have been, or can be if you click on a link and make a purchase, compensated via a cash payment, gift, or something else of value for writing this post. Regardless, I only recommend products or services I use personally and believe will be good for my readers.

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

  • PandaMarketer
    Posted March 5, 2010 6:40 pm 0Likes

    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.

  • Trackback: Building a Datafeed Site – Step 1b | Eric Nagel
  • Trackback: Building a Datafeed Site – Step 2 | Eric Nagel
  • Trackback: How to Build an Affiliate Datafeed Site Series from an Affiliate - 5 Star Affiliate Blogs
  • Trackback: Internet Marketing Roundup
  • Trackback: Roll Your Own Datafeed Site |
  • Angelo
    Posted March 28, 2010 3:53 pm 0Likes

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

  • Trackback: Update #1 | Carl Gutierrez
  • Bishop
    Posted April 25, 2010 4:32 pm 0Likes

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

  • Mike Johnson
    Posted June 12, 2010 10:27 am 0Likes

    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.



  • ArtMan
    Posted June 22, 2010 1:42 pm 0Likes

    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.


  • Trackback: Rehabbing a Defunct E-commerce Site with Affiliate Products, DoublePlus E-Commerce Blog
  • Isaac
    Posted August 21, 2010 9:10 pm 0Likes

    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.

  • Trackback: The Affiliate Non-Review Strategy
  • Matt
    Posted April 13, 2011 11:35 am 0Likes

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

    • Eric Nagel
      Posted April 13, 2011 12:02 pm 0Likes

      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
        Posted April 13, 2011 2:25 pm 0Likes

        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.


  • Trackback: Earth Divas Affiliate Program
  • Brian Metzger
    Posted November 17, 2011 1:14 am 0Likes

    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…

  • Trackback: Datafeeds
  • Trackback: Monkey Finger, Cankles and Datafeeds
  • Dev Duff
    Posted November 1, 2012 2:53 am 0Likes

    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.

Leave A Comment

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.