Narcistat Home API Reference Visualizations

Real time web traffic reporting

Narcistat provides a simple API to track web usage in real time, and easily generate reports and statistics from that data. It is a useful companion to logfile analysis packages like Webalizer, AWStats or Google Analytics.

Pretty visualizations and graphs are on the way. In the meantime, here is some basic information so that you can try it out and consume the data on your own.

Example 1. Simple Data Collection

The code below will collect usage data for any page that you place it on: <img src="http://api.narcistat.com/ping/" style="display:none"/>

Example 2. Polite Data Collection

The code below will also collect usage data for any page that you place it on. In addition, it will generate a link back to narcistat.com and help spread the word about us. Make sure it's the very last thing on the page: <a href="http://www.narcistat.com/" title="real time web traffic reporting by narcistat" style="position:absolute;left:100%;margin:0px -24px;border:0px;"> <img src="http://api.narcistat.com/ping/?out=image" border="0"/></a>

Example 3. Simple Data Retrieval

Narcistat works with a simple REST interface, and can produce output in XML, JSON, CSV, or human viewable HTML. Urls are in the following format: NOTE: Data collection will begin at the time of the first retrieval request for a given host. This means that if you're planning to watch users interacting with your site, you'll need to call the API more than once. Polling intervals of about 30 seconds work well.