MannyP
MannyP

Reputation: 21

Google Analytics V3 API: Java method to include dimension and metrics

I am trying to find right method in GA V3 analytics API to get dimension and metrics.

The current method:

return analytics.data().ga()
                .get(String, String, String,String)
                .execute();

Doesn't allow to set dimension as part of the query.

Upvotes: 0

Views: 461

Answers (1)

MannyP
MannyP

Reputation: 21

I found the format in another sample provided in GA documentation: return analytics.data().ga() .get(<String>,<String>,<String>,<String>,) .setDimensions(<String>) .setSort(<String>) .setFilters(<String>) .setMaxResults(<int>) .execute();

Upvotes: 2

Related Questions