Skip to main content
📝 Claude Code

Google Ads Automation With Claude Code: A Full Build

A practitioner's walkthrough of Google Ads automation with Claude Code: keyword research, SKAG campaigns, landing pages, split testing, and ROAS attribution.

22 min

Read time

4,298

Words

Jun 10, 2026

Published

Engr Mejba Ahmed

Written by

Engr Mejba Ahmed

Share Article

Google Ads Automation With Claude Code: A Full Build

The number that stopped me wasn't the speed. It was the spread.

I was watching a masterclass by a Google Ads operator named Jono — seven years deep in paid search — walk through an account he'd run for a previous business. $177,000 in total ad spend. A conversion rate sitting around 20%, which he claimed put it in the 99th percentile of advertiser accounts. And on the other side of that spend: over $730,000 in revenue. Those are his numbers, from his account, not mine — I want that crystal clear before we go a single sentence further. I haven't run a $177k account. What I did do was take his entire system, rebuild the automation layer with Claude Code, and pressure-test where it holds up and where it quietly falls apart.

Because here's the thing that most "automate Google Ads with AI" content skips: the automation is the easy 20%. Anyone can get Claude Code to spit out 200 ad headlines. The hard part — the part that decides whether you make money or set it on fire — is the attribution loop that connects a click to a closed sale and feeds that signal back into the bidding algorithm. That's where I spent most of my time, and that's where this guide goes deepest.

Google Ads automation with Claude Code is genuinely powerful in 2026. It's also a loaded gun. By the end of this, you'll know exactly which parts to automate aggressively, which parts to keep your hands on, and the one strategic claim in the source material that I think is dated and will cost you money if you follow it blindly.

Let me show you the whole build.


Why automate Google Ads with Claude Code at all?

Start with the honest version of the value proposition, because the hype version is everywhere and it's wrong.

The hype version says: "AI builds your entire profitable ad account in minutes, no skills needed." That's a lie of omission. Claude Code does not know your margins, your sales cycle, or which leads actually close. It will happily build a beautifully structured campaign that loses money with extreme efficiency.

The real value is narrower and far more useful. Running a Google Ads account involves a long tail of mechanical, repetitive operations: pulling keyword data, structuring hundreds of ad groups, writing dozens of ad variants per group, building a landing page per keyword theme, wiring up conversion tracking, and assembling a reporting dashboard. None of that work is strategic. All of it is tedious, error-prone when done by hand, and exactly the kind of structured, rules-based labor that an agent in your terminal eats for breakfast.

I run Claude Code inside VS Code for this. No separate app, no proprietary dashboard — just the editor, the terminal, and the Google Ads API. The mental shift that made it click for me is the same one I described when I built a landing page pipeline with MCPs: stop treating Claude Code as a coding tool and start treating it as an orchestration layer for your entire go-to-market stack. The campaign, the pages, the tracking, the dashboard — they all become files and API calls in one connected session.

What you compress is weeks into hours. What you do not compress is the judgment about which keywords are worth bidding on and what a lead is actually worth to your business. Keep those two in your own head and the automation becomes an amplifier instead of an expensive mistake.

That distinction — amplifier versus autopilot — is the whole game. Now let's get the plumbing working.


The setup nobody warns you about: API access and the token gauntlet

Before Claude Code can touch a single campaign, you need API access. This is the least glamorous part of the entire build and the part where most people quit. I want to walk it slowly because getting it wrong costs you days.

You need four things in place:

  1. A Google Ads account with active billing, plus a Google Ads Manager account (MCC) layered on top. The Manager account is what API access attaches to — a standalone account won't cut it.
  2. A developer token, requested from inside the Manager account under API Center. This is your application's identity to Google.
  3. A Google Cloud project with the Google Ads API enabled, an OAuth consent screen configured, and OAuth 2.0 credentials (client ID and secret) generated.
  4. A refresh token, generated by running through the OAuth flow once so your scripts can authenticate without a human clicking "allow" every time.

Here's the trap, and it's a real one. When your developer token is first approved, it doesn't start with full access. Per Google's own access-level documentation, a freshly minted token sits at a restricted tier with a hard ceiling on daily operations. The source masterclass cited a figure of 2,880 operations per day for the entry tier, and that's consistent with Google's Explorer/test-account quota — enough to build and validate on a test account, nowhere near enough to run real production volume.

