This is the legacy documentation for Google Ads scripts. Go to the current docs.


Stay organized with collections Save and categorize content based on your preferences.

Set mobile bid modifier for a campaign

function setMobileBidModifier() {
  var campaignIterator = AdsApp.campaigns()
      .withCondition('Name = "INSERT_CAMPAIGN_NAME_HERE"')
  if (campaignIterator.hasNext()) {
    var campaign =;
    // Retrieve the mobile target for campaign.
    var mobileTargetIterator = campaign.targeting().platforms().mobile().get();
    if (mobileTargetIterator.hasNext()) {
      mobileTarget =;
      // Set the bid modifier for mobile platform.