Adding Hotel AdGroupCriterion without bidding value

93 views
Skip to first unread message

Didier Roy

unread,
Mar 27, 2019, 10:58:37 AM3/27/19
to AdWords API and Google Ads API Forum
Hello 

I want to create an AdGroupCriterion with a hotel selection setting any bid ( My bid is defined at adGroup level)
Ahen I remove line $adGroupCriterion->setPercentCpcBidMicros(new Int64Value(['value' => 1])) I get message field_error: The required field was not present in the resource.
what is the correct way to do this?

I am using Google Ads API PHP client library

thanks


googleadsapi...@google.com

unread,
Mar 27, 2019, 3:55:56 PM3/27/19
to AdWords API and Google Ads API Forum
Hello Didier,

The field PercentCpcBidMicros is a required field when you use PercentCpc bidding strategy and should be set while creating the listing groups. You could refer the code sample mentioned here for reference. Please let me know if you have any further questions.

Regards,
Sai Teja, Google Ads API Team


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    http://googleadsdeveloper.blogspot.com/search/label/adwords_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

Was your question answered? Please rate your experience with us by taking a short survey.
If not -- reply to this email and tell us what else we can do to help.

Take Survey

Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/

Didier Roy

unread,
Mar 28, 2019, 5:00:06 AM3/28/19
to AdWords API and Google Ads API Forum
Hello Sai

thank you for your answar

I understand that PercentCpcBidMicros is mandatory when using PercentCpc bidding strategy.
- What to do if the campaign is on Manual CPC?
- When hotel group level bidding is disabled for a hotel selection. Is the Adgroup bidding value taken into account instead or is campaign closed for the hotel selection?

thanks

Didier Roy

unread,
Mar 28, 2019, 7:07:15 AM3/28/19
to AdWords API and Google Ads API Forum
Hello 

I have found the answer for question 1 : I use function $adGroupCriterion->setCpcBidMicros(new Int64Value(['value' => $bid*10000]));

there is still pending question 
- When hotel group level bidding is disabled ("exclude" on Google Ads dash)  for a hotel selection. Is the Adgroup bidding value taken into account instead or is campaign closed for the hotel selection?

thanks

googleadsapi...@google.com

unread,
Mar 28, 2019, 1:50:58 PM3/28/19
to AdWords API and Google Ads API Forum
Hello Didier,

Glad you were able to solve it. Your second question is on the product level. It will be better to ask this question in the Advertisers community forum instead. The product specialists there would be better equipped to answer your question.

Regards,
Sai Teja, Google Ads API Team


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    http://googleadsdeveloper.blogspot.com/search/label/adwords_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

Didier Roy

unread,
Mar 29, 2019, 7:52:39 AM3/29/19
to AdWords API and Google Ads API Forum
Hello Sai

thank you for this.
I still have a question about API. 
How can we set the bid value of a hotel group to "Exclude" with the API ?

thanks
Didier ROY

googleadsapi...@google.com

unread,
Mar 29, 2019, 11:40:18 AM3/29/19
to AdWords API and Google Ads API Forum
Hello Didier,

You could use the AdGroupCriterionService.MutateAdGroupCriteria and set the negative field to true for the AdGroupCriterion in order to exclude the AdGroup bid modifier. Please let me know if you have any further questions.


Regards,
Sai Teja, Google Ads API Team


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:

Didier Roy

unread,
Apr 2, 2019, 11:33:58 AM4/2/19
to AdWords API and Google Ads API Forum
Hello Sai

thank you for you answer.

I can create an adgroup criterion with negative field to true and it appears as Excluded on the Google Ads Platform. This is good thank you.

I am trying now to update the adgroup with a bid value and switching negative to false and I get the error :
Google Ads failure details: request_error: Field 'negative' cannot be modified by 'UPDATE' operation.

I don't understand this error because on the platform it is possible to change Excluded to a bid value.

Is there something I am missing?

thanks

googleadsapi...@google.com

unread,
Apr 2, 2019, 5:48:23 PM4/2/19
to AdWords API and Google Ads API Forum
Hello Didier,

The field negative is immutable, once it is set you cannot modify it via update operation. If you want to bid value you have to remove the criterion and add it with negative field to false. Please give it a try and let me know if you have any further questions. 


Regards,
Sai Teja, Google Ads API Team


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    https://ads-developers.googleblog.com/search/label/google_ads_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Reply all
Reply to author
Forward
0 new messages