I have generated a specific report in Google Analytics site.
http://www.google.com/analytics
This report makes reference to the most visited content of the site, you can do this by accessing the following section:
Reporting > Behavior > Site Content > All pages
And setting up the metrics to Pageviews
However I've got problems by generating this report through the API. How can I get the same results by making a call to the Google Analytics-API?
In Java should be something like this:
private static GaData getResults(Analytics analytics, String profileId) throws IOException {
// Query the Core Reporting API for the number of page views
// in the past seven days.
return analytics.data().ga()
.get("ga:" + profileId, "7daysAgo", "today", "ga:pageviews")
.execute();
}
But I don't know how to define the desired behavior stated above, any ideas?