Google Analytics version 4 API java maximum results -
in google analytics api version 3 java there setmaxresults method:
private static gadata executedataquery(analytics analytics, string profileid) throws ioexception { return analytics.data().ga().get("ga:" + profileid, // table id. ga: + profile id. "2012-01-01", // start date. "2012-01-14", // end date. "ga:visits") // metrics. .setdimensions("ga:source,ga:keyword") .setsort("-ga:visits,ga:source") .setfilters("ga:medium==organic") .setmaxresults(25) .execute();
}
how can maxresults using google analytics api version 4? had brief scan through javadocs here , cannot find method this.
i found answer question: request.setpagesize(6)
gives max result needed.
Comments
Post a Comment