Generating XML Reports

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

Version 2.x
To access a report in XML format, simply add xml=1 to the end of the URL query string for that report.
Version 3.x +
To access a report in XML format, simply add xml 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:

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

Version 3.x
http://domain.com/logaholic/reports.php?conf=profilename&minimumDate=03 Dec 2012&maximumDate=04 Dec2012&displaymode=table&trafficsource=0&labels=_VISITORS_PER_DAY
&showColumn0=on&showColumn1=on&showColumn2=on&showColumn3=on&nocache=1&outputmode=xml

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 recreate the url is:

Version 2.x request the report you want from the Logaholic user interface, then copy the url adding “&xml=1” to the end.

Version 3.x request the report you want from the Logaholic user interface, run the report, click the print icon in top right corner of the displayed report, the print page shows you the url, at the end of the url replace print for xml.

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


	
	
	

Note that when you request above mentioned url’s in your browser browser the page appears blank, select view source in the blank page and the xml output should be displayed.

When you have password protected Logaholic login and password should also be submitted through the url.