Skip to content

update_campaign: read and set the campaign-level broad match setting #106

Open

Description

@xgp

Situation. Our Search campaigns are exact and phrase match only, under Maximize clicks, on purpose. draft_ai_max_settings keeps AI Max and its automations off, which is great. The other setting that would let Google widen matching is the campaign-level broad match setting, and AdLoop can't read or write it. So our weekly audit can't prove a campaign stayed exact/phrase. It needs a person to open the UI.

What I tried. run_gaql with campaign.keyword_match_type reads it: our API-created campaigns return UNSPECIFIED, which I take to mean "not broad". There's no write path, and nothing in the tool docs or rules mentions the field, so an agent wouldn't know to check it.

What the API offers. Campaign.keyword_match_type (CampaignKeywordMatchType: BROAD, or unset). Setting BROAD makes every keyword in the campaign match as broad.

Proposed change.

  • Read: surface keyword_match_type in get_campaign_performance, or in a small settings read tool (see get_campaign_settings: one read for every setting that widens reach #109).
  • Write: an optional keyword_match_type on update_campaign. Turning broad on would go through the same check draft_campaign already applies to BROAD keywords (refused without Smart Bidding) and get a double confirmation, since it changes how every keyword in the campaign matches. Turning it off is the safe direction.

Happy to PR after we agree on the safety behaviour for switching it on; that's the part I'd want your view on first.

Activity

  1. kLOsk commented on Oct 27, 2026

    @kLOsk
    Owner

    Agreed on the safety behaviour, so go ahead:

    • Read: done. get_campaign_settings (0.36.0) returns keyword_match_type and names campaign-level broad match in widening_settings.
    • Write: an optional keyword_match_type on update_campaign only. New campaigns keep Google's default, so draft_campaign doesn't need it yet.
      • Turning BROAD on is refused unless the campaign uses Smart Bidding: the same strategy set as the existing broad-match keyword check, so please reuse that helper rather than a second list. When allowed, it needs a double confirmation, and the preview says it changes how every keyword in the campaign matches.
      • Turning it off is the safe direction: a single confirmation.
  2. xgp commented on Oct 27, 2026

    @xgp
    ContributorAuthor

    Thanks. PR is up: #117. keyword_match_type on update_campaign only. BROAD is refused unless the campaign (or the bidding_strategy in the same call) is in _SMART_BIDDING_STRATEGIES, the same set the BROAD-keyword checks use, and it needs a double confirmation. UNSPECIFIED turns it off with a single confirmation. One follow-up question is in the PR: moving a campaign that already has broad on off Smart Bidding.

  3. added 2 commits that reference this issue on Oct 27, 2026
    dc88182
    e0926c5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions