closed as off topic by Susan Jones, jimg, Christian, Zuly Gonzalez♦ Oct 28 '12 at 19:35
Questions on Answers OnStartups are expected to relate to startups within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.
Google released multi-channel funnels last month. It will track all of these various channels.
Our site has a homegrown affiliate program. I set a 30-day cookie when they land on the site from the clickthru. The value of the cookie identifies the affiliate they came from; for a PPC ad campaign it would identify which campaign they came from.
Later when they order something from the site, we simply check if that cookie (still) exists. If it does, I write a row to a "clickthrus" table in the DB, and then a sales reporting page later queries that table for building its statistics on demand.