How does Slimstat collects all the information about my visitors?
This is how Slimstat collects its data about visitors and pageviews:
When a page is dynamically generated by WordPress, an event (a “hook” in WordPress terminology) invokes the tracker [1]
The tracker analyzes the request, and captures all the information received from the web server (IP address, URL of the resource, cookies, etc)
Based on the options configured by the administrator, Slimstat makes the appropriate decisions on how to treat/manipulate this information
If this request doesn’t match any of the filters in the various blacklists available, Slimstat stores the manipulated information in wp_slim_stats
Server and Client Mode
In “Server Mode”, Slimstat executes the steps here above before the page is sent to the visitor; while in “Client Mode”, a Javascript file is added to the page source code, and this will trigger the steps above AFTER the page has been loaded by the browser (similarly to what Google Analytics does). There are pros and cons in both approaches, and we decided to let the user decide which one works best for their specific case/needs.
The report engine retrieves the information from the database and, executing a predetermined list of SQL queries, calculates all the metrics that compose all the reports visualized in the admin. The report engine is also responsible for parsing all the filters (browser equals Firefox, Permalink contains /articles/, etc) and converting them to SQL code to be used during the requests. [1] http://codex.wordpress.org/Plugin_API/Action_Reference