Skip to main content
Claude Code

Google Ads Automation With Claude Code: A Full Build

The full Claude Code build for Google Ads: API access tiers, keyword structure, ad variants at scale, and the offline-conversion loop that decides profit.

8 min
Read time
1,544
Words
Published
Last revised
Engr Mejba Ahmed

Written by

Engr Mejba Ahmed

Share Article

Google Ads Automation With Claude Code: A Full Build

Google Ads automation with Claude Code means pointing an agent at the Google Ads API and letting it do the mechanical work of running a paid-search account, pulling keywords, structuring ad groups, writing hundreds of ad variants, building landing pages, and wiring the reporting, while the money decisions stay in your head. I rebuilt a working system from an experienced operator and stress-tested where it holds up. Before anything else, the disclosure that frames every number in this post: the source account belongs to a paid-search operator named Jono, seven years in the field, who showed roughly $177,000 in ad spend producing over $730,000 in revenue at about a 20 percent conversion rate. His numbers, his account. What I did was rebuild the automation layer with Claude Code, and the most important thing I learned doing it is that the automation is the easy 20 percent. The attribution loop that connects a click to a closed sale is the part that decides whether any of this makes money, and it's where this guide goes deepest.

Google Ads Automation With Claude Code: A Full Build - overview of the setup nobody warns you about, keywords, match types, and the negative list

The setup nobody warns you about

Before Claude Code touches a campaign, you need API access, and this is where most people quit. Four prerequisites: a Google Ads account with billing plus a Manager (MCC) account layered on top, since API access attaches to the manager; a developer token from the manager account's API Center; a Google Cloud project with the Ads API enabled and OAuth credentials generated; and a refresh token from one pass through the OAuth flow so scripts authenticate unattended.

The trap is the access ladder. Google's tiers run Test, Explorer, Basic, and Standard, and a freshly approved developer token starts at Explorer: capped at 2,880 operations per day against production accounts, with restrictions on features like keyword planning. Basic access lifts you to 15,000 operations daily across test and production accounts and removes most feature restrictions; Standard removes the ceiling for most services. You climb by application, and Google's review takes days. Start the access application before you build anything, because everything downstream is gated on it.

On top of the daily caps sits a queries-per-second limit metered by a token-bucket algorithm, which means bulk operations will hit rate limits mid-run. I had Claude Code write the API client with exponential backoff from the first commit: retry on resource-exhausted errors, double the wait, cap the attempts. A bulk ad-group creation that dies without retries leaves your account half-built, and cleaning that up is misery I only needed to experience once on a test account.

Keywords, match types, and the negative list

The first strategic decision is match type, and it controls your bleed rate. Broad match maximizes reach and waste. Exact match maximizes control and starves volume. Phrase match is the sane default for service businesses: "emergency plumber Toronto" is a buyer, "how to fix a leaky faucet" wants a video, and phrase-level containment plus negatives keeps you paying for the first and not the second.

Claude Code's job at this stage is pulling and clustering keyword data by intent, and in the source account's vertical a single research pass surfaced 699 candidate keywords, most of them noise. The agent's value isn't finding keywords; it's clustering them and flagging the few worth isolating.

Then the highest-ROI move in the whole setup, imported before anything goes live: a universal negative keyword list. Job-seeker terms, DIY terms, competitor brands you won't pay to appear against, price-shopper noise. Claude Code maintains mine as a versioned file in the repo, and every new campaign inherits it automatically. Watching wasted spend stay near zero in week one instead of week six is how this list justifies itself.

Campaign structure: where I break with the source material

The masterclass leans hard on Single Keyword Ad Groups, one keyword per ad group, with ad copy and landing page matched exactly to it. The logic was historically sound: tight message match lifted Quality Score and conversion.

Here's my honest correction, and it's the one place following the source verbatim will cost you money. SKAGs aren't what they were. Google has been expanding close-variant matching since 2018, so a "single keyword" ad group no longer serves only its single keyword, and Smart Bidding learns from conversion density per ad group, which a thousand fragmented one-keyword groups starve. The hybrid I actually deployed: SKAG-style isolation only for the handful of high-value head terms where messaging control genuinely moves the needle and volume exists to learn from, and themed ad groups clustered by intent, emergency, scheduled, commercial, for everything else. The automation makes either structure equally cheap to build, which is precisely the point: when execution is free, you can afford the correct structure instead of the convenient one.

Location targeting gets configured on a presence basis, people physically in the service area, with exclusions for irrelevant geographies. A Toronto plumber paying for data-center clicks from Virginia is lighting money on fire in a way no clever bidding recovers.

Variants at scale, and the landing pages they deserve

