$ cd ../blog/
$ cat ./blog/google-ads-from-terminal.md

I Manage Google Ads from My Terminal

Title: I Manage Google Ads from My Terminal
Date: December 10, 2025
Author: Badal Satyarthi
Tags: [Claude Code] [Automation] [Marketing]

I Manage Google Ads from My Terminal

Why I stopped clicking through the Google Ads UI and started talking to an AI agent instead

Terminal managing Google Ads

TL;DR

Manage Google Ads entirely from the terminal using Claude Code and Playwright MCP. Works best for small advertisers (1-5 campaigns, $30-100/day). Handles campaign creation, performance reporting, negative keywords, and conversion tracking audits — all through natural language conversation instead of navigating the Google Ads UI.


Key Takeaways

  • You can manage Google Ads entirely from the terminal using Claude Code's Playwright-based browser automation — no API keys or OAuth setup required.
  • Campaign creation becomes conversational — describe your targeting, budget, and goals in plain English, and the AI agent handles the 15+ step setup process across the Google Ads UI.
  • Conversion tracking audits are where this shines most — Claude Code can read your source code and navigate GA4/Google Ads in the same session, bridging the gap between your codebase and your ad platform.
  • The approach works best for small-scale advertisers running 1-5 campaigns at $30-100/day, not enterprise accounts managing hundreds of campaigns.
  • Limitations are real but manageable — large page snapshots, scroll quirks, and lack of real-time alerts mean this complements rather than replaces the native UI for every use case.

Table of Contents


Google Ads is one of those products that punishes you for not being a full-time specialist.

The UI has dozens of navigation items. Campaign settings are buried three clicks deep. You need to cross-reference GA4 data streams, conversion goals, audience segments, keyword planners, and bid strategies — each living in a different part of the interface. One misconfigured conversion goal and your entire campaign optimizes toward nothing.

I'm a developer, not a media buyer. But I need to run ads. So I found a different way.

I manage my Google Ads campaigns from the terminal using Claude Code.


What Claude Code Actually Is

For the uninitiated: Claude Code is Anthropic's CLI tool for Claude. It runs in your terminal, has access to your filesystem, can execute shell commands, and — critically — can control a browser through Playwright via the Model Context Protocol (MCP).

That last part changes everything.

It means Claude can navigate to ads.google.com, read your campaign dashboards, click through settings, fill forms, pull reports, and make changes. All while you describe what you want in plain English.

You talk. It clicks.


The Workflow

Here's what a typical session looks like. I open my terminal, launch Claude Code, and say something like:

"Check my Google Ads campaign performance for the last 7 days"

Claude opens a browser, navigates to Google Ads, reads the campaign overview, and comes back with a structured summary — impressions, clicks, CTR, cost, conversions, top keywords, search terms, device breakdown. All formatted in a clean table in my terminal.

No clicking through tabs. No squinting at charts. No accidentally changing a setting while trying to read a metric.

When I want to make changes, same flow:

"Add these negative keywords to the campaign: job seeker, career advice, resume template, free hiring"

Claude navigates to the negative keywords section, adds them one by one, saves. Done. What would take me 2-3 minutes of clicking takes one sentence.


Campaign Setup: The Hard Part Made Conversational

Terminal vs Google Ads UI

Setting up a Google Ads campaign from scratch is where this really shines.

The traditional process involves at least 15 steps across multiple tools:

  1. Open Keyword Planner and research keywords
  2. Export keywords to a spreadsheet
  3. Organize keywords into ad groups by theme
  4. Write ad copy (headlines + descriptions) for each ad group
  5. Set keyword match types (broad, phrase, exact)
  6. Configure audience targeting
  7. Choose a bid strategy (manual CPC, maximize conversions, target CPA, etc.)
  8. Add negative keywords to filter irrelevant traffic
  9. Set up conversion tracking in GA4
  10. Link GA4 to Google Ads
  11. Configure location targeting
  12. Set an ad schedule
  13. Review everything
  14. Publish

