Maximum Conversions Bid Strategy Not Updating in Google Ads

437 views
Skip to first unread message

Team Velocity

unread,
Jan 30, 2020, 10:05:23 AM1/30/20
to AdWords API and Google Ads API Forum
Hi,

I am trying to update the bid strategies from the C# code. 
I am able to update the "MANUAL CPC", "TARGET CPA" and "TARGET SPEND". But when I try to update the "MAXIMIZE CONVERSIONS". 
It is not updating into the Google Ads for any campaign. 
I am not getting any error or exception in response. 
here is my implemented code: can anyone please help and let me know what is the missing/wrong here?


List<CampaignOperation> operations = new List<CampaignOperation>();
            CampaignServiceClient campaignService = client.GetService(Services.V1.CampaignService);
            Campaign campaign = new Campaign
            {
                Id = adCampaignId,
                ResourceName = ResourceNames.Campaign(clientId, adCampaignId),

            };
            if (isSearchAdsRequest)
            {
                campaign.NetworkSettings = new NetworkSettings
                {
                    TargetContentNetwork = false,
                    TargetGoogleSearch = true,
                    TargetSearchNetwork = false,
                    TargetPartnerSearchNetwork = false
                };
            }
            switch (adCampaign.BidStrategy.ToUpper())
            {
                case BiddingStrategyAdwordsAPI.MAXIMIZE_CONVERSIONS:
                    campaign.BiddingStrategyType = BiddingStrategyType.MaximizeConversions;
                    campaign.MaximizeConversions = new MaximizeConversions();
                    break;                
            }
            operations.Add(new CampaignOperation
            {
                Update = campaign,
                UpdateMask = FieldMasks.AllSetFieldsOf(campaign)

            });

            try
            {
                MutateCampaignsResponse response = await campaignService.MutateCampaignsAsync(clientId.ToString(), operations.ToArray());
            }

Thanks


Google Ads API Forum Advisor Prod

unread,
Jan 31, 2020, 12:37:08 PM1/31/20
to teamvadw...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for reaching out. Can you please share the complete detailed request and response logs for the call via reply privately to author so that I can further investigate the issue? You can find information on enabling logging here.

Regards,
Mitchell
Google Ads API Team

ref:_00D1U1174p._5001UUzqOI:ref

Pete Lavetsky (AdWords API Guru)

unread,
Mar 26, 2020, 5:21:42 PM3/26/20
to AdWords API and Google Ads API Forum
Hi All,

Was there any resolution to this? We're having the same exact problem. A Campaign is TARGET_CPA at Google and we're attempting to update to MAXIMIZE_CONVERSIONS. No error on the request ... response comes back fine but the bidding strategy doesn't change.

Thanks
Pete

Google Ads API Forum Advisor Prod

unread,
Mar 27, 2020, 1:06:49 PM3/27/20
to pete.l...@gmail.com, adwor...@googlegroups.com
Hi Pete,

Thank you for reaching out. There are no updates on this. Can you please share the complete detailed request and response logs for the call via Reply privately to author so that I can further investigate the issue? You can find information on enabling logging in the dropdown of your client library on the left-hand side of the screen here.


Regards,
Mitchell
Google Ads API Team

ref:_00D1U1174p._5001UXWuZC:ref

Pete Lavetsky (AdWords API Guru)

unread,
Mar 27, 2020, 1:17:10 PM3/27/20
to AdWords API and Google Ads API Forum
I've responded privately to author with the details.

Pete Lavetsky (AdWords API Guru)

unread,
Apr 2, 2020, 2:02:30 PM4/2/20
to AdWords API and Google Ads API Forum
Hi All,

I've responded privately to Google about this but last heard back about 72 hours ago.

Any update?

Can provide more details if needed.

Thanks
Pete

Google Ads API Forum Advisor Prod

unread,
Apr 2, 2020, 3:56:28 PM4/2/20
to pete.l...@gmail.com, adwor...@googlegroups.com
Hi Pete,

