We use a really good ad network, ebuzzing, in addition to adsense, rubicon and so on. The problem is with our use of ebuzzing in the forums is that the overlay footer ad it produces can be closed, but then it's there again when you refresh the page. This becomes annoying.
My quick fix solution is to show it randomly once in every five page views. This is better but not ideal. The ideal would be to show it to a user on, for example, their first, fifth, tenth... page view, but for this I need a count of pages viewed per session in the template.
Any suggestions as to the feasibility of this and how to do it would be very welcome!