Filed Under (Affiliate Marketing) by Dave Riggs on January-6-2008

Having gotten into some new advertising platforms recently, I’ve realized something that can be vastly improved: daily stats tracking.

I love sites like Google Analytics, but I find that there’s so much buried data that I’ll never use.  And for everything else, it’s a pain logging into site after site, only to get one single piece of information, and then being unable to juxtapose that data with the previous stat.

Time to take this to the next level.

I like programming. Mainly Java for enterprise Web apps and storefronts, but PHP is the clear winner for every problem I’ve wanted to solve lately.  It’s literally the perfect Web/scripting language for affiliate marketing.

I program for a living full-time but am slowly starting to realize the value of automating literally everything possible. Why not dedicate a few hours a day now to save days and weeks in the future?

The script I started (and mostly finished) today logs into a few of my advertising and affiliate accounts (Facebook and OurFreeStuff currently), scrapes relevant stats data, and downloads the information to a local DB on my dedicated server. The next step is to build a reporting platform on top, using the same sort of open-source stuff I’ve been using up until this point. The script runs every X minutes (X is 5 at the moment), then queries the reporting system to provide me graphs with relevant metrics like leads/sales per hour, CTR at different times of day, which days of week give the most volume, etc.

Let’s step back first.

The main problem I’m trying to solve is: when I start a campaign, how can I know for absolutely sure whether it will be profitable?

It’s not even an option to work with affiliate networks that don’t provide real-time stats. I need to know now.  Or at least within the next 20 minutes from when I start receiving impressions.

For you fellow geeks out there (and the rest of you who want to be thoroughly confused, impressed, or annoyed), here’s the technology stack I chose:

  • PHP using cURL for logging into Web sites, POSTing user/pass for authentication, and regular expressions for parsing data from returned-HTML
  • MySQL for data storage, using a custom schema I came up with while considering business needs
  • Linux Crontab for scheduling (every 5 minutes) - the goal here is I don’t want to even touch a single thing unless it’s CTRL + R in Firefox on my stats page
  • JpGraph for colorful, useful graphs that show me the metrics I want

The beauty of all this?  Well, besides that it works, and it’s badass; it’s all FREE.  I love open source stuff.  Why re-invent the wheel, or why pay for the wheel when it so readily available?

A few weeks ago when I started thinking about this, I was almost going to outsource my stat tracking to a virtual assistant.  Timothy Ferriss’ of the Four Hour Workweek goes into great detail about how to basically automate your entire life.  Do you set goals or have a daily to-do list?  If not, well, maybe you should work on that. If you do, consider re-reading all your tasks/goals with one thing in mind: could I have someone else do this for me? If your time could be better spent starting campaigns or researching niches, why not pay somebody else to do your menial tasks? It’s amazingly cost-effective - every hour you spend doing affiliate marketing is insanely more valuable than collecting, gathering, and organizing data.  Let’s be honest - you can pay a high school freshman to do that.

Literally, Ferriss outsourced everything from his businesses’ customer service to ordering flowers for his girlfriend.  Pure genious.  When about ready to putt this in action, my plan was to outsource stat tracking and all the annoying (but important) tedious tasks I don’t enjoy doing - i.e. login to all my advertising, affiliate, and stats accounts and send me one daily email every morning with a nice, clean report with all the info I need.  And maybe I’d have him/her reserve a table at a hot LA sushi restaurant one week too.

But instead, I decided just to code it myself.  Refreshing one site (mine) instead of ten and get all the combined information should be more efficient.  Imagine being able to get only the relevant Google Analytics stats you want, combined with the impressions/clicks/CTR/etc. from your Facebook Ad Manager, and also stacked right up against the number of leads you’re generating from your affiliate account?

That’s 3 sites, all calcuated together: overall page views -> impressions -> clicks -> leads -> dollars.  Boom.

Anyway, that’s the idea, now time to get back to work so I can pimp this one out. If it ends up being worth something to someone, maybe I’ll just sell it or give it away for free, who knows!

But the point remains - focus on stats and tracking - for every successful campaign I’ve begun, I’ve started 3 that lost money or just simply didn’t perform.  The earlier you catch this, the better. 


Post a comment
Name: 
Email: 
URL: 
Comments: