Hi Eric,
thanks for the answer.
So every time i want to use field-names in a selection i have to use the
String from the type-Column which i can find in the docs (e.g.
http://code.google.com/intl/de-DE/apis/adwords/docs/reference/latest/AdGroupCriterionService.Keyword.html)
?
Best Regards
Andreas
Am Donnerstag, 15. März 2012 14:20:32 UTC+1 schrieb Eric Koleda:
>
> Hi,
>
> This is a known issue related to using incorrect field names. Instead of
> "Text" and "MatchType" you should be using "KeywordText" and
> "KeywordMatchType". This will eliminate the duplicates.
>
> Best,
> - Eric Koleda, AdWords API Team
>
> On Tuesday, March 13, 2012 6:58:56 AM UTC-4, scrat wrote:
>>
>> When i use adGroupCriteriaService() i get a list of Keywords where each
>> Keywords has 3 copys.
>>
>> Here's the Code:
>> $selector = new Selector();
>> $selector->fields =
>> array('Id','AdGroupId','DestinationUrl','Status','MaxCpc','Text','MatchType');
>> $selector->predicates[] = new Predicate('AdGroupId',
>> 'EQUALS', (float)$paramsAG['adwords_adgroupid']);
>> $selector->predicates[] = new Predicate('CriteriaType',
>> 'IN', array('KEYWORD'));
>>
>> $page = $this->adGroupCriteriaService->get($selector);
>>
>> So normaly the $page->entries retrieves an Arra with unique entries
>> [1,2,3,...]
>>
>> But when i run the code the Array looks like this [1,1,1,2,2,2,3,3,3,...]
>>
>> I'm using API v201109.
>>
>> A Workaround to avoid this unwanted behavior is to make the array unique:
>> $allKeywords = array();
>> foreach($page->entries AS $k) {
>> $allKeywords[$k->criterion->id] = $k;
>> }
>>
>> Any suggestions?
>>
>> Best Regards
>>
>>
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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