I'm looking for an easy way to query GA programmatically in order to display the most popular pages on my site.

GA has a Data Export API, but it seems kind of complex to work with for what I want to do. Is there a simpler way or am I stuck with the Data Export API?

2 Answers 2


The Data Export API really is the simplest way to get the data from Google Analytics although you have more options - and more comprehensive data, given that Google Analytics does not track spiders or users with Javascript disabled - if you parse your own server logs.

The Data Export API Protocol page includes instructions which you can test on the command line with cURL (as well as links to Javascript, Java, and Python interface libraries) and it appears as though there is also a PHP interface library at Google Code.


Check out embeddedanalytics. You could define a report of your most popular pages and then embed the chart into your website.

We are also working on a "Top Content" widget which will have clickable links for your most popular pages.

(disclosure: this is a site I have developed)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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