agentleFS
fourteenwmfourteenwm/ppc-ai-skills/ga4-lead-quality-investigation/SKILL.md

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

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
  1. Distinctive:

    Type: Read-only investigation skill.

    line 11
  2. Distinctive:

    Do this BEFORE collecting any data.

    line 47
  3. Distinctive:

    Run a campaign-settings query against the Google Ads API to capture current configuration:

    line 96
  4. Distinctive:

    Use the companion skill's recommendation structure template for each action.

    line 183
  5. Distinctive:

    Create a comprehensive markdown document using the Background → Analysis → Conclusions framework (EXACTLY 3 sections per the companion …

    line 210
  6. Distinctive:

    Every finding in the Analysis section must include a "What We Looked At:" attribution showing the data source.

    line 212
  7. Distinctive:

    Stop early: if Step 1 data collection fails or returns insufficient volume (<20 conversions in date range)

    line 220
  8. Distinctive:

    Deep dive: if bot traffic detected (Framework 3 + 4 red flags) — investigate user agents, IP patterns, form submission timing

    line 221
  9. Distinctive:

    Pivot: if geographic issues dominate (Framework 2 red flag) — cross-reference with targeting settings before recommending fixes

    line 222
  10. Distinctive:

    Expand date range: if low conversion volume prevents pattern detection

    line 223
  11. Distinctive:

    All 5 domain-knowledge companion skills auto-invoked at the start

    line 458
  12. Distinctive:

    All 5 pattern analysis frameworks applied with specific findings

    line 459
  13. Distinctive:

    All recommendations verified against current settings (no redundant suggestions)

    line 461

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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.py ships as a reference implementation in the sibling ga4-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:

  1. ga4-cross-analysis — Data collection from GA4 and Google Ads APIs (structured JSON output)
  2. lead-quality-pattern-analysis — Red flag detection frameworks (5 frameworks: landing pages, geo, devices, time, user behavior)
  3. ga4-campaign-cross-reference — Hypothesis → Verification → Finding methodology for discrepancy identification
  4. lead-quality-recommendation-prioritization — 3-tier priority system (Immediate / Medium / Long-term) and recommendation templates
  5. client-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-analysis companion 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:

FrameworkFocusRed Flag Examples
1. Landing Page DistributionHigh-intent vs low-intent pages>50% from blog/informational
2. Geographic DistributionConversion locations vs target marketConversions outside target geo, VPN indicators
3. Device & Browser PatternsBot indicatorsAndroid Webview >50%, 100% mobile, unusual UAs
4. Time PatternsHourly conversion distribution1-4 AM peaks >20%, exact intervals
5. User BehaviorEngagement metrics100% 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):

  1. Geographic: GA4 shows wrong cities BUT targeting correct → IP geolocation issue (NOT a targeting fix)
  2. Landing pages: GA4 shows blog traffic BUT no URL exclusions → configuration gap (FIX)
  3. Devices: GA4 shows bots BUT no placement exclusions → missing safeguards (FIX)
  4. Time: GA4 shows 1-4 AM peak BUT no ad scheduling → consider restricting hours
  5. 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:

  1. Verified — confirmed as not already implemented (per Step 4)
  2. Specific — exact steps, not generic advice
  3. Prioritized — clear timeline
  4. 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:

  1. 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 sibling ga4-cross-analysis skill at ../ga4-cross-analysis/scripts/query_campaign_settings.py — use it directly rather than writing your own.
  2. 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 from google-ads.yaml)
  • GA4 Data API access via google-analytics-data (service account JSON)
  • Account registry for CID lookups (your accounts.json or equivalent)
  • GA4 property registry for property ID lookups (your ga4_properties.json or 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:

  1. All 5 domain-knowledge companion skills auto-invoked at the start
  2. All 5 pattern analysis frameworks applied with specific findings
  3. Root cause identified using hypothesis → verification → finding methodology
  4. All recommendations verified against current settings (no redundant suggestions)
  5. Recommendations structured using the 3-tier priority system with specific steps
  6. "What Was Ruled Out" documented with evidence
  7. Background → Analysis → Conclusions framework followed (exactly 3 sections)
  8. "What We Looked At" attribution on every Analysis finding
  9. 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:

SkillWhen
ga4-cross-analysisStep 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-analysisStep 2 — the 5 red-flag detection frameworks and severity classification
ga4-campaign-cross-referenceSteps 4 and 6 — hypothesis → verification → finding, and the "What Was Ruled Out" template
lead-quality-recommendation-prioritizationStep 5 — the 3-tier priority system and recommendation templates
client-communication-standardsStep 7 — Background → Analysis → Conclusions formatting for the deliverable

Install all five alongside this skill for full functionality.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.