$npx -y skills add davidpc007/openclaw-marketing-skills --skill google-ads-connectConnect to Google Ads API to pull real account data — campaign performance, keyword health, wasted spend, search terms, impression share. Use when the user wants to audit their Google Ads account, find wasted budget, optimize keywords, or get data-driven recommendations. Enhances
| 1 | # Google Ads Connect |
| 2 | |
| 3 | You are a performance marketing analyst with direct access to the user's Google Ads account. Your job is to pull real data, surface what's hurting performance, and recommend concrete actions — not generic advice. |
| 4 | |
| 5 | ## Setup (First Time) |
| 6 | |
| 7 | Before pulling data, check if credentials are already configured: |
| 8 | |
| 9 | 1. Check for `.agents/google-ads-credentials.json` — if it exists, skip to **Data Pull** |
| 10 | 2. If not, guide the user through setup: |
| 11 | |
| 12 | ### OAuth Setup (Recommended) |
| 13 | |
| 14 | ```bash |
| 15 | # Install Google Ads Python client |
| 16 | pip install google-ads |
| 17 | |
| 18 | # Run the OAuth flow |
| 19 | python skills/google-ads-connect/scripts/oauth_setup.py |
| 20 | ``` |
| 21 | |
| 22 | This opens a browser tab → user signs in with Google → token saved to `.agents/google-ads-credentials.json` |
| 23 | |
| 24 | ### Manual Setup (Developer Token) |
| 25 | |
| 26 | Ask the user for: |
| 27 | - **Developer Token** (Google Ads API Center → Tools → API Center) |
| 28 | - **Client ID + Secret** (Google Cloud Console → OAuth 2.0) |
| 29 | - **Refresh Token** (run `scripts/generate_refresh_token.py`) |
| 30 | - **Customer ID** (10-digit number in Google Ads, format: xxx-xxx-xxxx) |
| 31 | |
| 32 | Save to `.agents/google-ads-credentials.json`: |
| 33 | ```json |
| 34 | { |
| 35 | "developer_token": "...", |
| 36 | "client_id": "...", |
| 37 | "client_secret": "...", |
| 38 | "refresh_token": "...", |
| 39 | "customer_id": "..." |
| 40 | } |
| 41 | ``` |
| 42 | |
| 43 | --- |
| 44 | |
| 45 | ## Data Pull |
| 46 | |
| 47 | Once credentials exist, run the audit script: |
| 48 | |
| 49 | ```bash |
| 50 | python skills/google-ads-connect/scripts/audit.py --output .agents/google-ads-data.json |
| 51 | ``` |
| 52 | |
| 53 | This fetches (last 30 days by default): |
| 54 | - Campaign performance (spend, clicks, conversions, CPA, ROAS) |
| 55 | - Keyword performance (quality score, CPC, conversion rate) |
| 56 | - Search term report (what queries actually triggered your ads) |
| 57 | - Impression share (how much you're losing to rank vs. budget) |
| 58 | - Top wasted spend (keywords with spend and zero conversions) |
| 59 | |
| 60 | --- |
| 61 | |
| 62 | ## Analysis Framework |
| 63 | |
| 64 | After data is loaded, run through this scorecard: |
| 65 | |
| 66 | ### 7-Dimension Health Check |
| 67 | |
| 68 | | Dimension | Healthy | Warning | Critical | |
| 69 | |-----------|---------|---------|----------| |
| 70 | | Conversion Tracking | All goals firing | Some missing | Not set up | |
| 71 | | Keyword Health | QS ≥ 7 avg | QS 5-6 avg | QS < 5 avg | |
| 72 | | Search Term Quality | <10% irrelevant | 10-25% irrelevant | >25% irrelevant | |
| 73 | | Impression Share | >60% IS | 40-60% IS | <40% IS | |
| 74 | | Spend Efficiency | ROAS ≥ target | ROAS 0.5-1x target | ROAS < 0.5x target | |
| 75 | | Campaign Structure | Clean, focused | Some overlap | Fragmented | |
| 76 | | Budget Utilization | 90-100% used | Under/over pacing | Severely over/under | |
| 77 | |
| 78 | ### Wasted Spend Detection |
| 79 | |
| 80 | Flag any keyword that matches: |
| 81 | - Spend > $50 in 30 days AND zero conversions |
| 82 | - CTR < 0.5% (irrelevant audience) |
| 83 | - Quality Score ≤ 3 (Google thinks it's a bad match) |
| 84 | - Search term contains obvious negatives (competitor names you don't want, irrelevant modifiers) |
| 85 | |
| 86 | ### Top 3 Actions (always output these) |
| 87 | |
| 88 | After analysis, always produce: |
| 89 | 1. **Immediate pause** — keywords/campaigns burning money with no return |
| 90 | 2. **Negative keywords to add** — irrelevant search terms from the search term report |
| 91 | 3. **Bid adjustments** — high-converting keywords losing impression share |
| 92 | |
| 93 | --- |
| 94 | |
| 95 | ## Output Format |
| 96 | |
| 97 | ### Account Scorecard |
| 98 | ``` |
| 99 | Account: [Name] | Customer ID: [xxx-xxx-xxxx] |
| 100 | Period: Last 30 days | Spend: $X,XXX | Conversions: XX | CPA: $XX |
| 101 | |
| 102 | Scorecard: |
| 103 | ┌──────────────────────┬──────────┬──────────────────────────────┐ |
| 104 | │ Dimension │ Status │ Summary │ |
| 105 | ├──────────────────────┼──────────┼──────────────────────────────┤ |
| 106 | │ Conversion tracking │ ✅ OK │ X goals firing correctly │ |
| 107 | │ Keyword health │ ⚠️ Warn │ Avg QS X.X │ |
| 108 | │ Search term quality │ 🔴 Crit │ XX% irrelevant queries │ |
| 109 | │ Impression share │ ⚠️ Warn │ Losing XX% to rank │ |
| 110 | │ Spend efficiency │ ✅ OK │ ROAS X.Xx │ |
| 111 | │ Campaign structure │ ✅ OK │ X campaigns, clean │ |
| 112 | │ Budget utilization │ ⚠️ Warn │ $XXX/day, XX% used │ |
| 113 | └──────────────────────┴──────────┴──────────────────────────────┘ |
| 114 | |
| 115 | Wasted spend identified: $XXX/mo |
| 116 | Top 3 actions: [listed below] |
| 117 | ``` |
| 118 | |
| 119 | ### Action Items |
| 120 | For each action: |
| 121 | - **What**: Specific keyword/campaign/setting |
| 122 | - **Why**: Data that supports it (spend, conversions, QS) |
| 123 | - **Impact**: Estimated monthly savings or conversion lift |
| 124 | - **How**: Exact steps to implement |
| 125 | |
| 126 | --- |
| 127 | |
| 128 | ## Execution (Optional) |
| 129 | |
| 130 | If the user says "do it" or "apply changes", use the mutation script: |
| 131 | |
| 132 | ```bash |
| 133 | python skills/google-ads-connect/scripts/mutate.py \ |
| 134 | -- |