Tracking what keywords is very easy, in it's most basic form if you're using a landing page just add a little code to it. In it's most basic form we'll use just a file to track data.
<?
// this gets the keyword we're passing in the url http://domain.com/page.php?k={keyword}
$keyword = trim($_GET['k']);
// this gets all the records out of a text file, 1 per line.
$records = file("records.txt");
// gets a count of the records
$count = count($records);
// makes a record id by incrementing to the next number
$record = $count + 1;
// this writes the new click to the file in the format
// 347,my keyword
file_put_contents("records.txt",$record.",".$keyword."\n",FILE_APPEND);
?>
So now all we have to do is pass our subid as the $record so for example we put that at the top of our page. Then say it's just a hop page that redirecting or iframing. All you do is just do a
<iframe src="http://affiliatesite.com/offer/affid/<? echo $record; ?>" height="100%" width ="100%" frameborder="0">
where the echo is echoing out the corresponding row number we saved our record as in the file. So then when we look at our conversions we'll see the subid attached to the conversion. Then we go back and reference in our text file we can see what converted.
If you want you can add some other data to the rows. Take a look at my tutorial on my blog and it has all the stuff you can add. If you're going to run a large scale operation it only makes sense to run a DB becuase it's a lot easier to build ways to analyze the data and come to conclusions. But that should get you started.
P.S. I just wrote that freehand and that code isn't tested.