Basic access bumps you to roughly 15,000 operations per day. Standard access lifts the daily cap for most services. To climb tiers you submit an application describing how you'll use the API — and Google reviews it. Plan for that review to take days, not minutes. I cannot stress this enough: start the access application before you do anything else, because everything downstream is gated on it.

On top of the daily operation cap, there's a separate queries-per-second rate limit. Google meters requests with a token-bucket algorithm bucketed per customer ID and developer token, and the exact QPS ceiling flexes with server load. The practical implication for your Claude Code scripts: build in retry-with-backoff from the start. When you bulk-create 600 ad groups, you will hit a rate limit mid-run, and a script that doesn't retry gracefully will leave your account in a half-built state that's miserable to clean up.

I had Claude Code write the API client with exponential backoff baked in — retry on RESOURCE_EXHAUSTED, double the wait each attempt, cap at five retries. That one defensive pattern saved me from three corrupted bulk operations on my test account alone.

Once the token's approved and the client authenticates cleanly, the boring part is over. This is where the leverage starts.


Keyword research and the match-type decision that controls your spend

Every campaign begins with keywords, and the first real decision is match type. Get this wrong and you'll bleed budget on garbage traffic before you've sold anything.

There are three match types plus the exclusion mechanism, and the trade-off between them is the difference between control and reach:

  • Broad match lets Google match your ad to anything it judges semantically related. Maximum reach, maximum risk — you'll show up for searches you never intended and pay for clicks that never convert.
  • Phrase match triggers when the search contains your phrase in order. This is the balance point, and where I'd tell most people to start. Enough flexibility to catch real intent, enough containment to avoid the worst waste.
  • Exact match fires only on your exact term (and tight close variants). Tightest control, lowest volume.
  • Negative keywords are explicit exclusions — the words you never want to trigger on.

For a service business, phrase match on high-intent terms is the sane default. Someone searching "emergency plumber Toronto" is ready to buy. Someone searching "how to fix a leaky faucet" wants a YouTube video, not your invoice. Negative keywords are how you keep the second person from costing you money.

I pointed Claude Code at the Google Keyword Planner workflow and had it pull and structure high-intent keywords for a sample vertical. In Jono's Toronto plumbing case study, this kind of pull surfaced 699 keywords — which sounds like a goldmine until you realize most of them are noise. The agent's job isn't just to find keywords; it's to cluster them by intent and flag the ones worth isolating.

Then, before a single campaign goes live, I had Claude import a universal negative keyword list. This is the single highest-ROI move in the entire setup and almost nobody does it on day one. The list excludes the predictable money-wasters across every account:

  • Job-seeker terms: "jobs," "salary," "careers," "hiring"
  • DIY terms: "how to," "DIY," "free," "tutorial"
  • Competitor brand names you don't want to pay to appear against
  • Price-shopper noise that rarely converts at margin

Claude Code maintains this as a versioned file in the repo. Every new campaign inherits it automatically. The first time you watch your "wasted spend" column stay near zero in week one instead of week six, you'll understand why this matters more than any clever bidding trick.

Keywords sorted, negatives loaded. Now the structure — and this is where I break with the source material.


SKAG campaign structure — and why I'd modify the advice from 2026

The masterclass leans hard on Single Keyword Ad Groups (SKAGs): one keyword per ad group, with the search term, ad copy, and landing page all matching that single keyword for maximum messaging consistency. The logic is clean. If someone searches "emergency plumber Toronto," they see an ad that says Emergency Plumber in Toronto, and they land on a page whose headline says Emergency Plumber in Toronto. That tight match historically lifted Quality Score, lowered cost-per-click, and raised conversion rates.

Here's where I have to be honest with you, because following the original SKAG playbook to the letter in 2026 will frustrate you. SKAGs aren't what they were.

Google changed how close variants work back in 2018, and kept expanding it. Today, an ad for one keyword automatically shows for related searches that share the same intent — which means you can no longer guarantee that your "single keyword" ad group only ever serves that single keyword. Multiple PPC practitioners now argue that for most advertisers, Single Theme Ad Groups (STAGs) are the better default, because Google's expanded close-variant matching and Smart Bidding algorithms perform best when they have a themed cluster of keywords to learn from rather than a thousand fragmented one-keyword groups.

So here's the hybrid I actually deployed, and what I'd recommend:

  • Use tight, SKAG-style isolation for your highest-value, highest-volume head terms — the handful of keywords where precise messaging control genuinely moves the needle and you have enough conversion volume to learn from.
  • Use themed STAGs for everything else — group keywords by intent (emergency, scheduled, commercial) so Smart Bidding has enough signal density to optimize.