Ad testing is where the agent becomes something a human team can't match. A great ad is discovered, not designed, and most advertisers test four variants and call a winner on thin data. I had Claude Code bulk-generate headlines, descriptions, and extensions across the account, urgency angles, trust angles, price angles, outcome angles, at a volume a copywriter would need days to produce. You're hunting the outlier that converts at twice the pack's rate, and you only find it by testing at a scale manual work makes uneconomical. One caution the source glosses over: don't call winners early. Prune on conversions, not clicks; twelve clicks of data is noise-chasing with extra steps.

Every keyword theme then gets a dedicated landing page whose headline matches the ad's promise exactly, because breaking that continuity is measured in lost leads. Claude generates the pages, builds in the trust elements deliberately, testimonial above the fold, short visible lead form, and deploys through GitHub and Vercel to a live URL in the same terminal session. It's the same orchestration spine I use when I run marketing production through a Claude Code agent team: design, copy, build, deploy as one connected loop rather than four tools.

The attribution loop that separates profit from vanity

If you remember one section, make it this one. The only metric that matters is return on ad spend, actual revenue over actual spend. A 20 percent conversion rate on leads that never pay is a beautiful number attached to a failing business. The five-step loop Claude Code wires end to end:

  1. Tag every ad URL with keyword, campaign, and Google's click ID, so the origin rides into the landing page.
  2. Capture those parameters in hidden form fields, so when the form submits, the lead carries its own provenance.
  3. Push leads into the CRM with identifiers intact.
  4. Track which leads become paying customers, mapping real revenue back to the originating keyword. This is the step nearly everyone skips, and it's the only one that tells the truth.
  5. Upload conversions and revenue back into Google Ads as offline conversions, so Smart Bidding optimizes toward keywords that produce cash, not form fills.

Skip steps four and five and you've built a very efficient machine for generating clicks you can't value. Close the loop and every dollar gets smarter than the last. This loop, not the ad copy, is the difference between the source account's results and the thousands of accounts that look optimized while quietly losing money.

Once the tags are live, remarketing comes almost free: segment warm visitors and re-engage them through search ads rather than cheap display, catching repeated live intent instead of buying ignorable impressions.

The audit layer, and making it repeatable

The last build step is legibility: a dashboard summarizing spend, CPA, and ROAS by keyword, plus a scheduled audit where Claude pulls account data and flags keywords spending without converting, negatives implied by the search-term report, and budget sitting on low-ROAS campaigns. It surfaces; you decide. It's the same watch-continuously pattern I run for automated SEO checks on a schedule, applied to paid traffic.

Then wrap each workflow, keyword research, structure build, audit, as a reusable skill file so the next account or vertical is an invocation rather than a rebuild. That skill architecture is the compounding asset here, and it's the same one I break down in my guide to Claude skills, applied to a commercial pipeline instead of a coding one, much like the SEO-and-social version of this system.

What none of this changes: judgment. Claude doesn't know your margins, your sales cycle, or what a lead is worth. The source account's results came from seven years of operator instinct plus a closed attribution loop; the automation amplified expertise that already existed. So your first 24-hour move isn't a campaign. It's the loop: tagging, hidden fields, offline-conversion upload, proven on a $10-a-day test campaign. Once a click traces all the way to a tracked sale and back into the bidding signal, everything else is volume you already know how to point in a profitable direction.

If you'd rather have this system built and wired to your CRM than assemble it yourself, tell me about your account and I'll give you an honest read on whether the build fits your business before any money moves.

Coffee cup

Enjoyed this article?

Your support helps me create more in-depth technical content, open-source tools, and free resources for the developer community.

Related Topics

Engr Mejba Ahmed

Engr Mejba Ahmed

Engr. Mejba Ahmed builds AI-powered applications and secure cloud systems for businesses worldwide. With 8+ years shipping production software in Laravel, Python, and AWS, he's helped companies automate workflows, reduce infrastructure costs, and scale without security headaches. He writes about practical AI integration, cloud architecture, and developer productivity.

Related Articles

Browse All

Comments

Leave a Comment

Share a question or add to the discussion.

Comments are moderated before appearing.

Learning Resources

Expand Your Knowledge

Accelerate your growth with structured courses, verified certificates, interactive flashcards, and production-ready AI agent skills.

Sample Certificate of Completion

Sample certificate — complete any course to earn yours

Engr Mejba Ahmed

Engr Mejba Ahmed

AI assistant · trained on my work

👋

Hey there!

Quick Actions

WhatsApp Direct line to me

Chat on WhatsApp

+880 1723 741224 · Replies within the hour on working days

Popular Questions

Engr Mejba Ahmed is connected
Engr Mejba Ahmed is typing...
Engr Mejba Ahmed avatar

✉ Want me to follow up? Drop your email

Engr Mejba Ahmed avatar

📞 Connect Directly

Choose how you'd like to reach me

WhatsApp

+880 1723 741224

Email

mejba.13@gmail.com

✓ Details sent! I'll get back to you shortly.

Powered by Claude

335+

Blog Posts

25

AI Courses

63

Projects

Services & Expertise

Pricing & Process

Learning & Resources

Connect & Support