Server-side web tracking

Just uploaded WWW-Tracking Perl distribution to the CPAN:


Server-side web hits tracking, generic and flexible enough so that many tracking services like Google Analytics, Piwik, local file, etc. can be used depending on configuration.


Universal enough to process many sources (headers, logs, tracking URL-s, ...) and covert or relay them to different other destinations (GA, Piwik, ...) making use of the fact that the tracking data information is the same or nearly the same for all the sources and destinations.


Initially tracking data needs to be gathered. Look at WWW::Tracking::Data for the complete list. Most of these data can be found in headers of the http request. Then these data can be serialized and passed on to one of the tracking services.

Bare WWW::Tracking::Data offers just as_hash and from_hash, the rest can be done by one or more plugins, like for example parsing the http headers with WWW::Tracking::Data::Plugin::Headers and passing it to WWW::Tracking::Data::Plugin::GoogleAnalytics.

Use cases:

  • tracking browsers that doesn't support JavaScript (ex. mobile browsing)

  • store the tracking data in local logs or files and replay it later to Piwik or Google Analytics

  • track web browsing simultaneous to more tracking services (compare the results, choose the one that fits)

aid with transition from one tracking service to another