Bidding

AdWords scripts allows you to manage bidding for your campaigns, ad groups and criteria. This guide explains this feature and its use. To set an AdWords entity's bidding, you need to specify two parts:

  • A bidding strategy
  • The actual bid amount, if applicable

AdWords scripts provides access to bidding for campaigns, ad groups, and various criteria through their bidding() method.

Bidding Strategy

A bidding strategy represents a bidding configuration that can be applied to an AdWords entity. A bidding strategy can either be anonymous or flexible. You apply a bidding strategy to a campaign or ad group, through the setStrategy() method of its bidding() property. The following code snippet sets the bidding strategy of a campaign named Test Campaign to BUDGET_OPTIMIZER.

var campaign = AdWordsApp.campaigns()
    .withCondition("Name = 'Test Campaign'")
    .get()
    .next();
campaign.bidding().setStrategy("BUDGET_OPTIMIZER");

Except for campaigns (which can't be created in Scripts), setting a bidding strategy for an entity is optional. If you don't apply a bidding strategy to an entity, it will use the bidding strategy from its parent entity. For instance, if a bidding strategy is omitted for an ad group, it will inherit its campaign's bidding strategy. You can use the getStrategySource() method to figure out if an entity is using its own bidding strategy, or inheriting a bidding strategy from its parent.

Anonymous bid strategy

An anonymous bid strategy is applied directly to an entity. AdWords scripts supports the following anonymous bid strategies:

Name Description
MANUAL_CPC Manual click based bidding where user pays per click.
MANUAL_CPM Manual impression based bidding where user pays per thousand impressions. This can only be used for Display Network only campaigns.
BUDGET_OPTIMIZER Google automatically places bids for the user based on their daily/monthly budget.
CONVERSION_OPTIMIZER This bidding strategy aims to boost your return on investment (ROI) by automatically adjusting your bids for maximizing conversions with your budget. For more information on conversion optimizer, visit the Conversion Optimizer help center.

Flexible bidding strategy

This strategy allows for defining a shared bidding configuration at the account level. You can then apply the shared bidding configuration to specific campaigns, ad groups, and keywords. You can learn more about this feature on our help center.

You can retrieve flexible bid strategies in your account as follows:

var biddingStrategy = AdWordsApp.biddingStrategies()
    .withCondition("Name = 'My Shared Bidding Strategy'")
    .get()
    .next();

You can also access the campaigns, ad groups, or keywords that are using this bid strategy.

var adGroups = biddingStrategy.adGroups().get();

One benefit of using a flexible bidding strategy over an anonymous bidding strategy is that you can track the performance of AdWords entities sharing the same bid strategy; for example, to get click stats for your account:

var clicks = biddingStrategy.getStatsFor("LAST_MONTH").getClicks();

If you need to change the bidding strategy for these entities, you can simply modify the associated shared bidding strategy instead of modifying the bidding strategy of individual AdWords entities.

Send feedback about...

AdWords Scripts
AdWords Scripts
Need help? Visit our support page.