Tracking Impressions and Transfers

Normally, when you display advertisements, you do it to make money. Your advertisers want statistics on how often their advertisements display (the number of impressions) and how often their advertisements are clicked (the number of transfers).

To track the number of times that an advertisement displays, you need to handle the AdRotator control’s AdCreated event. To track the number of times that an advertisement is clicked, you need to create a redirect handler.

Warning

If you create an event handler for the AdCreated event and you cache the page, the content rendered by the AdRotator control is also cached. When handling the AdCreated event, use partial page caching to cache only part of a page and not ...

Get ASP.NET 4 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.