I can't change the Display Campaign to Maximum_conversations.

144 views
Skip to first unread message

원성일

unread,
Dec 8, 2021, 2:43:54 AM12/8/21
to AdWords API and Google Ads API Forum
I have questions about Google Ads API v9.
Display Campaign's BiddingStrategyType cannot be changed to MAXIMIZE_CONVERSIONS.
ex) MANUAL_CPM -> MAXIMIZE_CONVERSIONS

1. Update Campaign => not working

When setting the default value, the MaximizeConversations object does not recognize that it has been changed in FieldMask.

The following is the Campaign update to MAXIMIZE_CONVERSIONS code
---
Campaign.Builder campaignBuilder = Campaign.newBuilder()
                            .setResourceName(ResourceNames.campaign(param.getCustomerId(), param.getCampaignId()))
                            .setMaximizeConversions(MaximizeConversions.newBuilder().build());
---           

I know that MAXIMIZE_CONVERSIONS.TARGET_CPC is only available for Search Campaign
I think the BidingStrategyType changes only when it is recognized that MAXIMIZE_CONVERSIONS has changed on FieldMask. 

                 
2. Manual Update FieldMask 'MAXIMIZE_CONVERSIONS' => errors

I tried to change Field Mask, but an error occurred.

The following is the FieldMask Update source code
---
  final FieldMask.Builder fieldMaskBuilder = FieldMasks.allSetFieldsOf( campaign ).toBuilder();

  if( campaign.hasMaximizeConversions() && !fieldMaskBuilder.getPathsList().contains( "maximize_conversions" ) ) {
    fieldMaskBuilder.addPaths( "maximize_conversions" );
  }

  operationBuilder
    .setUpdate( campaign )
    .setUpdateMask( fieldMaskBuilder.build() );
---

The following is the requested details.

Request
-------
MethodName: google.ads.googleads.v9.services.CampaignService/MutateCampaigns
Headers: {developer-token=REDACTED, login-customer-id=7378590286, x-goog-api-client=gl-java/1.8.0_302 gccl/task ':google-ads:jar' property 'archiveVersion' gapic/task ':google-ads:jar' property 'archiveVersion' gax/2.6.1 grpc/task ':google-ads:jar' property 'archiveVersion'}
Body: customer_id: "6583317631"
operations {
  update {
    resource_name: "customers/6583317631/campaigns/15410884276"
    bidding_strategy_type: MAXIMIZE_CONVERSIONS
    maximize_conversions {
    }
    payment_mode: CLICKS
  }
  update_mask {
    paths: "resource_name"
    paths: "bidding_strategy_type"
    paths: "payment_mode"
    paths: "maximize_conversions"
  }
}


Response
--------
Headers: Metadata(content-type=application/grpc,request-id=Bw7gQlyWiuZrAPiP2axJ8Q,date=Wed, 08 Dec 2021 07:21:49 GMT,alt-svc=h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43")
Body: null
Failure message: errors {
  error_code {
    field_mask_error: FIELD_HAS_SUBFIELDS
  }
  message: "The field mask updated a field with subfields: \'maximize_conversions\'."
  location {
    field_path_elements {
      field_name: "operations"
      index: 0
    }
  }
}
request_id: "Bw7gQlyWiuZrAPiP2axJ8Q"

Status: Status{code=INVALID_ARGUMENT, description=Request contains an invalid argument., cause=null}.


How can I change it from another bindingStrangeType to Maximize_Conversations?

Google Ads API Forum Advisor

unread,
Dec 9, 2021, 3:20:10 AM12/9/21
to stars...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for posting your concern.

I would like to inform you first that I am going to delete your initial post as it contains generated logs on your end. I will paste instead below the body of your concern.

"I have questions about Google Ads API v9.
---Logs redacted below ---


How can I change it from another bindingStrangeType to Maximize_Conversations?
"

The second API request should update the bidding strategy of your campaign into the Maximize_Conversations, however, it encountered the FIELD_HAS_SUBFIELDS error. With this, could you try removing the bidding_strategy_type: MAXIMIZE_CONVERSIONS section in the body of your API request and in the update_mask field?

If the error persists, please provide the complete request and response logs with request ID and request header generated on your end where we can see the error. You can provide it via Reply privately to author option. If this option is not available, then send it instead on this email address googleadsa...@google.com.

Regards,
Google Logo
Ernie John Blanca Tacata
Google Ads API Team
 


ref:_00D1U1174p._5004Q2Sd5GC:ref
Reply all
Reply to author
Forward
0 new messages