name: revenue-intelligence
description: "Extract insights from Gong sales calls, build revenue attribution models, and generate client reports. Use when asked to "analyze sales calls", "revenue attribution", "Gong insights", "client report", "prove content ROI", or "sales call analysis"."
description_zh: "收入归因分析,销售通话洞察与客户报告自动生成"
description_en: "Revenue attribution, sales call insights, and automated client report generation"
version: 1.0.0
homepage: https://github.com/ericosiu/ai-marketing-skills
AI Revenue Intelligence
Preamble (runs on skill start)
python3 telemetry/version_check.py 2>/dev/null || true
python3 telemetry/telemetry_init.py 2>/dev/null || true
Privacy: This skill logs usage locally to ~/.ai-marketing-skills/analytics/. Remote telemetry is opt-in only. No code, file paths, or repo content is ever collected. See telemetry/README.md.
AI-powered revenue intelligence: sales call insight extraction, content-to-revenue attribution, and multi-source client reporting.
When to Use
- User wants to extract insights from Gong sales call transcripts
- User needs to identify objections, buying signals, or competitive mentions in calls
- User wants to prove content ROI by mapping content to closed deals
- User needs revenue attribution across first-touch and multi-touch models
- User wants to generate a unified client report from GA4 + HubSpot + Ahrefs + Gong
- User asks about content gaps in the buyer journey
- User needs anomaly detection across marketing metrics
Tools
Gong-to-Insight Pipeline (gong_insight_pipeline.py)
Extracts structured intelligence from sales call transcripts. Works with Gong API or plain transcript files.
python gong_insight_pipeline.py --file transcript.txt
python gong_insight_pipeline.py --dir ./transcripts/
python gong_insight_pipeline.py --gong --days 7
python gong_insight_pipeline.py --gong --call-id abc123
python gong_insight_pipeline.py --file transcript.txt --output insights.json
python gong_insight_pipeline.py --dir ./transcripts/ --content-topics
python gong_insight_pipeline.py --file transcript.txt --follow-ups
What it extracts:
- Objections (categorized: pricing, timing, competition, authority, need)
- Buying signals (budget confirmed, timeline mentioned, decision maker engaged, champion identified)
- Competitive mentions (who was mentioned, context: positive/negative/neutral)
- Pricing discussions (anchors, pushback, willingness indicators)
- Content topic suggestions from recurring objection patterns
- Personalized follow-up drafts based on call context
Output: Structured JSON to stdout or file. Each call produces an insights object with objections, buying_signals, competitive_mentions, pricing_discussions, content_topics, and follow_ups arrays.
Revenue Attribution Mapper (revenue_attribution.py)
Maps content pieces to pipeline and closed revenue. Proves content ROI with first-touch and multi-touch attribution.
python revenue_attribution.py --report
python revenue_attribution.py --report --model first-touch
python revenue_attribution.py --report --model linear
python revenue_attribution.py --report --model time-decay
python revenue_attribution.py --report --start 2025-01-01 --end 2025-03-31
python revenue_attribution.py --cpa --costs content_costs.json
python revenue_attribution.py --gaps
python revenue_attribution.py --report --json --output attribution.json
What it produces:
- Content-to-revenue mapping (which blog posts, videos, podcasts drove deals)
- First-touch, linear, and time-decay attribution models
- Cost-per-acquisition by content type (blog, video, podcast, webinar)
- Content ROI report with revenue per piece
- Content gap analysis (funnel stages with no attribution)
- Top-performing content ranked by attributed revenue
Data sources: GA4 (page paths, sessions, conversions) + HubSpot (deals, touchpoints, close dates)
Multi-Source Client Report Generator (client_report_generator.py)
Generates unified client-ready BI reports from GA4, HubSpot, Ahrefs, and Gong.
python client_report_generator.py --client "Acme Corp"
python client_report_generator.py --client "Acme Corp" --start 2025-03-01 --end 2025-03-31
python client_report_generator.py --client "Acme Corp" --format markdown --output report.md
python client_report_generator.py --client "Acme Corp" --format json --output report.json
python client_report_generator.py --client "Acme Corp" --skip gong
python client_report_generator.py --client "Acme Corp" --skip ahrefs,gong
python client_report_generator.py --client "Acme Corp" --anomalies
python client_report_generator.py --client "Acme Corp" --compare previous-month
What it produces:
- Executive summary with key metrics and period-over-period changes
- Traffic section: sessions, users, top pages, channel breakdown (GA4)
- Pipeline section: deals created, moved, closed, revenue (HubSpot)
- SEO section: keyword rankings, backlinks, domain rating changes (Ahrefs)
- Call quality section: talk ratios, objection frequency, win rates (Gong)
- Anomaly flags: unusual spikes/drops with severity and context
- Output as structured markdown or JSON
Configuration
All scripts read from environment variables. Copy .env.example to .env and fill in your values.
Required Environment Variables
| Variable | Used By | Description |
|---|
GONG_API_KEY | Gong Pipeline, Client Report | Gong API access key |
GONG_API_BASE_URL | Gong Pipeline, Client Report | Gong API base URL |
HUBSPOT_API_KEY | Attribution, Client Report | HubSpot private app token |
GA4_PROPERTY_ID | Attribution, Client Report | GA4 property ID |
GA4_CREDENTIALS_JSON | Attribution, Client Report | Path to GA4 service account JSON |
Optional Environment Variables
| Variable | Used By | Description |
|---|
AHREFS_TOKEN | Client Report | Ahrefs API token |
OUTPUT_DIR | All | Directory for output files (default: ./output) |
Data Flow
Gong Transcripts → Insight Pipeline → Objections, Signals, Competitors → Content Topics + Follow-ups
GA4 + HubSpot → Attribution Mapper → Content ROI, CPA, Gap Analysis → Revenue Proof
GA4 + HubSpot + Ahrefs + Gong → Client Report → Executive Summary + Anomalies → Client Deliverable
Recommended Workflow
- Weekly: Run
gong_insight_pipeline.py --gong --days 7 to extract call intelligence
- Monthly: Run
revenue_attribution.py --report to prove content ROI
- Monthly: Run
client_report_generator.py for each client deliverable
- Quarterly: Run
revenue_attribution.py --gaps to find content gaps
- Ongoing: Feed Gong insight follow-ups into outbound sequences
Dependencies
pip install -r requirements.txt