That's 14 steps across 4 different tools, and I'm being conservative.

With Claude Code, I did this conversationally:

Me: "I want to run a Search campaign targeting B2B buyers in the US. Set a daily budget, weekdays only, business hours."

Claude: Researches keywords, suggests groupings, writes ad copy, and presents a complete campaign structure for review — before touching the Google Ads UI.

Me: "Looks good. Exclude countries outside our target market. Add negative keywords for job seekers, students, and free tools."

Claude: Opens the browser, creates the campaign step by step, configures every setting, adds all negative keywords, sets up the schedule, publishes.

The entire campaign — from blank slate to live — took one conversation. Not one afternoon. One conversation.


Conversion Tracking: Where AI Agents Earn Their Keep

Conversion tracking pipeline

Conversion tracking is where most non-specialists mess up Google Ads. It's also where Claude Code adds the most value.

The chain is: User clicks ad → lands on your site → performs an action (sign up, purchase, demo request) → that action fires a GA4 event → GA4 marks it as a key event → Google Ads imports it as a conversion → campaign optimizes toward it.

That's seven links, and every single one is a potential failure point. A mismatched measurement ID between your gtag.js snippet and your GA4 property. A key event that's marked correctly in GA4 but never imported into Google Ads. A cross-domain redirect that drops the gclid parameter. Google's own documentation on conversion tracking covers setup, but debugging a broken chain requires jumping between your codebase, GA4 admin, Google Ads settings, and browser dev tools.

If any link in that chain breaks, your campaign burns money optimizing toward nothing. And Google Ads won't clearly tell you which link is broken.

In my case, Claude Code helped me:

  1. Audit the GA4 setup — navigated to GA4 admin, checked data streams, verified the measurement ID matched what was deployed on the site
  2. Fix a misconfigured conversion goal — found that a key event wasn't being imported into Google Ads, walked through the import flow
  3. Set up cross-domain tracking — configured GA4 to track users across marketing site and app subdomain
  4. Verify the frontend tags — read the actual source code to confirm the right gtag.js snippet was firing

That last point is key. Claude Code can read your source code AND navigate the Google Ads UI in the same conversation. It bridges the gap between your codebase and your marketing platform. No other tool does this.


Monitoring: The Daily Check-In

Every few days I run a status check. The conversation goes:

"Pull up the Google Ads campaign overview. Show me clicks, cost, CTR, top keywords, and search terms."

Claude opens the browser, navigates to the campaign, scrolls through the overview cards, and gives me a structured report:

MetricValue
Impressionsxxx
Clicksxx
CTRxx%
Cost$xx.xx
Avg CPC$x.xx
Conversionsx

Plus keyword-level and search term breakdowns, device splits, location data.

From this, I can make quick decisions:

  • "That search term doesn't match our audience. Add it as a negative keyword."
  • "One keyword is eating most of the budget. Should we pause it and redistribute?"
  • "Too many mobile clicks for a B2B product. Let's adjust device bid modifiers."

Each decision is a sentence. Claude executes it. No tab-switching, no "are you sure" modals, no accidentally clicking the wrong campaign.


What Doesn't Work (Yet)

Let's be honest about the limitations.

Snapshots can be huge. Google Ads pages are complex. Sometimes the page accessibility snapshot exceeds Claude's context limits. Screenshots help, but you lose the ability to interact with specific elements.

Ad blocker conflicts. If you have an ad blocker, Google Ads throws a persistent dialog that Claude needs to dismiss every time. Minor, but annoying.

Complex scrolling. Some Google Ads and GA4 pages have nested scrollable containers. Standard scroll commands don't work — you need to identify the specific scrollable div. Claude figures this out, but it takes a few attempts.

Speed. Browser automation is slower than direct API access. Each action takes a few seconds of navigation and rendering. For bulk operations across 50 campaigns — say, updating bids on 200 ad groups — you'd want the Google Ads API with proper scripting. For managing 1-5 campaigns with a handful of ad groups each, the browser approach is perfectly fine.

