I'm experiencing something quite strange with the AdgroupCriterion service.
If I try to retrieve all the keywords from an adgroup and I include the
MatchType in the selector fields I get all the keywords triplicated with
the same match type. If I remove that field from the selector the result is
ok (however I receive the match type anyway although I didn't ask for it!).
Is this a bug in the api?
This is the code I used for testing. In bold is the only thing I removed to
change the response from:
Selector selector = new Selector();
selector.setFields(new String[]{"Id", "AdGroupId", * "MatchType",*
"KeywordText", "Status"});
selector.setPredicates(new Predicate[]{
new Predicate("AdGroupId", PredicateOperator.EQUALS, new
String[]{"11563952819"}),
new Predicate("CriteriaType", PredicateOperator.EQUALS, new
String[]{"KEYWORD"})
});
AdWordsServices adWordsServices = new AdWordsServices();
AdGroupCriterionServiceInterface adGroupCriterionService =
adWordsServices.get(session,
AdGroupCriterionServiceInterface.class);
AdGroupCriterionPage page = adGroupCriterionService.get(selector);
for (AdGroupCriterion adGroupCriterionResult : page.getEntries()) {
BiddableAdGroupCriterion biddableAdGroupCriterion =
(BiddableAdGroupCriterion) adGroupCriterionResult;
Keyword keyword = (Keyword) biddableAdGroupCriterion.getCriterion();
System.out.println(keyword.getText() + " " +
keyword.getMatchType());
}
First result (wrong)
Entre Marte Y La Luna Merlo EXACT
Entre Marte Y La Luna Merlo EXACT
Entre Marte Y La Luna Merlo EXACT
Entre Marte Y La Luna EXACT
Entre Marte Y La Luna EXACT
Entre Marte Y La Luna EXACT
Second result (quite ok, but with the match type y didn't asked)
Entre Marte Y La Luna Merlo EXACT
Entre Marte Y La Luna EXACT
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/7e71db5d-0949-4539-bc61-9571fd469c70%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.