FeedBurner's popular chicklet FeedCount is the most-used way to display the number of subscribers for a feed.
Also, a similar design is used by TwitterCounter to display your Twitter followers.
We'll be creating a dynamic FeedCount-like interface that can display your website's statistics like pageviews, visits, etc. (one or all of them) using PHP.
At the end of this tutorial, we'll have 2 different counters:
a counter that can display only one metric – basic version
a counter that can display multiple metrics (some jQuery fun here) – advanced version
For a website, gaining RSS subscribers requires hard work as visitors prefer to subscribe websites with fresh/quality content & expect this to be continious.
On the other hand, RSS subscribers are very valuable loyal readers which follow the website regularly.
So, for a website, it is very important to analyze "how visitors become RSS readers" like:
from which websites do they reach to yours
which page of yours is the one that gains you most subscribers, etc.
Google Analytics, besides all the simplicity it offers, has a very functional event tracking method for analyzing custom events which we will be using to track new RSS subscriptions and see how to analyzing them deeper.
Part 1 – Applying Event Tracking Code
There are currently 2 different versions of Google Analytics tracking code used:
The standard tracking (gaJsHost)
Asynchronous tracking – beta (_gaq)
The asynchronous tracking code has a major advantage over the standard version's event tracking which is: it will be able to track the clicks even if tha page is not fully loaded.
Google Analytics has recently announced a new asynchronous tracking code that can "optionally" be replaced with the old one.
The new code does not block the website while it loads which will improve the loading times.
It also aims to provide more accurate results as it can be installed inside <head></head> tags (rather than before the </body> tag) and will be able to collect data from visitors that quit the webpage before it loads fully. This way, "any possible tracking errors from dependencies when the JavaScript not being fully loaded" are also eliminated.
Google Analytics or other web statistic services can give you the detailed analysis of the visitors. That’s good. But what about a video of the every move a visitor makes on your website?
RobotReplay is a free service with a different website analysis approach.