I responded to your private message on March 30th. Did you not receive it? I apologize if it did not go through. Either way, here was my response:

Please see here for information on setting the bidding strategy type. As it mentions, setting the bidding_strategy field directly won't work as expected. You will have to set the MAXIMIZE_CONVERSIONS_VALUE instead to change the bidding strategy of your campaign.

Pete Lavetsky (AdWords API Guru)

unread,
Apr 2, 2020, 5:59:45 PM4/2/20
to AdWords API and Google Ads API Forum
Hi Mitchell,

I did receive your message on the 30th and I did reply to it. In my private reply I included full creds / account numbers. I can include those again privately if needed.

Here was my response:

------------------------

Hi Mitchell,

I think we may be crossing streams a bit in our correspondence here.

We are attempting to set a Campaign bidding strategy to MAXIMIZE_CONVERSIONS, not MAXIMIZE_CONVERION_VALUE

In addition, I believe that we are setting the proper field on the Google campaign ie. we're not setting bidding_strategy directly:

case MAXIMIZE_CONVERSIONS:

    googleCampaign.setBiddingStrategyType( BiddingStrategyTypeEnum.BiddingStrategyType.MAXIMIZE_CONVERSIONS );
    googleCampaign.setMaximizeConversions( MaximizeConversions.newBuilder().build() );
    break;

case MAXIMIZE_CONVERSION_VALUE:

    googleCampaign.setBiddingStrategyType( BiddingStrategyTypeEnum.BiddingStrategyType.MAXIMIZE_CONVERSION_VALUE );
    googleCampaign.setMaximizeConversionValue( getMaximizeConversionValueBiddingScheme( fluentCampaignPlan ) );
    break;

We realize that setBiddingStrategyType is read only but the API allows us to set it so we do, as well as the bidding scheme, which we understand to be what actually alters the strategy

Here's a full request + response:

Request

-------

MethodName: google.ads.googleads.v3.services.CampaignService/MutateCampaigns

Endpoint: googleads.googleapis.com:443

Headers: {developer-token=REDACTED, login-customer-id=***, x-goog-api-client=gl-java/1.8.0_161 gapic/ gax/1.50.1 grpc/1.25.0}

Body: customer_id: "***"

operations {

  update {

    resource_name: "customers/***/campaigns/9648895439"

    name {

      value: "XYZ"

    }

    status: ENABLED

    campaign_budget {

      value: "customers/***/campaignBudgets/***"

    }

    tracking_url_template {

      value: "{lpurl}?keyword={keyword}&campaign={campaignid}&device={device}"

    }

    network_settings {

      target_google_search {

        value: true

      }

      target_search_network {

      }

      target_content_network {

      }

      target_partner_search_network {

      }

    }

    bidding_strategy_type: MAXIMIZE_CONVERSIONS

    maximize_conversions {

    }

    geo_target_type_setting {

      positive_geo_target_type: PRESENCE

      negative_geo_target_type: PRESENCE_OR_INTEREST

    }

  }

  update_mask {

    paths: "resource_name"

    paths: "name"

    paths: "status"

    paths: "tracking_url_template"

    paths: "network_settings.target_google_search"

    paths: "network_settings.target_search_network"

    paths: "network_settings.target_content_network"

    paths: "network_settings.target_partner_search_network"

    paths: "geo_target_type_setting.positive_geo_target_type"

    paths: "geo_target_type_setting.negative_geo_target_type"

    paths: "campaign_budget"

    paths: "bidding_strategy_type"

  }

}

partial_failure: true


Response

--------

Headers: Metadata(content-disposition=attachment,content-type=application/grpc,request-id=kuHgaCpnz-F2Omneu_xm0g,date=Mon, 30 Mar 2020 14:52:05 GMT,alt-svc=quic=":443"; ma=2592000; v="46,43",h3-Q050=":443"; ma=2592000,h3-Q049=":443"; ma=2592000,h3-Q048=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,h3-T050=":443"; ma=2592000)

