How to set "Pay for Conversions" through API?

100 views
Skip to first unread message

Dennis Koschig

unread,
Aug 28, 2019, 6:04:48 AM8/28/19
to AdWords API and Google Ads API Forum
Hello, currently the Campaigns i create automatically use "Pay for Clicks" as Payment-Method.

pay for conversions.png















(Ignore that in the shown Screenshot "Conversions" cannot be selected, the Screenshot is from our Test-Account and not from our Production-Account)

How can i change this to use "Pay for Conversions" instead through the API? Which Objects/Constants in the php-API are responsible to set "Pay for Conversions"?

The Code currently looks like this:

    switch ($opt_target) {
      case FeedObj::OPT_TARGET_CLICKS:
        $bidding_strategy_configuration = new BiddingStrategyConfiguration();
        $bidding_strategy_configuration->setBiddingStrategyType(
          BiddingStrategyType::MANUAL_CPC
        );
        $bidding_scheme = new ManualCpcBiddingScheme();
        $bidding_strategy_configuration->setBiddingScheme($bidding_scheme);
        $campaign->setBiddingStrategyConfiguration($bidding_strategy_configuration);
        break;
      case FeedObj::OPT_TARGET_CONVERSIONS:
        //@todo: can we do something to select "pay for conversions" ?
        // Set bidding strategy: Target CPA
        $bidding_scheme = new TargetCpaBiddingScheme();
        $money = new Money();
        $money->setMicroAmount($mysterious_micro_amount);
        $bidding_scheme->setTargetCpa($money);
        $bidding_strategy_configuration = new BiddingStrategyConfiguration();
        $bidding_strategy_configuration->setBiddingScheme($bidding_scheme);
        $campaign->setBiddingStrategyConfiguration($bidding_strategy_configuration);
        break;
    }

Google Ads API Forum Advisor Prod

unread,
Aug 29, 2019, 1:07:30 AM8/29/19
to adwor...@googlegroups.com
Hi Dennis,

Thank you for reaching out.

I am afraid setting the "Pay for Conversions" is not supported in the AdWords API. This feature can only be set in the Google Ads UI.

Let me know if you have further clarifications.

Regards,
Dannison
Google Ads API Team

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