How to get ClickType, Device Stats using get service of AdGroupService

102 views
Skip to first unread message

Sanju

unread,
Jul 20, 2012, 4:58:42 AM7/20/12
to adwor...@googlegroups.com
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.

road11

unread,
Jul 20, 2012, 8:41:10 AM7/20/12
to adwor...@googlegroups.com
Not sure it's possible using the AdGroupService. As I look through the API doces (https://developers.google.com/adwords/api/docs/reference/v201109_1/AdGroupService), I don't see any place where those data items are selectable. I haven't been working with this API for a long time, but what I've seen is if you want metrics that get down to a granular level like that, you pretty much have to use AdHocs. But I could be wrong (somebody correct me if I am).
 
Eric

Kevin Winter

unread,
Jul 24, 2012, 5:31:12 PM7/24/12
to adwor...@googlegroups.com
Hi,
  We strongly encourage you to use Reports where statistics are concerned.  Reports are faster, cost less units and impose less burden on our servers.  Additionally, you cannot perform segmentation with the existing SOAP services.

- Kevin Winter
AdWords API Team
Reply all
Reply to author
Forward
0 new messages