by asli
1. May 2010 15:07
It’s simple to modify the code in BlogEngine.NET to track analytics on your feeds. This is helpful if you have a variety of different topics on your site. Typically, readers will prefer to follow one particular topic – or category. As you can see on the right hand side, SlingAlibi has a variety of different Categories – or books, as we like to think of them.
With a little bit of customization, you can track which ones are doing well, and which ones, well, maybe it’s time to retire.
First you will have to burn a feed. By default, BlogEngine.NET will base the feed on the category name itself, such as:
http://blog.slingalibi.com/category/feed/Emirates-Hills-Chihuahua.aspx
What if we wanted to redirect that feed to an analytic engine who can examine the subscriptions and traffic to that feed? In order to create the redirect, you’ll need to dive into the App_Code, Controls directory. There you will see a code behind file called CategoryList.cs. Create a back up copy and then add some conditionals inside the code:
Now when your readers click on the tiny orange RSS icon next to your category, they will be redirected to the appropriate analytic engine for processing.