Hi,
how can I get Stats of adGroup with respect of Device, Search and Display network and ClickType using get service of AdGroupService. I can get through AdHoc reports but I want to get through get service.
My code follows like this:
Long adrpId = Long.parseLong("XXXXX");
Selector selector = new Selector();
String startDate ="20120701";
String endDate = "20120701";
selector.setDateRange(new DateRange(startDate, endDate));
selector.setFields(new String[] {
"AdGroupName","CampaignId","AdGroupId","Status", "AdNetworkType1","AdNetworkType2","Device", "ClickType",
"Impressions", "Clicks", "Cost", "Conversions","AveragePosition","ConversionsManyPerClick"
});
Predicate adgrpIdPredicate = new Predicate("Id", PredicateOperator.IN, new String[] {adrpId.toString()});
selector.setPredicates(new Predicate[] {adgrpIdPredicate});
// Get all ad groups.
AdGroupPage page = adGroupService.get(selector);
// Display ad groups.
if (page.getEntries() != null) {
for (AdGroup adGroup : page.getEntries()) {
////////// here I need to display each adgroup clicks, impressions of network and device wise
}
}
Thnx in adv.