Local Analytics v1.2

Sorry for being a little late. As promised, I am releasing the latest version of Local Analytics today. Thanks to Carl and DG, this version is compatible with the latest update to code update to Google Analytics. This version also includes Adsense and YPN ad click tracking. The ad click tracker is based on the Free AdSense Tracker by Aaron Wall.

BTW, I have obtained access to the WP-Plugins.org SubVersion repository for Local Analytics. From now on, you can download the current version and the previous versions of the plugin from the WP Plugin Repository.

I have also fixed a mistake in the version number pattern. The last version was renamed to v1.1.3 from v1.13 to prevent conflicts in future.

Change Log

  • Included compatibility with latest Google Analytics Code Update
  • Added support for Adsense and YPN ad click tracking
  • Changed the version number pattern

Local Analytics Update

Sorry, this is not a post announcing the release of the latest version of Local Analytics. I wanted to update the plugin to the latest ga.js from urchin.js yesterday. Unfortunately, I couldn’t turn on my computer yesterday due to power failure. I have my first exam tomorrow and I’ll try to release the updated version after that.

Thanks to Carl and DG for notifying me about the update to Google Analytics.

My list of recommended WordPress Plugins – Part IV

It has been more than one month since my last post on the series “My List of recommended WordPress Plugins”. Once again I am back with 5 new plugins.

  • You may call this shameless self promotion. But I am starting this list with my own plugin – Local Analytics  🙂 . Local Analytics is a plugin for integrating Google Analytics into your WordPress powered blog. The main advantage of the plugin is its ability to locally cache urchin.js file, to speed up your page loading. You are also able to track downloads and external clicks with this highly configurable plugin.
  • The second plugin I am dealing with today is Defensio. You maybe already familiar with Defensio, as the recent public launch of the plugin created a lot of interest in the Blogosphere. I am happy to say that I was one of the beta testers of Defensio Anti spam plugin for WordPress. I liked the interface of the plugin much more than Akismet. As far as the spam detection is concerned, I think Defensio is a little too strict compared with Akismet. Fortunately, Defensio is said to have the ability to adapt to the site on which it is installed.
  • After posting a comment, many times I wanted to add some more information to the comment. Usually I post a second post below the first with the additional information. Fortunately, I found a plugin that allows commentators to edit their comment for a specified period of time, after it was posted. Administrators are able to edit comments directly from the post page. This cool plugin is called WP AJAX Edit Comments. Unfortunately, the plugin is showing some errors on my blog. I checked the plugin homepage and found out that it is caused by the threaded comments plugin.
  • In my Local Analytics plugin’s page, several users asked about the possibilty of integrating Google Analytics reports within the Word Press Admin Panel. WP-Reports is an awesome plugin by Joe Tan, that allows you to integrate your Google Analytics Reports and FeedBurner subscriber stats within your Administration Panel.
  • Last but not the least, I would like to recommend the Related Posts plugin from FairyFish. The plugin will display a list of related posts under all your posts. Unlike other similar plugins, this plugin can display a list of random or popular posts, if not related posts were found.

Please checkout these cool plugins and let me know your comments about the list. You may also be interested in the previous posts in the series

Local Analytics – Errors & Suggestions

First of all, let me thank everyone, especially Joe, Kevin and David,  for their active participation and support in reporting the errors in Local Analytics. According to my Google Analytics stats, the plugin was downloaded over 200 times so far. A few errors were reported and fixed. Now the only unfixed problem is the corrupted zip file. I think it is caused by the some problem with my system, because it is showing some other troubles too. I will format my system and recreate the files in a few days.

I request you to report any difficulty or error you are having with the plugin. If no errors are reported during the next two days, then I will declare the current version stable and start working on the next version.

I also request you to suggest any improvements and changes you wish to include in the next version. Alex and David have made a very good suggestion, which I will try to incorporate in the new version. Though I don’t promise this, if I have time I will try to integrate the Analytics Reports also within the Administration Panel, as Jared and ekowanz asked.

Speed up page loading & save bandwidth by reducing page size

Yesterday, while fixing some browser compatibility issues of my new theme, I was surprised to know that my homepage was over 400 KB in size and took more than 30 seconds to completely load with my DSL connection. More than 80 files, including images, javascript and css, were embedded within the page.

