ad-copy-writer
Generate ad copy variations for Google, Microsoft, Meta, LinkedIn, TikTok, Reddit, Snapchat and X Ads (plus Apple Search Ads…
Google Ads Scripts Reference — JavaScript automation, AdsApp object model, selectors, GAQL queries, 10+ working script patterns, MCC parallel processing, Sheets integration
Claude Code
$ npx -y skills add cognyai/claude-code-marketing-skills --skill google-ads-scripts --agent claude-code
Codex
$ npx skills add cognyai/claude-code-marketing-skills --skill google-ads-scripts -a codex -y
Cursor
$ npx skills add cognyai/claude-code-marketing-skills --skill google-ads-scripts -a cursor -y
Gemini CLI
$ npx skills add cognyai/claude-code-marketing-skills --skill google-ads-scripts -a gemini-cli -y
GitHub Copilot
$ npx skills add cognyai/claude-code-marketing-skills --skill google-ads-scripts -a github-copilot -y
OpenCode
$ npx skills add cognyai/claude-code-marketing-skills --skill google-ads-scripts -a opencode -y
Windsurf
$ npx skills add cognyai/claude-code-marketing-skills --skill google-ads-scripts -a windsurf -y
name: google-ads-scripts description: Google Ads Scripts Reference — JavaScript automation, AdsApp object model, selectors, GAQL queries, 10+ working script patterns, MCC parallel processing, Sheets integration version: "1.1.1" author: Cogny AI platforms: [] user-invocable: true argument-hint: "<script pattern or topic>" allowed-tools: - WebSearch - Read - Write - Bash # Google Ads tools (when connected via Cogny MCP) - mcp__cogny__list_integrations - mcp__cogny__refresh_mcp_discovery - mcp__cogny__mcp__Google_Ads__tool_execute_gaql - mcp__cogny__mcp__Google_Ads__tool_get_gaql_doc - mcp__cogny__mcp__Google_Ads__tool_get_reporting_view_doc - mcp__cogny__mcp__Google_Ads__tool_list_accessible_accounts - mcp__cogny__get_script_sdk_reference - mcp__cogny__mcp__Bing_Ads__tool_get_report
Complete reference for Google Ads Scripts: JavaScript automation within Google Ads, AdsApp object model, selectors and iterators, GAQL queries, common script patterns with working code, Google Sheets integration, MCC parallel processing, and best practices.
Full docs: https://cogny.com/docs/google-ads-scripts
/google-ads-scripts # Full overview /google-ads-scripts budget pacing # Budget pacing monitor script /google-ads-scripts negative keywords # Search term negative keyword miner /google-ads-scripts quality score tracker # Quality score logging to Sheets /google-ads-scripts MCC parallel # MCC parallel processing pattern /google-ads-scripts selectors # Selector and iterator patterns /google-ads-scripts GAQL # GAQL queries in scripts /google-ads-scripts anomaly detection # Anomaly alerting script
You are a Google Ads Scripts expert. Use this reference to help users write, debug, and optimize Google Ads Scripts. Provide complete, working code with proper error handling and best practices.
When the user asks a question, find the relevant section below and provide precise, actionable answers with ready-to-use JavaScript code.
If the user provides a specific topic as an argument, focus on that area. Otherwise, provide an overview of capabilities and common patterns.
Key principles:
If Cogny isn't connected, skip this and note what connecting adds.
`mcp__cogny__mcp__Google_Ads__tool_execute_gaql` before pasting it into the Scripts UI.
`mcp__cogny__get_script_sdk_reference`, then `mcp__cogny__create_script` / `mcp__cogny__create_automation` (writes: not pre-approved, ask first). Anything that writes to the account asks first.
check its API before porting. For reads, `mcp__cogny__mcp__Bing_Ads__tool_get_report` covers the same campaign, keyword and search-query data.
---
Google Ads Scripts let you programmatically control Google Ads using JavaScript. Scripts run directly inside the Google Ads web interface — no external server, API keys, or OAuth needed.
**Key capabilities:**
**Single-account vs MCC scripts:**
| Feature | Single-Account | MCC Script | |---------|---------------|------------| | Scope | One account | All accounts under MCC | | Entry point | `main()` | `main()` with `AdsManagerApp` | | Execution limit | 30 minutes | 60 minutes | | Parallel execution | No | Yes, `executeInParallel()` |
**Language:** Scripts run on the V8 runtime (ECMAScript 6+), so modern JavaScript works: `let`/`const`, arrow functions, template literals, destructuring, `class`. No `import`/`export` or npm modules, and Ads services (`AdsApp`, `UrlFetchApp`, `SpreadsheetApp`) are synchronous, so `async`/`await` buys nothing. The examples below use ES5-style `var`, which also runs fine.
**Dates:** `Utilities.formatDate()` doesn't use the account's time zone by default. Always pass `AdsApp.currentAccount().getTimeZone()`, or "today" and "yesterday" can be off by a day versus the account's reporting.
The `AdsApp` object is the root of all single-account operations.
AdsApp +-- campaigns() | +-- adGroups() | | +-- ads() | | +-- keywords() | | +-- audiences() | +-- extensions() +-- adGroups() (account-level shortcut) +-- ads() (account-level shortcut) +-- keywords() (account-level shortcut) +-- negativeKeywords() +-- shoppingCampaigns() +-- videoCampaigns() +-- labels() +-- budgets() +-- biddingStrategies()
// Status
entity.isEnabled()
entity.isPaused()
entity.isRemoved()
entity.enable()
entity.pause()
entity.remove()
// Naming
entity.getName()
entity.setName('New Name')
// Stats (requires date range)
entity.getStatsFor('LAST_30_DAYS')
entity.getStatsFor('20250101', '20250131')
// Stats object methods
var stats = entity.getStatsFor('LAST_30_DAYS');
stats.getImpressions()
stats.getClicks()
stats.getCtr()
stats.getAverageCpc()
stats.getCost()
stats.getConversions()
stats.getConversionRate()Every entity collection uses the
AI marketing skills for Claude Code, Cursor, Windsurf, and other AI coding tools. Audit SEO, analyze ads, research competitors, qualify leads — all from your terminal. Free skills need no account. Premium skills connect your real data for $9/mo.
Generate ad copy variations for Google, Microsoft, Meta, LinkedIn, TikTok, Reddit, Snapchat and X Ads (plus Apple Search Ads…
Enforce a pre-declared evidence bar on every ad — after it spends enough, pause it if it misses (e.g. CTR < 1% or cost per lead…
Build a portable brand-kit.json for the user's product — colors, typography, voice — that other skills (video, ad creative,…
Find accounts where something just happened that creates demand — funding, hiring, new locations, launches, rising ad engagement…
Give every campaign an ID and carry it everywhere — allocate IDs, audit ad/email/UTM naming across Google, Meta, LinkedIn, Bing,…
Re-read every lost deal in your CRM (HubSpot, Pipedrive or Upsales; Salesforce via the CRM layer) with its calls, meetings and…
When the user wants to plan, design, or implement an A/B test or experiment, or build a growth experimentation program. Also use…
Comprehensive SEO analysis for any website or business type. Full site audits, single-page analysis, technical SEO (crawlability,…
Turn the current project website into a short, polished, shareable launch video using Hyperframes. Use when someone says "/brag",…
Full website GEO+SEO audit with parallel subagent delegation. Orchestrates a comprehensive Generative Engine Optimization audit…