I am pulling data programmatically from google analytics. This is the query I execute
def executeDataQuery(analytics: Analytics, profileId: String) : GaData = {
analytics.data().ga().get("ga:" + profileId,
"2012-01-01", // Start date.
"2012-01-14", // End date.
"ga:visits") // Metrics.
.setDimensions("ga:date")
.setSort("ga:date")
.setMaxResults(25)
.execute()
}
This gives visits/day. I assume the default granularity is per day.
How can I change the granularity of the data from visits/day to visits/minute or visits/month? I know this can be done on the google analytics website.