Assign or Update a Bidding Strategy

For Hotel ads, a bidding strategy can be assigned for an individual campaign.

Details about choosing bidding strategies for Hotel ads can be found in Bidding overview for Hotel ads. After becoming familiar with bidding strategies, you can use the Google Ads API to assign and update Hotel campaign bidding strategies.

Assign a bidding strategy

To assign a strategy as part of creating a new Hotel campaign, follow these steps:

  1. Choose a campaign_bidding_strategy. The following strategies can be used for Hotel ads:

  2. Determine the field name-value pair that you want to use for the chosen strategy. For example, for a percent_cpc strategy, you could set enhanced_cpc_enabled to true.

  3. Set the strategy when creating the new campaign. For example, in Java, call the setter method for the campaign_bidding_strategy field (the method name convention is setcampaign_bidding_strategy) from within a builder of a Campaign instance.

    For a commission strategy, when creating the new campaign remember to add an additional statement that sets the PaymentMode.

This example demonstrates how to set a percent_cpc bidding strategy when creating a new campaign:

Java

// Creates the campaign.
Campaign campaign =
    Campaign.newBuilder()
        .setName("Interplanetary Cruise #" + System.currentTimeMillis())
        // Configures settings related to hotel campaigns including advertising channel type
        // and hotel setting info.
        .setAdvertisingChannelType(AdvertisingChannelType.HOTEL)
        .setHotelSetting(hotelSettingInfo)
        // Recommendation: Sets the campaign to PAUSED when creating it to prevent
        // the ads from immediately serving. Set to ENABLED once you've added
        // targeting and the ads are ready to serve
        .setStatus(CampaignStatus.PAUSED)
        // Sets the bidding strategy to Percent CPC. Only Manual CPC and Percent CPC can be used
        // for hotel campaigns.
        .setPercentCpc(
            PercentCpc.newBuilder().setCpcBidCeilingMicros(cpcBidCeilingMicroAmount).build())
        // Sets the budget.
        .setCampaignBudget(budgetResourceName)
        // Adds the networkSettings configured above.
        .setNetworkSettings(networkSettings)
        .build();

Update a bidding strategy

To update a campaign's bidding strategy, in a CampaignOperation.update, set the fields of the Campaign as described in Assign a bidding strategy.