The reason this matters beyond theory: fragmenting a small account into 699 single-keyword ad groups starves each one of conversion data. Smart Bidding needs volume per ad group to learn. Spread thin, it learns nothing and your costs stay high. The original SKAG advice was correct for the 2015–2017 Google Ads. The mechanics underneath it changed; the advice didn't always catch up.

Claude Code makes either structure trivial to build — it's the same bulk operation either way. The leverage of automation is exactly that it makes the strategic choice cheap to execute, which frees you to make the right one instead of the convenient one.

Whatever structure you pick, you also need to control where your ads show. I had Claude configure location targeting on a "presence" basis — targeting people physically in the service area rather than merely showing interest in it — and add exclusions for irrelevant geographies and known VPN traffic ranges. A plumber in Toronto paying for clicks from a data center in Virginia is lighting money on fire.

Structure and targeting locked. Now the part where Claude's volume becomes a genuine unfair advantage.


Ad split testing at scale: hundreds of variants, one winner

This is the section where automation stops being a convenience and becomes something a human team literally cannot match by hand.

A great ad isn't designed. It's discovered — by testing variations until one outperforms. The problem is that writing variations is slow, and most advertisers test three or four ads per group, declare a winner on thin data, and move on. They're sampling a tiny fraction of the possibility space.

I had Claude Code bulk-generate headlines, descriptions, and ad extensions across the account — dozens to hundreds of variants per theme, all pulling from the same structured keyword and positioning context. Different angles: urgency ("24/7 Emergency Response"), trust ("Licensed & Insured Since 2009"), price ("Upfront Pricing, No Surprises"), outcome ("Fixed Right the First Time"). The agent doesn't get bored, doesn't repeat itself, and produces variety a copywriter would take a full day to match.

The strategic point Jono makes — and I agree completely — is that one winning ad out of hundreds tested can drive a disproportionate share of your results. You're not looking for incremental gains. You're hunting for the outlier that converts at twice the rate of the pack. You only find it by testing at a scale that manual work makes uneconomical. Automation makes it nearly free.

A word of caution I'll add that the masterclass glosses over: don't call winners early. Smart Bidding and responsive search ads need conversion volume before the data means anything. Let variants accumulate real conversions — not clicks, conversions — before you cut losers. Pruning on 12 clicks is just noise-chasing with extra steps.

This is the same scale-out instinct I rely on when I automate SEO and social media work with Claude — the agent's edge isn't doing one thing brilliantly, it's doing the variation-and-test loop a hundred times without fatigue.

Hundreds of ads are useless if they point at a weak page. So Claude builds the pages too.


Landing page automation: one page per keyword theme, deployed live

Message match doesn't stop at the ad. The page the click lands on has to continue the exact promise the ad made, or your conversion rate collapses no matter how good the ad was.

So for each keyword theme, Claude Code generates a dedicated landing page whose headline matches the keyword exactly. Ad says Emergency Plumber in Toronto; page headline says Emergency Plumber in Toronto. That continuity is what converts. Break it, and the visitor feels a tiny jolt of "wait, is this the right place?" — and that jolt is measured in lost leads.

The pages aren't generic templates. I had Claude replicate design inspiration imported from sites like Dribbble — pull a layout I liked, adapt it to the offer — so the pages look intentional rather than auto-generated. The trust elements get built in deliberately, because they're what move a skeptical visitor from interested to converting:

  • A video testimonial from a real customer, above the fold
  • A prominent lead form — short, visible, no scroll required to find it
  • A founder video that puts a human face on the business

Then deployment. Claude pushes the static pages to GitHub and deploys them through Vercel, which hands back a live URL in minutes. No FTP, no hosting panel, no copying analytics snippets by hand into raw HTML. The whole chain — design, copy, build, deploy — runs in the same terminal session. If you've followed my MCP landing page pipeline, this will feel familiar; it's the same orchestration spine applied to paid traffic instead of organic.

The 60-second rule that quietly outweighs your landing page. Here's a stat that should reframe your whole funnel: businesses that respond to a lead within 5 minutes are 21 times more likely to qualify that lead than those who wait 30 minutes, and teams responding within one minute see up to 391% higher conversions. The Harvard Business Review study behind much of this analyzed over 100,000 leads. The takeaway: a perfect landing page that feeds a lead you contact two hours later is worth a fraction of a decent page feeding a lead you call in 60 seconds. Automate the page, absolutely — but automate the speed-to-lead alert with the same urgency.

