ga4-lead-quality-investigation
Skill72 starsChanged 4 months agoMITView on GitHub
Investigate Google Ads lead quality issues by cross-analyzing GA4 behavioral data with Google Ads campaign settings. Auto-invoke when user says "investigate [account] lead quality", "GA4 analysis for [campaign]", "why are [account] leads low quality", or mentions no-shows, missing phone numbers, or bot traffic. Applies 5 red-flag frameworks, hypothesis-driven cross-reference verification, and 3-tier prioritized recommendations. Read-only — no mutations.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- Vibha-Ramprakash/automate-google-adsword for word, first seen Sep 14, 2026
Other versions1 project uses a version of this.
Word for word · 1
- Vibha-Ramprakash/automate-google-ads★ 0100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository41 other files it gives its agents.
- account-diagnosticSkill
- ad-copy-generation-frameworkSkill
- ad-copy-verification-standardSkill
- add-account-negative-keywordsSkill
- ads-checkerSkill
- budget-guardianSkill
- budget-recommendation-calculatorSkill
- change-history-checkerSkill
- client-communication-standardsSkill
- competitor-analysis-v2Skill
- conversion-tracking-healthSkill
- dgen-automation-disableSkill
- fair-housing-complianceSkill
- ga4-campaign-cross-referenceSkill
- ga4-cross-analysisSkill
- gaql-query-patternsSkill
- geo-conflict-analyzerSkill
- google-ads-api-setupSkill
- google-ads-querySkill
- google-ads-samplesSkill
- impression-share-diagnosticsSkill
- investigation-methodologySkill
- lead-quality-pattern-analysisSkill
- lead-quality-recommendation-prioritizationSkill
- markdown-to-sheets-presenterSkill
- mcc-hack-auditSkill
- mutation-safetySkill
- neg-conflict-finderSkill
- non-serving-keyword-scannerSkill
- pmax-asset-automationSkill
- pmax-builderSkill
- portfolio-health-prioritizationSkill
- portfolio-pacing-rulesSkill
- rsa-bulk-editSkill
- rsa-refreshSkill
- rsa-single-accountSkill
- shared-budget-updaterSkill
- sqr-classifierSkill
- sqr-pipelineSkill
- underspending-investigationSkill
- youtube-placement-auditSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. About 0 are common, 13 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈13
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
Type: Read-only investigation skill.
- Distinctive: line 47
Do this BEFORE collecting any data.
- Distinctive: line 96
Run a campaign-settings query against the Google Ads API to capture current configuration:
- Distinctive: line 183
Use the companion skill's recommendation structure template for each action.
- Distinctive: line 210
Create a comprehensive markdown document using the Background → Analysis → Conclusions framework (EXACTLY 3 sections per the companion …
- Distinctive: line 212
Every finding in the Analysis section must include a "What We Looked At:" attribution showing the data source.
- Distinctive: line 220
Stop early: if Step 1 data collection fails or returns insufficient volume (<20 conversions in date range)
- Distinctive: line 221
Deep dive: if bot traffic detected (Framework 3 + 4 red flags) — investigate user agents, IP patterns, form submission timing
- Distinctive: line 222
Pivot: if geographic issues dominate (Framework 2 red flag) — cross-reference with targeting settings before recommending fixes
- Distinctive: line 223
Expand date range: if low conversion volume prevents pattern detection
- Distinctive: line 458
All 5 domain-knowledge companion skills auto-invoked at the start
- Distinctive: line 459
All 5 pattern analysis frameworks applied with specific findings
- Distinctive: line 461
All recommendations verified against current settings (no redundant suggestions)
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
GA4 Lead Quality Investigation
Purpose: Investigate why a Google Ads campaign is generating low-quality leads (no-shows, missing contact info, bot traffic, geographic mismatches) by cross-analyzing GA4 behavioral data with Google Ads campaign settings and producing prioritized recommendations.
Type: Read-only investigation skill. Reads GA4 + Google Ads data and writes an analysis document; never writes to Google Ads.
What This Skill Deliberately Does NOT Do
- Mutate anything. It is read-only — it writes an analysis document and never touches Google Ads.
- Own the methods. The 5 frameworks, formulas, and templates live in the companion skills it auto-loads (see "Auto-Load Domain Knowledge Skills"); this file sequences them into the 7-step protocol.
- Ship the collector scripts.
query_campaign_settings.pyships as a reference implementation in the siblingga4-cross-analysis(../ga4-cross-analysis/scripts/query_campaign_settings.py); the GA4 query scripts are environment-specific and yours to implement (see "Script Contract"). - Execute the fixes. It produces prioritized recommendations; applying them is downstream and mutation-gated.
Inputs
The skill expects:
{CUSTOMER_ID}— Google Ads customer ID (e.g.,1234567890){CAMPAIGN_NAME}— exact campaign name (e.g.,Example Property - Pmax){GA4_PROPERTY}— GA4 property ID (e.g.,123456789){CONVERSION_EVENT}— GA4 event to analyze (e.g.,book_tour,submit_lead_form){ISSUE_DESCRIPTION}— what the user is experiencing (e.g., "leads are no-shows", "phone numbers missing"){DATE_RANGE}(optional) — defaults to last 14 days
Auto-Load Domain Knowledge Skills
CRITICAL: At the start of every investigation, auto-invoke these companion skills via the Skill tool to load the frameworks, formulas, and templates:
ga4-cross-analysis— Data collection from GA4 and Google Ads APIs (structured JSON output)lead-quality-pattern-analysis— Red flag detection frameworks (5 frameworks: landing pages, geo, devices, time, user behavior)ga4-campaign-cross-reference— Hypothesis → Verification → Finding methodology for discrepancy identificationlead-quality-recommendation-prioritization— 3-tier priority system (Immediate / Medium / Long-term) and recommendation templatesclient-communication-standards— Background → Analysis → Conclusions report formatting with "What We Looked At" attribution
Do this BEFORE collecting any data. All five companion skills are shipped as standalone skills in this repo.
Investigation Protocol
Step 1: Data Collection
Reference skill: ga4-cross-analysis
Auto-invoke the ga4-cross-analysis companion skill to collect:
- Google Ads side: campaign performance + campaign settings (geo targeting, bid strategy, URL exclusions, negative keywords, audience signals, placement exclusions, ad scheduling)
- GA4 side: conversion summary, landing pages, user segments (cities, devices, browsers, hourly distribution), engagement metrics
The companion skill returns structured JSON. Document:
- Data collection timestamp
- Date range analyzed
- Any data quality warnings (e.g., low conversion volume, missing events)
Implementation note: The underlying data collection scripts are environment-specific — they call the Google Ads API and GA4 Data API against your accounts and properties. The
ga4-cross-analysiscompanion skill documents the data contract; you adapt the scripts to your own infrastructure (credentials, customer IDs, GA4 property IDs).
Step 2: Pattern Analysis (5 Frameworks)
Reference skill: lead-quality-pattern-analysis
Apply all 5 analysis frameworks from the companion skill:
| Framework | Focus | Red Flag Examples |
| 1. Landing Page Distribution | High-intent vs low-intent pages | >50% from blog/informational |
| 2. Geographic Distribution | Conversion locations vs target market | Conversions outside target geo, VPN indicators |
| 3. Device & Browser Patterns | Bot indicators | Android Webview >50%, 100% mobile, unusual UAs |
| 4. Time Patterns | Hourly conversion distribution | 1-4 AM peaks >20%, exact intervals |
| 5. User Behavior | Engagement metrics | 100% new users, session duration <10s, 1 page/session |
Severity classification (from companion skill decision tree):
- Severe Quality Issues — >3 red flags detected
- Moderate Quality Concerns — 1-2 red flags detected
- Configuration Issues — 0 red flags but poor performance
Step 3: Campaign Settings Verification
Run a campaign-settings query against the Google Ads API to capture current configuration:
python ../ga4-cross-analysis/scripts/query_campaign_settings.py {CUSTOMER_ID} "{CAMPAIGN_NAME}"(This reference script ships in the ga4-cross-analysis companion — see "Script Contract" below.)
Document ALL settings:
- Location targeting and exclusions (radius, presence vs interest)
- Audience signals
- URL exclusions (content exclusions)
- Negative keywords
- Bidding strategy and targets
- Asset groups and final URLs
- Ad scheduling (day parting)
- Placement exclusions
This becomes the "what is currently configured" baseline for Step 4.
Step 4: Cross-Reference Analysis (Hypothesis → Verification → Finding)
Reference skill: ga4-campaign-cross-reference
For each red flag from Step 2, apply the companion skill's verification methodology. The core principle is: never assume GA4 data indicates a settings problem without verification.
Verification template (from companion skill):
### Hypothesis: {What GA4 data suggests}
**Verification Method:**
1. Check {specific campaign setting}
2. Review {additional data source}
**Finding:** Already implemented / Not implemented / Partially implemented
**Evidence:** {Specific setting value or data point}
**Conclusion:** {GAP TO FIX / NO ACTION NEEDED / DATA ANOMALY}Common cross-references (from companion skill):
- Geographic: GA4 shows wrong cities BUT targeting correct → IP geolocation issue (NOT a targeting fix)
- Landing pages: GA4 shows blog traffic BUT no URL exclusions → configuration gap (FIX)
- Devices: GA4 shows bots BUT no placement exclusions → missing safeguards (FIX)
- Time: GA4 shows 1-4 AM peak BUT no ad scheduling → consider restricting hours
- Audience: GA4 shows low engagement BUT no audience signals → targeting too broad
Step 5: Prioritize Recommendations (3-Tier Framework)
Reference skill: lead-quality-recommendation-prioritization
Apply the companion skill's 3-tier priority framework:
IMMEDIATE (Today):
- Quick wins (<1 hour, no approvals)
- Critical fixes addressing root cause
- Examples: URL exclusions for blog, mobile app placement exclusions, negative keywords
MEDIUM (This Week):
- Requires testing or client approval
- Strategic changes (bidding, audience signals, ad scheduling)
- Examples: conversion value rules, audience signal addition, day-parting
LONG-TERM (This Month):
- Strategic initiatives, requires development or multiple approvals
- Examples: offline conversion tracking, dedicated landing pages, CRM integration
Every recommendation must be:
- Verified — confirmed as not already implemented (per Step 4)
- Specific — exact steps, not generic advice
- Prioritized — clear timeline
- Measurable — expected impact quantified when possible
Anti-pattern: "Improve targeting" (vague). Correct: "Add /community/* to URL exclusions (not currently configured) — expected to reduce blog-page conversions by ~75%"
Use the companion skill's recommendation structure template for each action.
Step 6: Document What Was Ruled Out
Reference skill: ga4-campaign-cross-reference
For each hypothesis that did NOT become a recommendation, document why using the companion skill's "What Was Ruled Out" template:
### {Hypothesis}
**Initial Hypothesis:** {What we thought}
**Verification Method:** {How we checked}
**Finding:** Already implemented / Not applicable / Data anomaly
**Evidence:** {Specific data or settings}This prevents redundant recommendations and demonstrates thoroughness.
Step 7: Generate Analysis Document
Reference skill: client-communication-standards
Create a comprehensive markdown document using the Background → Analysis → Conclusions framework (EXACTLY 3 sections per the companion skill).
Every finding in the Analysis section must include a "What We Looked At:" attribution showing the data source.
Adaptive Investigation
The skill is NOT required to run all steps. Use judgment:
- Stop early if Step 1 data collection fails or returns insufficient volume (<20 conversions in date range)
- Deep dive if bot traffic detected (Framework 3 + 4 red flags) — investigate user agents, IP patterns, form submission timing
- Pivot if geographic issues dominate (Framework 2 red flag) — cross-reference with targeting settings before recommending fixes
- Expand date range if low conversion volume prevents pattern detection
Worked Example (Synthetic)
Inputs: Lindenmoor Apartments, customer ID 1234567890, campaign "Lindenmoor - Pmax", GA4 property 123456789, event book_tour, issue "tour bookings are no-shows," last 14 days.
Steps 1-2 (collect + patterns): 50 book_tour conversions. Red flags across the frameworks:
- Framework 1 (Landing pages): 34/50 (68%) landed on
/blog/*— informational, not property pages. - Framework 3 (Devices): 37/50 (74%) Android WebView (in-app browser).
- Framework 4 (Time): 21/50 (42%) converted 1-4 AM.
- Framework 5 (User behavior): 50/50 (100%) new users.
Four red flags → Severe (>3).
Steps 3-4 (verify → finding):
- Hypothesis: blog traffic is converting. Verification: checked URL exclusions — none configured. Finding: CONFIGURATION GAP — add
/blog/*to content exclusions. - Ruled out: GA4 shows out-of-area cities, but location targeting is correct with a tight radius → IP geolocation artifact, so no targeting change.
Step 5 (prioritize): IMMEDIATE — add /blog/* URL exclusions (addresses 68% of conversions) and exclude mobile-app inventory. MEDIUM — add in-market audience signals to tighten targeting. Expected impact: removing the blog and in-app traffic should cut the low-intent conversions driving the no-shows.
Tools Used
- Skill — Auto-invoke 5 domain-knowledge companion skills (CRITICAL — use at start)
- Read — Access existing reports, scripts, account/property reference files
- Write — Create analysis document
- Bash — Execute campaign-settings and GA4 query scripts
- Grep / Glob — Find prior analyses, related scripts, account references
Script Contract
The skill relies on two classes of script:
query_campaign_settings.py— given a customer ID and campaign name, returns campaign configuration (geo targeting, URL exclusions, bid strategy, audience signals, ad scheduling, placement exclusions). A working reference implementation ships in the siblingga4-cross-analysisskill at../ga4-cross-analysis/scripts/query_campaign_settings.py— use it directly rather than writing your own.- GA4 query scripts — given a GA4 property ID, campaign name, conversion event, and date range, return: conversion summary, landing pages, user segments (city / device / browser / hour), engagement metrics. These are environment-specific — you implement them against your own infrastructure.
Both live where your Google Ads credentials, GA4 service account, account registry, and property registry live. This repo documents the data contract each must satisfy.
Reference implementation hooks:
- Google Ads API access via
google-ads-python(loads credentials fromgoogle-ads.yaml) - GA4 Data API access via
google-analytics-data(service account JSON) - Account registry for CID lookups (your
accounts.jsonor equivalent) - GA4 property registry for property ID lookups (your
ga4_properties.jsonor equivalent)
Output Format
Return findings using the Background → Analysis → Conclusions framework:
# {Account} {Campaign} — GA4 Lead Quality Analysis & Recommendations
**Date:** {Analysis Date}
**Campaign:** {Full Campaign Name}
**Customer ID:** {CID}
**GA4 Property:** {Property ID}
**Analysis Period:** {Date Range}
---
## Background
{Client concern — what they're seeing/experiencing}
{Investigation scope — what we analyzed and why}
{2-3 paragraphs maximum}
---
## Analysis
### Pattern Analysis Findings (5 Frameworks)
**What We Looked At:** Output of ga4-cross-analysis companion skill, {N} conversions over {date_range}
**Red Flags Detected:** {Count from lead-quality-pattern-analysis companion skill}
#### Framework 1: Landing Page Distribution ({N} conversions)
| Category | Conversions | % of Total | Top Examples |
|----------|-------------|------------|--------------|
| {Category} | {Count} | {%} | {Examples} |
**Red Flag Assessment:** {Apply Framework 1 thresholds from companion skill}
**Finding:** {Key insight}
#### Framework 2: Geographic Distribution
| Location | Conversions | Users | Notes |
|----------|-------------|-------|-------|
| {City} | {Count} | {Users} | {From Framework 2} |
**Red Flag Assessment:** {Apply Framework 2 thresholds}
**Finding:** {Key insight}
#### Framework 3: Device & Browser Analysis
| Device/Browser | Conversions | % | Bot Indicator? |
|----------------|-------------|---|----------------|
| {Device} | {Count} | {%} | {From Framework 3} |
**Red Flag Assessment:** {Apply Framework 3 thresholds}
**Finding:** {Key insight}
#### Framework 4: Time Patterns
| Hour | Conversions | % | Red Flag? |
|------|-------------|---|-----------|
| {Hour} | {Count} | {%} | {From Framework 4} |
**Red Flag Assessment:** {Apply Framework 4 thresholds}
**Finding:** {Key insight}
#### Framework 5: User Behavior
- **New vs Returning:** {Ratio}
- **Avg Session Duration:** {Duration}
- **Pages per Session:** {Pages}
**Red Flag Assessment:** {Apply Framework 5 thresholds}
**Finding:** {Key insight}
**Severity Classification:** {Severe / Moderate / Configuration}
---
### Campaign Settings Verification
**What We Looked At:** Output of `query_campaign_settings.py` for campaign {NAME}
- **Location Targeting:** {Settings}
- **URL Exclusions:** {Current exclusions or "None"}
- **Negative Keywords:** {Count and themes}
- **Audience Signals:** {Current signals}
- **Placement Exclusions:** {Current exclusions or "None"}
- **Ad Scheduling:** {Current schedule or "None"}
- **Bidding Strategy:** {Strategy + target}
---
### Cross-Reference Analysis (Hypothesis → Verification → Finding)
**What We Looked At:** GA4 pattern data + campaign settings
#### Hypothesis 1: {Name}
**GA4 Data Suggests:** {Observation}
**Campaign Settings Show:** {Configuration}
**Verification:** {How we checked}
**Finding:** {Gap to fix / Already configured / Data anomaly}
**Evidence:** {Specific settings or data}
{Repeat for each hypothesis}
---
### What Was Ruled Out
**What We Looked At:** Same data sources as above, applied to refuted hypotheses
#### {Hypothesis}
**Initial Hypothesis:** {What we thought}
**Verification Method:** {How we checked}
**Finding:** Already implemented / Not applicable
**Evidence:** {Specific data or settings}
---
## Conclusions
### Root Cause
{Primary issue identified via cross-reference analysis}
### Comprehensive Recommendations
#### IMMEDIATE ACTIONS (Implement Today)
##### 1. {Action Name}
- **Current State:** {What exists now}
- **Recommendation:** {Specific change}
- **Implementation Steps:**
1. {Step 1}
2. {Step 2}
- **Expected Impact:** {Quantified if possible}
#### MEDIUM-TERM ACTIONS (This Week)
##### 1. {Action Name}
{Use companion skill template}
#### LONG-TERM STRATEGIES (This Month)
##### 1. {Strategy Name}
{Use companion skill template}
### Implementation Timeline
| Week | Actions | Priority | Owner | Status |
|------|---------|----------|-------|--------|
| Week 1 | {Actions} | High | {Owner} | Pending |
| Week 2-3 | {Actions} | Medium | {Owner} | Pending |
| Week 4+ | {Actions} | Low | {Owner} | Pending |
### Success Metrics & Monitoring
**Primary KPIs:**
1. {Metric} — Current: {Value} — Target: {Goal}
2. {Metric} — Current: {Value} — Target: {Goal}
**Monitoring Frequency:** {Daily / Weekly}
**Review Date:** {Date for follow-up}
**Confidence Level:** {High / Medium / Low}Success Criteria
Investigation is successful if:
- All 5 domain-knowledge companion skills auto-invoked at the start
- All 5 pattern analysis frameworks applied with specific findings
- Root cause identified using hypothesis → verification → finding methodology
- All recommendations verified against current settings (no redundant suggestions)
- Recommendations structured using the 3-tier priority system with specific steps
- "What Was Ruled Out" documented with evidence
- Background → Analysis → Conclusions framework followed (exactly 3 sections)
- "What We Looked At" attribution on every Analysis finding
- Implementation timeline and success metrics defined
Important Notes
- Auto-invoke companion skills FIRST — load all 5 frameworks before analyzing data
- Be autonomous — don't ask permission at each step, just investigate
- Be data-driven — every conclusion references specific GA4 data or campaign settings
- Be specific — "Add
/community/*to URL exclusions" not "improve targeting" - Be honest about uncertainty — flag low-volume scenarios (<20 conversions) and acknowledge data quality limits
- Verify before recommending — Step 4 cross-reference prevents recommending fixes that are already in place
- Document evidence — every finding includes the data source + specific values
- Document the analysis period clearly (last 7, 14, or 30 days)
Invocation Patterns
Inline (single campaign, manual):
"Use the ga4-lead-quality-investigation skill to investigate Customer ID 1234567890, campaign 'Example Property - Pmax', GA4 property 123456789, event 'book_tour'. Issue: leads are no-shows."
Parallel orchestration (when investigating multiple campaigns):
An orchestrator can launch N parallel Task(subagent_type="general-purpose", …) calls in a single message, each invoking this skill against one campaign. Parallelism + per-investigation context isolation are preserved at the Task layer.
When to Load Other Skills
This skill auto-loads all five companions at the start of every investigation (see "Auto-Load Domain Knowledge Skills"). Each also ships standalone in this repo; here is which step each serves:
| Skill | When |
ga4-cross-analysis | Step 1 data collection — it assembles the GA4 + Google Ads dataset and ships the campaign-settings query this skill runs; this skill is its primary consumer |
lead-quality-pattern-analysis | Step 2 — the 5 red-flag detection frameworks and severity classification |
ga4-campaign-cross-reference | Steps 4 and 6 — hypothesis → verification → finding, and the "What Was Ruled Out" template |
lead-quality-recommendation-prioritization | Step 5 — the 3-tier priority system and recommendation templates |
client-communication-standards | Step 7 — Background → Analysis → Conclusions formatting for the deliverable |
Install all five alongside this skill for full functionality.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