No real-time alerts. This is a pull model. You ask, Claude checks. It doesn't proactively notify you if your campaign runs out of budget or a keyword spikes in cost.


Why Not Just Use the Google Ads API?

Fair question. Google provides a full REST API for programmatic campaign management. If you're an engineer, why not script everything directly?

Three reasons:

  1. Setup overhead is significant. The Google Ads API requires OAuth 2.0 credentials, a developer token (which needs approval from Google), and linking a manager account. The authentication flow alone involves creating a Google Cloud project, configuring consent screens, and handling token refresh. For a developer running two campaigns, that's hours of setup for a workflow you'll use a few times a month.

  2. The API has a steep learning curve. Google Ads uses GAQL (Google Ads Query Language) for data retrieval and has a deeply nested resource hierarchy — customers, campaigns, ad groups, ads, keywords, each with their own set of mutate operations. The SDK is powerful but verbose. A simple "pause this keyword" operation requires constructing a KeywordView resource name, building a GoogleAdsRow, and issuing a mutate request.

  3. You lose the visual verification. With the browser approach, Claude can see exactly what the Google Ads UI shows — including warnings, recommendations, policy violations, and approval statuses that aren't always straightforward to query via API.

The browser approach trades raw speed for accessibility. For small advertisers, that's the right trade.


Why This Actually Matters

The Google Ads interface is designed for specialists who live in it 8 hours a day. It's optimized for power users who manage dozens of campaigns across multiple accounts.

Most founders, developers, and small teams don't need that. They need to run one or two campaigns well.

The traditional options are:

  • Learn the UI yourself — realistic, but you're looking at weeks of ramp-up time and ongoing context-switching between your actual product work and ad management.
  • Hire an agency — typical retainers for Google Ads management run $1,000-5,000/month for small accounts. That's hard to justify when you're spending $1,000-3,000/month on ads themselves.
  • Use a simplified SaaS tool — platforms like Optmyzr or WordStream abstract away the complexity, but they also hide the controls you actually need when something goes wrong.

Claude Code is a fourth option: keep all the control of the native Google Ads UI, but interact with it through conversation instead of clicks. You make the strategic decisions. The AI handles the mechanical execution.

It's not replacing a media buyer for complex multi-million dollar accounts. But for a developer running $30-100/day in search ads? It's a better workflow than anything else I've tried.


The Setup

If you want to try this:

  1. Install Claude Code — Anthropic's CLI tool. You need a Claude Max subscription ($100/month) or API access. Install via npm install -g @anthropic-ai/claude-code.
  2. Enable the Playwright MCP server — this gives Claude browser control. Add the Playwright MCP server to your Claude Code config. Claude will be able to open browsers, navigate pages, click elements, and read page content.
  3. Log into Google Ads in the browser — Claude launches a Chromium instance and uses your existing session cookies. No API keys, no OAuth flows, no Google Ads API credentials.
  4. Start talking — describe what you want in plain English. Claude navigates, reads the UI, executes actions, and reports back.

Tips for Better Results

  • Be specific with date ranges — say "last 7 days" or "February 1-15" rather than "recently."
  • Ask Claude to summarize before acting — have it read and describe the current state before making changes. This gives you a chance to course-correct.
  • Use screenshots when snapshots fail — if a Google Ads page is too complex for the accessibility snapshot, ask Claude to take a screenshot instead. You lose element-level interaction but gain visual context.
  • Keep sessions focused — one campaign per conversation works better than trying to manage everything at once. The context window stays cleaner.

The barrier to entry is remarkably low. The value is remarkably high.


Terminal cursor blinking

I spent years learning complex UIs because there was no alternative. Now I describe what I want in English and an AI agent handles the clicking. This isn't the future of marketing ops. It's already here.

Badal Satyarthi
Badal Satyarthi
AI Consultant

AI Consultant. 9+ years building production AI. Previously Chief Data Scientist at recruitRyte. IIT Dhanbad.