If you want a team to design and ship this kind of conversion-focused page system end to end rather than building it yourself, that's squarely the kind of work I take on — you can see what I've built at fiverr.com/s/EgxYmWD.

Pages live, forms wired. But a form submission means nothing if you can't trace it back to the keyword that paid for it. That's the part that actually decides profitability.


ROAS attribution: the 5-step loop that separates profit from vanity

If you remember one thing from this entire build, remember this section. Everything before it is mechanics. This is where you find out whether you're making money.

The only metric that matters is Return on Ad Spend (ROAS) — actual revenue divided by actual spend. Not clicks. Not impressions. Not even conversion rate in isolation. A 20% conversion rate on leads that never pay is a beautiful number attached to a failing business. You have to connect the click to the closed sale, and then feed that truth back to Google so its bidding gets smarter.

Here's the five-step attribution loop I built, and it's the heart of the whole system:

  1. Tag every ad URL with parameters — keyword, campaign, and Google's click ID (GCLID). When someone clicks, those parameters ride along into the landing page URL. This is the thread you'll follow all the way to revenue.

  2. Capture those parameters in hidden form fields. The landing page reads the URL parameters and writes them into hidden fields on the lead form. Now when the form submits, the keyword and click ID travel with the lead into your system. The lead is no longer anonymous — you know exactly which ad and keyword produced it.

  3. Push leads into your CRM with those identifiers intact. Every lead carries its origin keyword and click ID as data, not guesswork.

  4. Track which leads become paying customers, and update your dashboard with real revenue mapped back to the originating keyword and campaign. This is the step almost everyone skips — and it's the only one that tells you the truth. Now you know not just which keywords convert leads, but which keywords convert cash.

  5. Upload the conversion and revenue data back into Google Ads as offline conversions. This is the magic step. Once Google's Smart Bidding knows which clicks turned into actual revenue — not just form fills — it optimizes bidding toward the keywords that produce paying customers, automatically. You're no longer optimizing for leads. You're optimizing for profit, and Google does the heavy lifting once you feed it the right signal.

Claude Code wires this entire loop: the URL tagging convention, the hidden-field capture script on each page, the CRM sync, and the offline-conversion upload back to Google. The dashboard becomes the source of truth, and the bidding algorithm gets progressively smarter as real revenue data flows back in.

This loop is the difference between Jono's $730k-on-$177k account and the thousands of accounts that "look optimized" while quietly losing money. The accounts that win aren't the ones with the cleverest ad copy. They're the ones that close the attribution loop so bidding chases revenue instead of clicks.

Skip steps 4 and 5 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.

There's one more layer that compounds this — and it's the cheapest revenue in the account.


Remarketing and segmentation: the warm audience nobody bothers with

Once your landing pages carry Google tags, you can segment visitors by temperature — cold (first touch) versus warm (already engaged, already on a page). And warm audiences are the most underpriced opportunity in most accounts.

The conventional move is to retarget warm visitors with cheap display banners — those ads that chase you around the internet. The masterclass argues, and I've seen this hold up, that remarketing to warm audiences through search ads outperforms cheap display. Someone who already visited your emergency-plumber page and then searches again is showing live, repeated intent. Catching them in search at that moment — when they're actively looking, not passively browsing — converts at a different level than a display impression they'll ignore.

Claude Code sets up the Google tags on each landing page, defines the audience segments, and configures the remarketing rules. The segmentation runs automatically; you just decide the strategy. The payoff is structural: you're spending your remarketing budget where intent is highest instead of where impressions are cheapest.

This is the same audience-aware thinking I apply when I build a full AI marketing team in Claude Code — the agents don't just produce assets, they route spend toward the segments most likely to convert.

Warm audiences captured, intent re-engaged. Now you need to see all of it in one place.


The dashboard and audit layer: making the whole account legible

A campaign you can't read is a campaign you can't improve. So the last build step is the one that ties everything together: a live dashboard.

I had Claude Code generate a dashboard that summarizes the metrics that actually matter — total spend, cost-per-acquisition (CPA), ROAS by keyword and campaign, top and bottom performers, and concrete optimization recommendations. Not a wall of 40 metrics nobody reads. The handful that drive decisions.

