From google-ads-scripts
Automates Google Ads campaigns using JavaScript AdsApp API for campaign management, keyword bidding, performance reporting, budget control, and optimization rules.
npx claudepluginhub henkisdabro/wookstar-claude-plugins --plugin google-ads-scriptsThis skill uses the workspace's default tool permissions.
Guidance for developing Google Ads Scripts using the AdsApp API. Automate campaign management, bid optimisation, performance reporting, and bulk operations through JavaScript running in the Google Ads editor.
Manages Google Ads: performance analysis, keywords, bids, budgets, negatives, campaigns, ads, search terms, QS, location targeting, bulk operations. Activates on Google Ads, CPA, ROAS, ad spend mentions.
Query, audit, and optimize Google Ads campaigns via google-ads Python SDK for bulk API operations or browser automation on ads.google.com without API access.
Pulls Google Ads campaign, keyword, and conversion data via REST API using GAQL queries to generate performance reports. Useful for ad spend, ROAS, quality score analysis.
Share bugs, ideas, or general feedback.
Guidance for developing Google Ads Scripts using the AdsApp API. Automate campaign management, bid optimisation, performance reporting, and bulk operations through JavaScript running in the Google Ads editor.
Manage campaigns programmatically - creation, modification, status changes, bulk updates. Use AdsApp.campaigns() with conditions to filter by status, budget, name patterns, or type. Apply labels for organisation.
Automate keyword targeting and bid adjustments based on performance. Filter by quality score, adjust max CPC bids based on ROAS/CPA targets, add/remove negative keywords, and implement bid optimisation algorithms.
Generate custom reports using campaign, ad group, keyword, and ad statistics. Retrieve metrics for custom date ranges, calculate derived metrics (CTR, CPC, conversion rate), and export data to Google Sheets.
Control spending and allocate budgets across campaigns. Get/set daily campaign budgets, monitor spend against thresholds, pause campaigns when limits are reached, and distribute budgets based on performance.
Build intelligence into campaign management with automated decision-making. Pause low-performing keywords, increase bids for high-performers, adjust budgets based on day-of-week patterns.
Implement robust error handling for API limits, quota issues, and runtime errors. Use try-catch blocks, null checks, sheet-based logging for audit trails. Be aware of the 30-minute execution limit.
The most common pattern - pause keywords with low quality scores and high spend:
function pauseLowQualityKeywords() {
const keywords = AdsApp.keywords()
.withCondition('keyword.status = ENABLED')
.withCondition('keyword.quality_info.quality_score < 4')
.withCondition('keyword.metrics.cost > 100000000')
.get();
let count = 0;
while (keywords.hasNext()) {
keywords.next().pause();
count++;
}
Logger.log(`Paused ${count} low-quality keywords`);
}
.withCondition() instead of filtering in JavaScript.withLimit() and batch processing for large accounts (30-min timeout)See references/best-practices.md for detailed code examples of each practice.
Use the validation scripts in scripts/ for pre-deployment checks:
Common issues:
.withLimit() or process in batchesUse Logger.log() for debugging - view logs via View > Logs in the script editor.
Load these on demand for detailed documentation: