Invincible
  • 3
    Services
    • Paid Media
    • PPC (Google Ads)
    • Paid Social (Meta, TikTok)
    • Amazon Ads
    • Display & Native
    • Video Advertising
    • Video Content Creation
      for Paid Ads
    • Programmatic
    • EARNED MEDIA
    • SEO
    • Content Marketing
    • Organic Social
    • PR & Communications
    • Influencer Marketing
    • SYSTEMS & PLATFORMS
    • eCommerce (Shopify Plus)
    • CRM (HubSpot, Klaviyo)
    • Marketing Automation
    • Website Development
    • Data & Analytics
    • AI & INNOVATION

    Go With Pride AI

    Creative Catalyst Winner

    • AI Chatbots
    • Predictive Analytics
    • Marketing AI Integration
Work InsightsFree scripts About

Location exclusion allocator

Finds the towns and regions where you keep paying for clicks that do not convert, and excludes them, because Smart Bidding ignores location bid adjustments.

FreeRuns weeklyWorks with Smart BiddingHospitality, Fitness, E-commerce, Beauty

What it does

  • Reads cost and conversions by city, region or postcode area for each campaign.
  • Flags areas above your spend floor with a CPA well over target, or no conversions at all.
  • Adds them as excluded locations on that campaign, a few at a time, never touching protected places.
  • Writes every location's numbers to a Google Sheet so you can see what was kept and why.

How it changes your account

It adds negative location targets to campaigns, capped per run. It never removes your existing targeting.

Smart Bidding

Made for Smart Bidding. Location bid adjustments are ignored by Smart Bidding, so exclusion is the lever that still works.

Settings explained

Campaigns

Which campaigns this script looks at. Pick all, names that contain some text (separate several with commas), or campaigns with a label.

Days of data

How many full days of data to look at, ending yesterday.

Location level

City suits most local businesses; region suits national advertisers.

Your target CPA

Cost per conversion you are happy with.

Exclude when CPA is above this multiple of target

2 means twice your target.

Only judge locations that spent at least

Areas with less spend are left alone.

Most exclusions per run
Never exclude

Location names to keep whatever the numbers, one per line (e.g. your own town).

Alerts only (recommended for the first week)

While this is on, the script only logs and emails what it would change. Nothing in your account changes. Turn it off once you are happy with what it reports.

Email alerts to

Where alerts and summaries go. Separate several addresses with commas. Leave blank to log only.

Slack webhook URL (optional, stays in your browser)

Paste a Slack incoming webhook URL to get the same alerts in a channel. It is added to your copy of the script on your device and never sent to us.

Google Sheet name

The script keeps its working data in a Google Sheet with this exact name in your Drive, and creates it on the first run.

Install in two minutes

  1. In Google Ads, go to Tools, then Bulk actions, then Scripts.
  2. Click the plus button and name your script.
  3. Delete the sample code, paste yours and click Authorise.
  4. Click Preview and check the log. Nothing changes in Preview.
  5. Click Save and set it to run weekly.

In Google Ads, go to Tools > Bulk actions > Scripts, add a new script, paste the code and click Authorise. Then click Preview and read the log before anything runs for real.

Schedule it Weekly.

It starts with Alerts only on. Leave it on for a week, check the emails, then turn it off and copy the script again.

Questions

Does it work for Performance Max?

Yes. Location exclusions apply to Performance Max campaigns too.

Can I undo an exclusion?

Yes: remove it from the campaign's Locations page. The Sheet lists everything the script excluded.

Will it change my account straight away?

No. Alerts only is on by default, so the first runs only report what would change. You turn it off when you are happy.

Changelog

  1. 1.0.0 27 Nov 2026 Improvement
    • First release in the Invincible Google Ads scripts library.

Browse all Google Ads scripts

Scripts are provided as is. You're responsible for previewing, testing and monitoring them in your account. Scripts Terms of Use.