Then the audit automation. On a schedule, Claude pulls account data and flags problems: keywords spending without converting, ad groups starved of impressions, negative keywords that should be added based on the actual search-term report, budget mis-allocated toward low-ROAS campaigns. It surfaces the issues; you make the calls. This is the same routine-driven monitoring discipline I lean on when I automate SEO checks with Claude Code routines — the agent watches continuously so you don't have to babysit a dashboard.

The compounding move is wrapping these repeatable workflows as Claude Code skills. Anthropic officially launched skills in October 2025 — reusable SKILL.md instruction files that Claude Code auto-discovers and invokes. Instead of re-prompting the keyword-research flow or the SKAG-build flow every time, you encode each one as a skill. Next account, next vertical, next client — you invoke the skill and the whole workflow runs identically. That's how a one-off build becomes a repeatable system, and it's the same skill architecture I break down in my Claude Code agent skills guide.

That repeatability is the real prize. Build the system once, and every future account is a skill invocation away.


What this actually changes — and what it doesn't

Let me land this honestly, because the gap between the hype and the reality is exactly where people lose money.

What Claude Code genuinely changes: the mechanical labor of running Google Ads collapses from weeks to hours. Keyword structuring, ad variant generation at a scale no human matches, per-keyword landing pages deployed live, the full attribution loop, automated audits — all of it becomes file operations and API calls in one terminal session. That's real, and it's a serious edge.

What it does not change: the judgment. Claude doesn't know what a customer is worth to you, which keywords deserve budget, or when to kill a campaign. Jono's $730k-on-$177k result came from seven years of operator instinct plus a closed attribution loop — the automation amplified expertise that already existed. Point the same machine at the wrong keywords with no revenue feedback, and you'll lose money faster and more efficiently than ever.

And on SKAGs specifically: take the source material's structure as a starting point, not gospel. The close-variant and Smart Bidding changes since 2018 mean a hybrid of tight isolation for head terms and themed STAGs for everything else will serve most accounts better than a thousand fragmented single-keyword groups.

So here's your move for the next 24 hours: don't build a campaign. Build the attribution loop first. Set up URL parameter tagging, hidden form fields, and the offline-conversion upload back into Google Ads — on a tiny test campaign with a $10/day budget. Prove that a click can trace all the way to a tracked sale and back into the bidding signal. Once that loop closes, everything else — the keywords, the SKAGs, the hundreds of ad variants — is just volume you already know how to point in a profitable direction.

The advertisers who win in 2026 aren't the ones with the best AI prompts. They're the ones whose bidding algorithm knows what a paying customer looks like. Build that first.

FAQ

Frequently Asked Questions

Everything you need to know about this topic

No — you direct Claude Code in plain language and it writes the API client, scripts, and landing pages for you. The harder prerequisite isn't coding; it's the Google Ads API setup (Manager account, developer token, OAuth credentials) and the strategic judgment about which keywords are worth bidding on. For the full setup sequence, see the API access section above.

A newly approved developer token starts restricted — roughly 2,880 operations per day at the entry tier, enough for test accounts only. Basic access raises that to about 15,000 operations daily, and Standard access lifts the cap for most services, per Google's access-level documentation. Apply for higher access early; review takes days.

Partially. Since Google expanded close-variant matching, SKAGs are no longer the universal best practice they were around 2015. Themed Single Theme Ad Groups (STAGs) now perform better for most accounts because Smart Bidding needs conversion density to learn. Use tight SKAG isolation only for your highest-value head terms — see the SKAG section above for the hybrid approach.

Return on Ad Spend (ROAS) — actual revenue divided by actual spend — is the only metric that determines profitability. Clicks, impressions, and even conversion rate can all look strong while the account loses money. The five-step attribution loop above is how you connect clicks to real revenue and feed that signal back into bidding.

Let's Work Together

Looking to build AI systems, automate workflows, or scale your tech infrastructure? I'd love to help.

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

About the Author

Engr Mejba Ahmed

Engr. Mejba Ahmed builds AI-powered applications and secure cloud systems for businesses worldwide. With 10+ 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.

Discussion

Comments

0

No comments yet

Be the first to share your thoughts

Leave a Comment

Your email won't be published

5  x  6  =  ?

Continue Learning

Related Articles

Browse All

Comments

Leave a Comment

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

Claude Code Expert · Online

👋

Hey there!

Quick Actions

WhatsApp Instant reply

Chat on WhatsApp

+880 1723 741224 · Instant reply

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

[email protected]

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

Powered by OpenAI

335+

Blog Posts

25

AI Courses

63

Projects

Services & Expertise

Pricing & Process

Learning & Resources

Connect & Support