Blog Analytics: Widget For BlogEngine.NET Powered By Google Analytics

19. March 2011 17:44


Finally, I got to know the way to show Google Analytics stats on my blog space. To know more about using Google Analytics API read their official article on using the API.

I have built a widget with the help of Analytics API to show the Google Analytics stats on my blog. The widget shows three stats at the moment (I don't want to make the widget look complex). Below is a screenshot for the widget in action on my blog:


The above widget shows the stats since I have started blogging. As you can see my blog is not as popular as yours or as popular comparative with other MSFT guys and other popular bloggers. As usual before you can use the widget you need to do some settings for the widget.


You should be aware by now that this widgets uses Google Analytics API, and I hope you all have Analytics account. The Username and Password will be the same as your Analytics account (and without From Date and To Date specifies the date range which then populate the stats from Analytics service for the specified date range. I have provided an option that allows you to always use the To Date as the current date, you can do that by checking Always use Current Date (checking this will override To Date value). If you wish to show the stats ONLY for the current day then check Use From and To Date as Current Date (change the widget title from what you have to Today's Hit or whatever you wish!). I have settings as shown in the screenshot above for my blog and I am showing all my stats since I have started blogging.Last three options will allow you to toggle between the three statistics options you want to show on the widget or not.

I built this this in a lot of hurry, so if you find some bug or have some thoughts or you have made the widget more uselful, please feel free to write to me using the Contact form and let me know.

Download: BlogAnalytics - (107.28 kb)

Currently rated 5.0 by 3 people

Windows Live Theme For BlogEngine.NET

17. March 2011 17:16


I have now been using BlogEngine for 2 years now and I was kinda fed up with the standard theme I have been since starting which I have modified a bit to look more prettier. I am not saying it's bad but it's too much now, I should do a makeover of my blog. Now the BlogEngine community is not as big and vast as that of the most popular bloging engine Wordpress and therefore it is hard to get beautiful themes for BlogEngine.

This time I made my mind and sat down to create a new theme for my blog from scratch (LOL!!) but with the help of some good looking Wordpress theme. So I began my search and what I got is the one I have been looking for in the past when I started blogging. I found a Wordpress theme which resembles Windows Live default blue skin. It looks good to me so I download and start changing the looks for my blog. I don't know if I have messed up, but I like it and so my blog is up with a new Windows Live theme. There are few other customizations that I have done with the theme that works for my blog like after every post you see a Google Ads (let me know if they are annoying, which I feel they are not), logos of the sites having a reference of my blog and some other internal stuff (simple HTML and server-side work). This is the case with me, for you there are no hiccups, just copy and paste the Windows Live theme folder inside Themes folder and you are done.

This theme is based on the standard theme template for BlogEngine. If you have any suggestions to make the theme look more beautiful in some way or the other (as I am not a designer) please do share with me and all of us in the community.

Download: (70.33 kb)

UPDATE: There is a slight change in the style.css file. The image above is broken when a blog is viewed in a large display.

it is now been fixed. Please download the latest style sheet from the link below. 

style.css (13.91 kb)

 No Rating

URL rewriting in Blog Engine.NET

5. June 2010 14:47


I was just looking for a way to get short URL’s for my blog, I used some extensions, some URLrewriter.NET but still not able to get this work. So I drop an e-mail to Scott Hanselman and was waiting for his response. If you look at Scott’s blog you will see that he has very simple URL for his blog posts which eventually get his posts higher ranks on search engine indexing. What I have found so far is that if you have a simple URL the search engine will crawl that page during indexing and your page is on the top of the search results or if it is not on the top then it must be at least on the first page. Remember search engine crawlers will avoid crawling pages that do not have a simple URL, like if your page has a query string it won’t be get crawled by the search engine crawler.

The URLRewriter module in BlogEngine didn’t seems to be working for Posts. I want to have simple SEO friendly URLs like and not But there is no way to do this until I hook into BlogEngine.Core.dll.

Open the whole solution in Visual Studio and open Post.cs file and navigate to the RelativeLink property in Post.cs file and change with the below code:

public string RelativeLink
		string slug = Utils.RemoveIllegalCharacters(Slug) + BlogSettings.Instance.FileExtension;
		if (BlogSettings.Instance.TimeStampPostLinks)
			return Utils.RelativeWebRoot + "post/" + slug;
		return Utils.RelativeWebRoot + "post/" + slug;

Recompile your DLL and place in bin directory in your blogengine root folder. Now you will have short URLs which do not have any date stamp. Having short URLs for all your posts doesn’t affect the posts with old URLs that most of the people have bookmarked on their blogs or on social bookmarking sites. Hope this helps.

Currently rated 4.0 by 4 people

Akismet Extension For BlogEngine.NET

14. May 2010 20:26

API BlogEngine.NET 

Since I have started using BlogEngine.NET I never thought of using any other open source blog engine. To me BlogEngine is the most extensible blogging platform availableat present. As a popular blogging, engine blog engine users faces a lot of spam comments. I was so totally annoyed and even after moderating comments I have to manually go and delete the comments. After some search I found an extesion from  Joel Thoms ( Simple and easy to use, dont even require moderation.This extension passes the commnets to Akismet spam database which then checks approves or disapprove commnets.

To get it working you need an API Key which you can get for free at Once you get an API key extract the files in App_Code/Extensions folder and jump to your Extension section under Settings.

Once you save your settings you are done. NO MORE SPAM. Laughing

Download: (3.55 kb)

Currently rated 3.3 by 4 people

Windows Live Writer and BlogEngine.NET

30. March 2010 14:57

BlogEngine.NET Utils 

WinLiveWriter When I started blogging last year, I used to blog the old traditional way, using admin panel and then drafting my post and that too with minimal features that can be available for blogging. The I heard about Windows Live Writer and without thinking I switch over to Live Writer. Though my early experience with Live Writer was not good and some of my posts looked weird after I post them to my blog. May be I was not that too familiar with Live Writer at that time and I drop the idea of using Live Writer to blog….but now I am and much aware about the power of Live Writer.

I am writing this post with Live Writer and that too loaded with some excellent plug-ins which allow me to do what I need to.

If you are blogger and still using the same old admin panel to blog with seriously limited features then this tool is meant for you. I am late to use this tool for blogging, but you should not.

Download the offline installer of Windows Live Essentials which includes other Live services.

Currently rated 3.5 by 2 people