Hello, The daily budget for a campaign is of the type Attribute <https://developers.google.com/adwords/api/docs/appendix/reports#field-attributes>, which will return the current value in the account ignoring the date range. For this, you will need to generate a Campaign Performance Report <https://developers.google.com/adwords/api/docs/appendix/reports/campaign-performance-report> by querying for the Amount <https://developers.google.com/adwords/api/docs/appendix/reports/campaign-performance-report#amount> field and pulling the report on a daily basis and store this in your local database to check if it is exceeding the daily set limits. To set MaxCpc bids for a specific keyword, you can check the PHP code sample <https://github.com/googleads/googleads-php-lib/blob/c40058256b40c627820a575bc888e137826d84ff/examples/AdWords/v201806/BasicOperations/AddKeywords.php> as a reference.
Let me know if you have any other questions. Regards, Bharani, AdWords API Team On Wednesday, September 19, 2018 at 2:43:35 PM UTC-4, nicolò Cozzani wrote: > > Hello, > I need some suggestions ,what i'm trying to do, if possibile is : > - check if a given campaing yesterday had reached the daily budget > - if so change the max cpc bid for keywords of that campaign. > > For change the max cpc bid i was thinking to use this example > <https://developers.google.com/adwords/api/docs/samples/php/basic-operations#update-an-ad-group> > : > > > // Update the CPC bid if specified. > if (!is_null($cpcBidMicroAmount)) { > $bid = new CpcBid(); > $money = new Money(); > $money->setMicroAmount($cpcBidMicroAmount); > $bid->setBid($money); > $biddingStrategyConfiguration = new > BiddingStrategyConfiguration(); > $biddingStrategyConfiguration->setBids([$bid]); > > $adGroup->setBiddingStrategyConfiguration($biddingStrategyConfiguration); > } > > > > Is this the best / correct way to do? > > While im not sure what to do to achieve the first question (check if a > given campaing yesterday had reached the daily budget) if i have to use > campaign perfmormance report or Budget Performance Report (or something > else?). a pratical example would be wonderful. > Thanks > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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/4c8d6a7d-feee-42da-8971-63eabc4e9968%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