I decided to optimize the page and found that the following actions can be taken to decrease the load time.

  • Reduce the number of requests
    First of all, I opened up my theme’s stylesheet and found several unused classes with image backgrounds and bullets. I removed those classes and removed all references to non-existant files.
  • Reduce the total download size
    I tried removing unwanted markup and html comments left by my theme and plugins. But that did not create much difference in size. Next I converted some of the images from PNG to JPEG format. This reduced the total size by over 30 KB. But most of the page size was due to the embedded Javascript and CSS files. For example, the prototype javascript library is over 90 KB in size, which on compression get reduced to 22KB. Hence I used Apache Module mod_deflate to compress my files dynamically for gzip enabled browsers. I used the following code in my .htaccess file to compress files of the following mime types  – text/css,  text/html,  text/plain,  text/xml and application/x-javascript. For this to work on your server, you should have mod_deflate enabled. Most webhosts have this enabled. If not, you may also try  PHP mod_gzip or ZLib compression.

    # Insert filter
    SetOutputFilter DEFLATE
    AddOutputFilterByType DEFLATE text/css text/html text/plain text/xml application/x-javascript
    # Netscape 4.x has some problems...
    BrowserMatch ^Mozilla/4 gzip-only-text/html
    # Netscape 4.06-4.08 have some more problems
    BrowserMatch ^Mozilla/4\.0[678] no-gzip
    # MSIE masquerades as Netscape, but it is fine
    # BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
    # NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48
    # the above regex won't work. You can use the following
    # workaround to get the desired effect:
    BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
    # Make sure proxies don't deliver the wrong content
    Header append Vary User-Agent env=!dont-vary
  • Cache files client side
    Almost all browsers have the ability to cache files on your computer for faster loading. If we set the expiry time of the file, the browser will check for updated content only after the specified time. We can use the Apache module mod_expires for this purpose. The following code will request the browser to cache all files for three hours. This can make the browser download the file only once during a session, but will update the content on next visit. You may also use the ExpiresByType directive to set different time for images, javascript and css files.

    # Cache all files for the next 3 hours
    ExpiresActive On
    ExpiresDefault "access plus 3 hours"


The final result was great. The homepage size got reduced to 159 KB, which was less than half of the original size. The page load time also reduced to 19.3 seconds from about 32 seconds.

The load time and page size were calculated using the Web Page Speed Report tool from www.websiteoptimization.com.

Make sure you backup your current .htaccess file before trying the above code. So that you can revert back if something goes wrong.

Local Analytics v1.1 Released

Today Kevin reported an error with Local Analytics. The plugin was spitting a warning on accessing a page from a RSS feed. Though I wasn’t able to exactly replicate the error, this version should fix that error. Also I have added some more changes to the plugin, especially in the admin section.

As before, you can download the latest version of the plugin from the Local Analytics page.

Change Log

  • Fixed the error pointed out by Kevin
  • Removed the onclick events from RSS feed
  • Dropped domain name from tracked downloads
  • Edited admin panel to display configuration errors.

Local Analytics – My first WordPress plugin

Today I am releasing my first WordPress plugin – Local Analytics. Though this is not the first plugin I have started working on, this is the first one to be released. The first plugin I started working on was WapPress – a plugin to make your blog Mobile Friendly.

Local Analytics is based on a program I wrote a few days back on how to speed up Google Analytics by locally hosting urchin.js and automatically updating it. The wonderful idea of creating a Word press plugin with it was suggested by Carl mercier. Carl is the author of the anti spam plugin, Defensio, which is still in beta stage. I have been been beta testing the plugin for the past few days and found it much easier to use, compared to Akismet.

Local Analytics is simple to use for a normal user and highly configurable for advanced users. Normal users only need to enter their Analytics Account ID, wheras advanced users can control the complete behavior of the plugin.

Please try the plugin and let me know your valuable comments and suggestions.

Thank you Mr. Cow

I have a happy news to share today. You might be remembering my third post last month on “How to win and spend $500” over at JohnCowdotCom.  I was talking over the phone today when my mail client reported a new mail. It was a report from my blog reporting a new pingback from JohnCowdotCom with the title “Announcing 8 (!) Winners“. I checked the post and I became dumbstruck for a few minutes and couldn’t believe that I have actually won the $500.

There are some changes on how I am going to spend the money (I hope Bob wouldn’t mind it 😉 ). I have already given the order for my new MacBook. Also I have decided not to change my web host, but go for the next higher plan with my current host.

BTW, there is another good news for all the WordPress users. I am developing a new plugin for making your WordPress blogs mobile friendly. I know there are some other similar plugins available, but I am trying to make the plugin a lot more customizable and search engine friendly. I am presently having some problem with URL rewriting. Once I sort it out, the plugin will be released without much delay.

A final thanks to JohnCow and Micfo for the great prize.

My list of recommended WordPress Plugins – Part III

