I need get all campaign details order by impression .

My Sample code :- 

$oAuth2Credential = (new OAuth2TokenBuilder())->fromFile()->build();
$session = (new 
AdWordsSessionBuilder())->fromFile()->withOAuth2Credential($oAuth2Credential)->build();
$adWordsServices =  new AdWordsServices();
$campaignService = $adWordsServices->get($session, CampaignService::class);
$selector = new Selector();
$selector->setFields(['CampaignName','CampaignStatus','Amount','Impressions']);
$selector->setOrdering([new OrderBy('Impressions','ASCENDING')]);
$selector->setPaging(new Paging(0,2));
$page = $campaignService->get($selector);

I got Below Error :- 

Google\AdsApi\AdWords\v201802\cm\SelectorError Object
(
    [reason:protected] => INVALID_FIELD_NAME
    [fieldPath:protected] => serviceSelector
    [fieldPathElements:protected] => Array
        (
            [0] => Google\AdsApi\AdWords\v201802\cm\FieldPathElement Object
                (
                    [field:protected] => serviceSelector
                    [index:protected] => 
                )

        )

    [trigger:protected] => Amount
    [errorString:protected] => SelectorError.INVALID_FIELD_NAME
    [ApiErrorType:protected] => SelectorError
    [parameterMap:Google\AdsApi\AdWords\v201802\cm\ApiError:private] => 
Array
        (
            [ApiError.Type] => ApiErrorType
        )

)

So , I think CampaignService class does not support to get campaign 
impression,clicks details . May I know , which class I have to use to get 
campaign impression,click and other details . Please  help me . 

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
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 and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/fac8c752-c5bc-4522-9a30-b0d441539fb2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • ... Soniya kaliappan
    • ... 'Peter Oliquino (AdWords API Team)' via AdWords API and Google Ads API Forum

Reply via email to