XML Reports

XML Reports


All reports available on the Summary Reports tab can also be generated in XML format. This is useful if you want to integrate information from Logaholic into other web-based applications.

To access a report in XML format, simply add xml=1 to the end of the URL query string for that report

For example, to get the XML version of the "Visitors per Day" report, a simple request could look like this:

http://domain.com/logaholic/reports.php?conf=profilename&labels=Visitors per Day&minimumDate=11/01/2010&maximumDate=11/03/2010&xml=1

Variables you'll need to replace in the example above are printed in red. When requesting URL's like this through javascript or other programming languages, you should url encode the query string first.

There are many more variables you can add to change the content that is returned, but the easiest way to do this is to simply request the report you want from the Logaholic user interface, then copy the url adding "&xml=1" to the end.

For example, the data in the XML file exported from the "Visitors Per Day" report looks something like this:

<?xml version="1.0" encoding="UTF-8"?>
<dataset id="Visitors per Day" >
	<entry date='01-Nov-2010 Mon' visitors='397' pageviews='1931' pages_per_user='4.8640' />
	<entry date='02-Nov-2010 Tue' visitors='387' pageviews='1769' pages_per_user='4.5711' />
	<entry date='03-Nov-2010 Wed' visitors='390' pageviews='1679' pages_per_user='4.3051' />
</dataset>