This is the third post on the series, “My List of recommended WordPress Plugins”. In this post I wish to introduce the the four plugins that won the WordPress Plugin Competition hosted by Weblog Tools.

  • The Grand Prize was won by the OneClick plugin by Anirudh Sanjeev. OneClick is a WordPress Plugin+Firefox Extension combo which allows you to install WordPress themes and plugins with one click. You can install plugins and themes directly from your browser by selecting the appropriate option from the right click context menu of Firefox.  You can also install plugins and themes from your Admin Interface by directly uploading the plugin package or by providing the url of the plugin. PlugInstaller(which I have already introduced) by Henning Schaefer also allows you do the same for plugins, but not for themes. Personally, I likePlugInstaller over OneClick, because it integrates with your default plugin manager and allows you to Install, Activate, Deactivate and Uninstall plugins, wheras OneClick only allows you to Install and remove plugins. PlugInstaller can be installed on Windows and Unix servers, but PlugInstaller works only on Unix servers.
  • The second prize was won by the MyDashboard plugin by Barry. This is an excellent plugin that allows you to customize your WordPress Admin Dashboard with cool gadgets and feeds. The plugin is basically based on the idea of Personalized homepages provided by iGoogle, PageFlakes, Netvibes etc. It provides a number of standard gadgets that provides you all the data provided by your default wordpress dashboard. I strongly recommend this plugin.
  • Keith Dsouza won the third prize with his WordPress Automatic Upgrade plugin. I used this plugin to upgrade my blog from v2.2.1 to v2.2.3 and to the latest version (v2.3), yesterday. The plugin worked smooth and fast and saved me a lot of headaches. It creates a backup of your existing installation and database, and thus allow you to revert to the previous version, if something goes wrong. You can upgrade your blog to the latest version of wordpress, which will be automatically downloaded from the wordpress repository, in less than 5 minutes. I strongly recommend this plugin too.
  • The consolation prize was awarded to  Ozh, creator of Who Sees Ads. This is an Ad Management plugin that allows you to specify who sees ads on your site. The plugin is similar to the Shylock Adsense plugin (which I have posted earlier) in some respects, but is more advanced and provides better configurability. While Shylock Adsense allowed you to specify the pages and ad position directly from the plugin’s options page, in Who Sees Ads, you have to manually insert the generated code by editing the required template files. If you are comfortable with HTML and PHP, then Who Sees Ads will be a much better option, else stick on to Shylock Adsense.
  • Login LockDown by Michael VanDeMar is another plugin that I found interesting. This plugin was not a contestant at the WordPress Plugin Competition. Login LockDown is a security plugin for WordPress, that records the IP address and timestamp of every failed WordPress login attempt. If more than a certain number of attempts are detected within a short period of time from the same IP range, then the login function is disabled for all requests from that range.

If you have read my previous posts in this series, then you would have tried the SpotMilk admin theme by Ceprix. It is one of the wordpress addons that I like the most. The theme was updated recently to include wordpress v2.3 compatibility and few other changes. I recommend you to upgrade to the latest version. Also don’t forget to upgrade to the latest version of Admin Drop Down Menu too.

NB: Before you try any of these, please backup your WordPress database. If you are not sure how to do that, then it is better not to try these. Do it at your own risk.

My list of recommended WordPress Plugins – Part II

This is the second post on the series, “My List of recommended WordPress Plugins”. The previous post got a good amount of visits. I got busy with many things after that, hence this post got delayed.

  • Today, I begin the list with a plugin that allows you to monetize your website efficiently. The Shylock Adsense Plugin  allows you to insert ads on your blog without modifying the template. The main advantage of the plugin is that it allows us to specify when and where the ads will appear, directly from the Admin Control Panel. You can configure the plugin to show more ads in your older posts and no or little ads in the posts created in the last X days. Also there is facility to add ads to homepage, archives and category pages. In pages having multiple posts, it allows you to decide under which post the ads should appear. The name of the plugin is a misnomer, because you can show any ads (contextual / banner), not just Adsense. The plugin was created by Alex of Shylock Blogging for his personal use, but he was good enough to distribute it for free. He is testing a new version of the plugin, watch out for it.
  • Another plugin I recommend is the DoFollow plugin. If you have a high activity blog, then you may run into trouble with it. But for small blogs with less comments, it will help increase user activity (though I haven’t seen much difference except in the post announcing it  ). It allows you to remunerate your loyal readers who participate in the discussion on your blog. Once you start using the plugin, you are surely going to get a sudden surge in visitors. If you decide to use the plugin, then I recommend you to checkout the Bumpzee community “No Nofollow“. Andy Beard has posted a list of Do Follow plugins.
  • Another important plugin that I would like to introduce is the “Global Translator” from Nothing2Hide. I think most of the bloggers are not aware of the power of this plugin. I have been getting a good number of visits from other language search engines, especially the Italian, German and French versions of Google. I highly recommend this plugin.
  • Though loyal readers are the life-blood of a blog, search engines cannot be completely avoided. A good blog is surely going to get a good number of visitors from search engines, who may become your subscribers. There are many plugins that allows you to search engine optimize your blog. “All in One SEO Pack” is a plugin that includes the features of all the major SEO plugins. The plugin allows you to specify alternate title (other than the post title), meta keyword and meta description for your page. It allows you to insert ‘noindex’ attribute to category and archive pages, removing duplicate contents from your blog. This plugin is also highly recommended.
  • WordPress provides RSS feed of comments on a post, which readers can subscribe. But some people(including me) prefer to subscribe to a topic by email rather than by rss feed. “Subscribe to comments” is a Word press plugin that provides your readers to subscribe to comments on a post by email. Users can subscribe to the comments by selecting a checkbox while submitting a comment or by submitting their email address in a separate form without commenting.

This is not the full list. There is still more plugins that I use and I’ll continue with it later. And again, I hope you will try these excellent plugins. Also checkout the previous post in this series

NB: Before you try any of these, please backup your WordPress database. If you are not sure how to do that, then it is better not to try these. Do it at your own risk.