I'm using PHP library for AdWords API 
<https://github.com/googleads/googleads-php-lib> v201809 and trying to get 
max CPC for a campaign with target spend bidding scheme, but only 
biddingStrategyType 
is returned, although I didn't ask for that field.

The code:

$query = (new ServiceQueryBuilder())
   ->select(['BudgetId', 'BiddingStrategyId', 'BiddingStrategyName', '
TargetSpendBidCeiling', 'TargetSpendSpendTarget'])
   ->where('Id')
   ->equalTo($campaign_id)
   ->build();

$page = $campaign_service->query((string) $query);
echo '<pre>' . print_r($page->getEntries()[0], true) . '</pre>';

The result is (ids are manually changed):

Google\AdsApi\AdWords\v201809\cm\Campaign Object
(
    [id:protected] => XXXXXXXXX
    [campaignGroupId:protected] => 
    [name:protected] => 
    [status:protected] => 
    [servingStatus:protected] => 
    [startDate:protected] => 
    [endDate:protected] => 
    [budget:protected] => Google\AdsApi\AdWords\v201809\cm\Budget Object
        (
            [budgetId:protected] => XXXXXXXXX
            [name:protected] => 
            [amount:protected] => 
            [deliveryMethod:protected] => 
            [referenceCount:protected] => 
            [isExplicitlyShared:protected] => 
            [status:protected] => 
        )

    [conversionOptimizerEligibility:protected] => 
    [adServingOptimizationStatus:protected] => 
    [frequencyCap:protected] => 
    [settings:protected] => 
    [advertisingChannelType:protected] => 
    [advertisingChannelSubType:protected] => 
    [networkSetting:protected] => 
    [labels:protected] => 
    [biddingStrategyConfiguration:protected] => 
Google\AdsApi\AdWords\v201809\cm\BiddingStrategyConfiguration Object
        (
            [biddingStrategyId:protected] => 
            [biddingStrategyName:protected] => 
            [biddingStrategyType:protected] => TARGET_SPEND
            [biddingStrategySource:protected] => 
            [biddingScheme:protected] => 
            [bids:protected] => 
            [targetRoasOverride:protected] => 
        )

    [campaignTrialType:protected] => 
    [baseCampaignId:protected] => 
    [forwardCompatibilityMap:protected] => 
    [trackingUrlTemplate:protected] => 
    [finalUrlSuffix:protected] => 
    [urlCustomParameters:protected] => 
    [vanityPharma:protected] => 
    [universalAppCampaignInfo:protected] => 
    [selectiveOptimization:protected] => 
)


Maybe I'm trying to get max CPC the wrong way? Please tell me how to do it 
the right way.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/661265f0-d466-4d2a-94c0-cc23579dd2fe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • Get max... arsel . muginov
    • RE... googleadsapi-forumadvisor via AdWords API and Google Ads API Forum

Reply via email to