Ad Params

  • Ad parameters can be used to customize text ads based on the triggering keyword.

  • The setupAdParamsInAdGroup function demonstrates how to create an expanded text ad with ad parameters and set these parameters for a specific keyword within an ad group.

  • The getAdParamsForKeyword function shows how to retrieve and log the ad parameters associated with a keyword in a given ad group.

  • When an ad with parameters is triggered by a keyword without associated ad parameters, the default text within the curly braces will be displayed.

Create responsive search ad with ad parameters for an ad group

function setupAdParamsInAdGroup(adGroupName) {
  // If you have multiple adGroups with the same name, this snippet will
  // pick an arbitrary matching ad group each time. In such cases, just
  // filter on the campaign name as well:
  //
  // AdsApp.adGroups()
  //     .withCondition('ad_group.name = "INSERT_ADGROUP_NAME_HERE"')
  //     .withCondition('campaign.name = "INSERT_CAMPAIGN_NAME_HERE"')
  const adGroupIterator