Can I download the raw logs of my Google Analytics data? I want to do some processing on the data.


Well, you can't directly access GA's logs, but it's not difficult to regenerate a GA log (for your own GA account) with complete fidelity.

We know exactly what data are in these GA logs because Google has told us. Google has also explained how the data comprising the log is collected.

Here's the gist: All of the reports/data views in the GA web browser are created by parsing a transaction log which in turn is created one line at a time. The GA server collects every one of those lines in exactly the same way--by receipt of a long list of parameters appended to a client request for a single-pixel GIF. (This request is initiated by the ga.js which downloaded and executed by the client/browser.) That list of parameters is comprised of all GA data sources: the location bar ('http://wwww....'), the HTTP Request headers, data from the DOM, cookies set/updated on the client. The data from all of these sources are aggregated and packed into this parameter list and appended to the request for __utm.gif.

An example:


This is not difficult to parse--each parameter is a variable beginning with 'u', eg, 'utmn.' Each parameter in turn has a value. 'utmn' for instance is the GA Account ID; and 'utmcc' are the cookies. You can decode the various GIF Request paramaters by referring to the GIF Request Parameter lookup table provided by Google.

Sp to recreate GA's log for your GA account, you just need to capture each of these GIF Requests. It's not difficult to log all of this data to your Apache activity log:

First, add this line to the GA tracking code for each page on your Site:


This provokes a request for __utm.gif from your webserver as your page is loaded.

Then add this resource (__utm.gif) to your web server root so that you can serve it.


I don't think you can get the raw logs, but you can certainly access the data via an API, outside of your web browser:


  • Hmm, i think i might need raw logs, it looks like there is a query limit on the api. – Kyle Mar 11 '10 at 3:41
  • If you're receiving < 10,000 datapoints per day, I guess you could run a batch every hour or so to collect the latest data and write it into your own raw data file. I had an issue where I needed to do about 100,000 geocode requests via the Google API to fill a backlog in our database. I just set it to run 10,000 at a time and started it each time before I left work. 10 days later, backlog complete. – Mark Henderson Mar 11 '10 at 3:49

Simple answer: NO.

You can though get your server logs, you know ;)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.