Hi Soniya,

Metrics such as Impressions 
<https://developers.google.com/adwords/api/docs/appendix/reports/all-reports#impressions>
 are 
only available through the reports and not through the AdWords API 
services. In your scenario, you can use the Campaign Performance Report 
<https://developers.google.com/adwords/api/docs/appendix/reports/campaign-performance-report>
 to 
get your campaign-level Impressions 
<https://developers.google.com/adwords/api/docs/appendix/reports/campaign-performance-report#impressions>.
 
However, you may take note that ordering is not supported in the AdWords 
API's reports, for more information, you may refer here 
<https://developers.google.com/adwords/api/docs/guides/awql#using_awql_with_reports>
.

You may need to implement such a feature on your end after you have 
downloaded the report.

Thanks and regards,
Peter
AdWords API Team

On Thursday, July 26, 2018 at 3:21:05 PM UTC+8, Soniya kaliappan wrote:
>
> 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 [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 and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
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/d0dc70b4-d649-4a85-8a65-be6984341b11%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