Labels

  • Labels help organize Google Ads elements into meaningful groups for filtering and reporting at account, campaign, ad group, ad, and keyword levels.

  • Within manager accounts, labels can group similar child accounts, while within Google Ads accounts, they can associate arbitrary data with entities.

  • Labels enable various use cases, including processing lists of accounts or entities, managing processes across multiple runs, facilitating two-step changes, enabling flexible bidding strategies, and tracking quality scores.

  • Google Ads scripts allow creating and applying labels to accounts within manager accounts and to campaigns, ad groups, ads, and keywords within a specific account.

  • Label resource names can be used for filtering entities when running performance reports for Google Ads accounts, particularly with CONTAINS_ALL, CONTAINS_ANY, and CONTAINS_NONE operators.

Labels let you organize elements in your account into meaningful groups so you can quickly filter and report on the data that is most interesting to you. Google Ads scripts support labels at the account, campaign, ad group, ad, and keyword levels.

Use cases

Within Google Ads accounts, labels can be used to associate arbitrary data with Google Ads entities. Within manager accounts, labels can be used to group similar child accounts. Labels help with a number of use cases:

  • Process a list of accounts
    • If you are an agency, you could apply a plumber_accounts label to all the accounts for plumbers, and then a script can push plumber-related keywords (for example, "emergency shower repair") into all campaigns in those accounts.
  • Process a list of entities
    • If you have a set of keywords that you want to enable only during weekends, you could apply a weekend_keywords label to them. A script could then enable all keywords with weekend_keywords on Friday evening, and pause them on Monday morning.
  • Process entities across multiple runs
    • If you have a large number of entities that cannot be processed in under 30 minutes, then you can create a processed label in your script and apply it to entities that have already been processed. Schedule the script to run hourly, and then process only entities that don't have the processed label applied to them.
  • Two-step changes
    • Instead of having the script execute a bid change across a large number of keywords, you can label the keywords with increase_bid_by_10%, sign in to the Google Ads UI, filter out the keywords matching the label, review them, and if satisfied with the result, change their bids using bulk edits.
  • Flexible bidding
    • A script could use labels to maintain a history of bid changes. For example when a script increases a keyword bid by 20%, it can mark the account with a label, increased_20%. The next day when the script runs across the label and realizes it had already increased the bid previously, it could increase the bid by only 10%.
  • Quality score tracking
    • A script could label important keywords with their quality scores, then periodically check and report on keywords whose quality score no longer matches the label.

Labels at the account level

Google Ads scripts let you create labels within manager accounts, as well as apply labels to Google Ads accounts under that manager account:

const labelName = 'High spending accounts';
AdsManagerApp.createAccountLabel(labelName);

You can apply the label to the accounts of your choice using the applyLabel method:

const accountIds = ['123-456-7890', '345-6789-2100'];
const