Forums

Exporting pageview data

Is it possible to export pageview data for your site? I have some ideas about using the data as part of my site's navigation, and it seems like something that would just be useful in general.

I think the easiest way to do this would be to just write a couple of lines in your Django/Flask app to dump the data to a sqlite database.

do you mean the page view charts that you see on the webapps tab? what sort of frequency/granularity would you want it? we are considering doing something like sending a csv or something every month with such pageview data.

yup. yet another possibility would be to process the log file that you get.

Yes, I mean the data used for the webapps tab chart. Daily granularity is fine (at least, for my purposes). I was thinking of using the data for a fancy blog navigation tool (overlay blog post "points" on the viewership curve---seems appropriate for a data hacks -themed blog).

Creating a database in code, while helpful, seems kind of redundant. Why reinvent the wheel? That data is already available elsewhere, it just needs to be extractable.

Also, I'd like to have my entire site history, which I wouldn't be able to get retroactively.

How similar are the log files to the standard Apache logs?

I ask this because there is an Apache log parser already in existence: se https://pypi.python.org/pypi/apachelog/1.0

The log files we generate are basically the same as the normal Apache ones, so existing tools should parse them.

We're also planning to roll out an API at some point -- probably just an endpoint to reload a web app initially, but I'll make a note that exposing the hit logs would be a useful thing to add in the future.