Google Ads API: "campaign.manual_cpc.enhanced_cpc_enabled.value = False" does not work

37 views
Skip to first unread message

Mat

unread,
May 8, 2019, 11:55:34 AM5/8/19
to AdWords API and Google Ads API Forum
Hi,

this code works as expected:

customer_id = REDACTED
campaign_id
= REDACTED


campaign_service
= google_ads_client.get_service('CampaignService', version='v1')
campaign_operation
= google_ads_client.get_type('CampaignOperation', version='v1')
campaign
= campaign_operation.update
campaign
.resource_name = campaign_service.campaign_path(
      customer_id
, campaign_id)
campaign
.manual_cpc.enhanced_cpc_enabled.value = True
fm
= protobuf_helpers.field_mask(None, campaign)
campaign_operation
.update_mask.CopyFrom(fm)
campaign_response
= campaign_service.mutate_campaigns(
          customer_id
, [campaign_operation])


Result: The campaigns bid strategy is set to manual_cpc and the enhanced_cpc is enabled.

But if I try to set enhanced_cpc to false, nothing happens:

customer_id = REDACTED
campaign_id 
= REDACTED


campaign_service 
= google_ads_client.get_service('CampaignService', version='v1')
campaign_operation 
= google_ads_client.get_type('CampaignOperation', version='v1')
campaign 
= campaign_operation.update
campaign
.resource_name = campaign_service.campaign_path(
      customer_id
, campaign_id)
campaign
.manual_cpc.enhanced_cpc_enabled.value = False
fm 
= protobuf_helpers.field_mask(None, campaign)
campaign_operation
.update_mask.CopyFrom(fm)
campaign_response 
= campaign_service.mutate_campaigns(
          customer_id
, [campaign_operation])

Despite of not getting any errors, when I check the settings in the Google Ads UI, the enhanced_cpc is still enabled.

Would you mind looking into it?

Regards
Mat

googleadsapi...@google.com

unread,
May 8, 2019, 5:04:26 PM5/8/19
to m...@keyword-experte.de, AdWords API and Google Ads API Forum
Hi Mat, 

The Bidding strategy type will be Manual CPC. The enhanced_cpc_enabled value is to check if the conversions can be increased with Enhanced CPC. Please find the attached UI screenshot as a reference. 

Thanks,
Bharani, Google Ads API Team
Screen Shot 2019-05-08 at 5.03.43 PM.png

Mat

unread,
May 9, 2019, 2:31:37 AM5/9/19
to AdWords API and Google Ads API Forum
Hi Bharani,

yes, that's what it should do. 

But my point is, that while

campaign.manual_cpc.enhanced_cpc_enabled.value = True

does work as expected,

campaign.manual_cpc.enhanced_cpc_enabled.value = False


does not work: The enhanced CPC stays checked (although I don't receive any error messages).

Regards
Mat


googleadsapi...@google.com

unread,
May 9, 2019, 8:39:29 AM5/9/19
to m...@keyword-experte.de, AdWords API and Google Ads API Forum
Hi Mat, 

I was able to test this on my end and this is working as expected. Could you please share the specific campaign Ids along with the request and response logs to check this further? You may share the details privately via Reply privately to author option.

Regards,
Reply all
Reply to author
Forward
0 new messages