Body: results {

  resource_name: "customers/***/campaigns/***"

}


Failure message: null

Status: Status{code=OK, description=null, cause=null}.

One peculiar thing is that since the MaximizeConversion strategy is an automated strategy, there's no values to set, ie. MaximizeConversions.newBuilder().build(), which results in 

    maximize_conversions {

    }


I wonder if the API is not recognizing that this is a change in bidding strategy


If you have any interest in hopping on a call or hangout let me know. 


Thanks

Pete

Google Ads API Forum Advisor Prod

unread,
Apr 3, 2020, 12:34:42 PM4/3/20
to pete.l...@gmail.com, adwor...@googlegroups.com
Hi Pete,

Thank you for clarifying this information. I was able to recreate this issue and will have my team investigate it further. I will let you know when there is an update available.

Google Ads API Forum Advisor Prod

unread,
Apr 7, 2020, 4:12:33 PM4/7/20
to pete.l...@gmail.com, adwor...@googlegroups.com
Hi Pete,

Could you try manually adding "maximize_conversions" as a fieldmask to the UpdateMask field of the CampaignOperation object?

Cheers
Anash

 

ref:_00D1U1174p._5001UXWuZC:ref

Pete Lavetsky (AdWords API Guru)

unread,
Apr 8, 2020, 8:42:21 AM4/8/20
to AdWords API and Google Ads API Forum
Hi Anash,

Manually adding "maximize_conversions" as a fieldmask does correctly mutate the campaign.

May I assume there will be an API library update made for this problem?

Thanks,
Pete

Google Ads API Forum Advisor Prod

unread,
Apr 8, 2020, 3:11:34 PM4/8/20
to pete.l...@gmail.com, adwor...@googlegroups.com
Hi Pete,

Could you file a bug on the Java library repo? https://github.com/googleads/google-ads-java/issues

The problem is that the underlying grpc libraries don't handle FieldMasks automatically; they delegate that responsibility to the end users in other APIs. Since we wanted to improve the experience with Google Ads API, we added a utility class that figures out the right FieldMask in most cases. This seems to be a corner case that it couldn't handle correctly, and perhaps we can fix it at our end.

Cheers,

Pete Lavetsky (AdWords API Guru)

unread,
Apr 9, 2020, 8:21:06 AM4/9/20
to AdWords API and Google Ads API Forum
Good morning Anash,


Thanks
Pete

Google Ads API Forum Advisor Prod

unread,
Apr 9, 2020, 3:17:41 PM4/9/20
to pete.l...@gmail.com, adwor...@googlegroups.com
Thanks Pete, I'll ask the Java library owners to follow up on GitHub.

Cheers

Estanislao Ledesma

unread,
Aug 31, 2021, 3:52:01 PM8/31/21
to AdWords API and Google Ads API Forum
Hello,
I'm currently having the same issue, and this sam thing is happening for other bidding strategy types with no attributes passed (Manual cpm, maximize conversions, target spend). Is there any update on when this is going to be resolved?
Thank you, 
Estanislao

Google Ads API Forum Advisor

unread,
Sep 9, 2021, 2:58:05 PM9/9/21
to estanisla...@gmail.com, adwor...@googlegroups.com
Hi Estanislao,

There's already a fix specified on https://github.com/googleads/google-ads-java/issues/272, could you take a look and let us know if that works for you?

Estanislao Ledesma

unread,
Sep 9, 2021, 3:42:57 PM9/9/21
to AdWords API and Google Ads API Forum
Hi, 
Adding the field mask "maximize_conversions.target_cpa" works for maximize conversions, "manual_cpm" for manual cpm and "target_spend.cpc_bid_ceiling_micros" for target spend works.
Thanks

Reply all
Reply to author
Forward
0 new messages