Drupal: The Problem with FeedBurner
Most of us bloggers use FeedBurner to track the behavior of our feed subscribers. However, we are often not able to track ALL of our feed subscribers, because only a portion of them actually click on our FeedBurner icon to subscribe — the rest subscribes via an RSS reader, which does not go through FeedBurner.
The way an RSS reader works is that it picks up whatever URL that is contained in our page’s
<link rel="alternate" ...> tag, and subscribes to it. This tag is automatically generated by WordPress, Drupal, or whatever CMS we’re using, so the URL it contains is the native feed of the site, not of FeedBurner. (Thanks to @pruet for bringing it to my attention.)
For Drupal, the way I fixed this is by removing the
<link rel="alternate" ...> tag altogether, so that to subscribe to my site, users will be forced to click on the FeedBurner icon only. There are obviously better ways, but I was lazy, so here’s my quick and dirty fix for Drupal 6.2:
- In my Drupal site, the native RSS feeds come from two modules: Blog and Taxonomy. Neither the core nor the two modules provide an administrator option for enabling/disabling these feeds. (Maybe I was stupid, so let me know if it actually exists.) So we have to hack the source code.
- The core function that has the job of generating feeds is the function
includes/common.inc. This function is called on by
blog_page_last()of the Blog module, and by
taxonomy_term_page()of the Taxonomy module.
- Being the lazy me, I went straight to the boss, the function
includes/common.inc, and comment out the following:
/* hack by mameou drupal_add_link(array('rel' => 'alternate', 'type' => 'application/rss+xml', 'title' => $title, 'href' => $url)); */
The native feeds disappeared from all pages of my Drupal site, which is what I want.
To make the RSS reader automatically pick up the feed from FeedBurner, add this between
</head> of page:
<link rel="alternate" type="application/rss+xml" title="Your Site's Title" href="Your Site's URL" />
That’s it! Let me know if you have got the proper way figured out.