Now that I've dug around on the web a bit, I have a strategy for comparing the revenue generated by the two, and I'm looking for some feedback on this approach.
I'm going to write a cron job that switches the ads every 5 minutes. So, the AdSense ad will be displayed half the time, and the affiliate ad will be displayed half the time. (I could display the ads randomly on every pageview, but I can't think of any bias that this simpler approach introduces.)
Calculating AdSense Revenue
The AdSense ad is its own channel within AdSense, so I can slice and dice the data by channel and date.
Calculating Affiliate Revenue
This is a bit trickier. Basically, I'm setting up an "advanced segment" within Google Analytics for everyone that views the page '/affiliate/click1'. Then, if I segment "Goals -> Total Conversions" for the date range that I'm comparing to AdSense, I can get the total number of conversions. By multiplying the conversions by the revenue per conversion, I can get a dollar value for the affiliate ad.
If the two ads are alternated for a week, at the end of that week I should have a dollar amount for AdSense and a dollar amount for the Affiliate revenue. Whichever is higher, wins, no?
I'm assuming that by alternating the ads every 5 minutes, I will serve about as many of one ad as another. If it turns out that in fact, I've served 10x the number of affiliate ads as Adsense ads, then the results would be biased. Is there a straightforward way within GAnalytics to show the number of times an image is displayed? (An onLoad event for the image perhaps?)
One of the issues that comes to mind is that people may be more likely (or perhaps less likely!) to click on an ad if they see it multiple times. So it might be that the very act of alternating between AdSense and an image ad increases (or decreases) the number of conversions. So, I think ideally this would be further segmented: A group that sees only AdSense ads, a group that sees only Affiliate ads, and a group that sees both (if they request multiple pages from the site). But I can't think of a straightforward way to implement this (absent a cookie infrastructure that I'm not currently willing to invest in). Any thoughts?
This feels sort of kludgy -- is there a more elegant way to do this from within Google Analytics?