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

Through the next link, 
https://github.com/googleads/google-ads-java/issues/272,
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
Endpoint: googleads.googleapis.com:443
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?

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/b7f0ef1a-6ef6-456b-a893-aad53f657f90n%40googlegroups.com.
  • I ... 원성일
    • ... 'Google Ads API Forum Advisor' via AdWords API and Google Ads API Forum

Reply via email to