It retrieves the cost per click from the advertiser, and it calculates
the cost per sale by calculating the total cost of all of the clicks, then dividing it by
the total number of sales.
Summary
This chapter covered a great way to import data from Apache logs and then analyze that
data using Active Record. You can use analyses like these to intelligently choose how to
spend advertising dollars. By spending more money on advertisers with a low cost per
sale, you can be more efficient and increase your total sales.
Additionally, you saw how you can easily create PDF reports using just Ruby code,
and how you can speed up data import significantly using ActiveRecord::Extensions.
Both techniques are valuable. PDF reporting is a powerful and easy way to increase the
CHAPTER 10 n CALCULATING COSTS BY ANALYZING APACHE WEB LOGS 212
utility of your reports, and loading large amounts of data quickly is important to making
your reports useful.
In the next chapter, you??™ll see how you can monitor public news about your company
??”or, for that matter, any RSS feed??”using FeedTools, and then graph the data using
CSS and HTML.
Pages:
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306