FeedBurner Site Statistics for CommunityServer

Today Nick Bradbury wrote:

The statistics packages offered by most popular blogging services are either limited or non-existent, leaving many bloggers struggling to get good information on traffic to their blog.  Those of us who use FeedBurner have long had good feed-related statistics, but we've had to rely on other services to get information on blog traffic.

In my case, I've been using Google Analytics for blog stats, and while it's a good service I've found it awkward to have my feed stats and blog stats in different places.  So when I was offered an early look at FeedBurner's site statistics service (announced earlier today), I jumped at the chance.

I've been using FeedBurner's site stats for several days now, and overall they've done a great job of providing a lot of information in a very friendly way.  Now in addition to seeing information about my feed subscribers, I can also see things like:

  • Which searches lead people to my blog
  • Which external links are bringing visitors to my blog
  • Which pages are being viewed the most
  • What browsers, operating systems and screen resolutions my visitors are using

In other words, I can see the sort of information you'd expect from a site statistics service, except that it's integrated with my feed stats.

I share the same history, been using Google Analytics and FeedBurner's Feed Stats for several month. Though Analytics is a nice service, it's mainly targeted at marketing. Too much for me simple guy, how only wants to know if the number of his readers becomes two-digit.

However, as Nick said FeedBurner announced their site statistic service, based on the acquired Blogbeat. I set it up for my blog two hours ago, and I already like it. Though not as sophisticated as Google Analytics, its interface is much cleaner and more appropriate for my simple needs.

But how do I come into play? Well, I was promoted a CommunityServer MVP more than two month ago, and since then I never gave back anything to the community.

Till now.

In the simplest case you only have to insert one line of HTML code to the page displaying your blog posts. However, since FeedBurner Site Stats can track your entire site, I developed a more generic implementation for CommunityServer:

  • You only have to change one file (at least one per blog theme)
  • It distinguishes blog posts from other pages automatically
  • It disables tracking if you are an owner of a particular blog
  • last but not least enable site stats only if the blog uses FeedBurner Feed stats, i.e. FeedBurner is configured as the External Feed URL

Anyway, here are the instructions. For each theme you have to make following changes in LayoutTemplate.ascx:

Add these two lines right after the <%@ Register directives at the top:

<%@ Import Namespace="CommunityServer.Components" %>
<%@ Import Namespace="CommunityServer.Blogs.Components" %>

Add following block right before the closing </body> tag:

<% CSContext context = CSContext.Current; %>
<% Weblog currentBlog = Weblogs.GetWeblog(context.ApplicationKey); %>
<% if (!Globals.IsNullorEmpty(currentBlog.ExternalFeedUrl) && currentBlog.ExternalFeedUrl.StartsWith("http://feeds.feedburner.com/")) { %>
<% if (!context.IsAuthenticated || !Permissions.ValidatePermissions(currentBlog, Permission.Post, context.User)) { %>
<%     string feedBurnerAccount = currentBlog.ExternalFeedUrl.Substring("http://feeds.feedburner.com/".Length); %>
<%     BlogThreadQuery query = new BlogThreadQuery(); %>
<%     query.PostID = context.PostID; %>
<%     if (context.PostName != null) { %>
<%     query.PostName = context.PostName; %>
<%     } %>
<%     query.IncludeCategories = false; %>
<%     query.ReturnFullThread = false; %>
<%     query.SectionID = currentBlog.SectionID; %>
<%     PostSet postSet = WeblogPosts.GetPosts(query, true); %>
<%     WeblogPost blogPost = postSet.ThreadStarter as WeblogPost; %>
<%     if (blogPost != null) { %>
<script src="http://feeds.feedburner.com/~s/<%= feedBurnerAccount %>?i=<%= Globals.FullPath(BlogUrls.Instance().Post(blogPost)) %>" type="text/javascript" charset="utf-8"></script>
<%     } else { %>
<script src="http://feeds.feedburner.com/~s/<%= feedBurnerAccount %>" type="text/javascript" charset="utf-8"></script>
<%     } %>
<%   } %>
<% } %>

That's all.

Back from Mexico

Vacation, Mexico Comments

Faster than expected, my trip to Mexico is over. The fourteen days passed in an instant. I selected Mexico as my destination, since I wanted to escape the cold December in Europe. Indeed the first few days were predominantly hot and sunny, but in the second week the rain outweighed. They said that this is not the usual whether in Mexico in December, but that did not help much.

Nevertheless I enjoyed my stay a lot. I undertook several Trips to Maya places (e.g. Chichen Itza, and I snorkeled at the reef (BTW the second largest reef worldwide after the Great Barrier Reef) and in cenotes. I got to know lots of people, mainly Italians and Americans. Amazing how many Americans go to Mexico for marrying.

Now I'm back in Germany for three days, and finally the jet lag is gone. The inbox is cleaned, and now I going to check what happened in the CommunityServer community while I was away.

Gosh, I think I need some vacation already.

Vacation Enforcement

Vacation Comments

Because of a mayor release in our company and the obligatory deadline pressure, I have a backlog of 30.5 free days, i.e. there's even half a day left from 2005. Because our boss decreed that we can transfer only a maximum of 10 free days to the next year, this means that I have to take more than 4 weeks off until the end of this year.

Therefore I'm taking a three week vacation starting today. Because I desperately need some relaxation, I'll fly to Mexico on Sunday. Yes, only two days until take-off. [:)]

Because the trip takes only two weeks, maybe in my third vacation week I have some time to post all the stuff that's already waiting in my queue for month. But I'm afraid that I'll need several days to read all new posts  from the blogs I'm subscribed to (FeedDemon already reports me today that there are thousands(!) of unread posts waiting for me.)

Anyway, I'm taking my EOS 350D (labeled Rebel XT in the US) to Mexico, and I borrowed a 70-300mm telephoto lens from a colleague. I hope I can take some nice pictures and post them here. See you in two weeks [:)]