hvac-marketing-skills/tools/integrations/posthog.md
bengizmo 1e70d8387b
Some checks failed
Sync Skills / sync (push) Has been cancelled
Validate Agent Skill / detect-changes (push) Has been cancelled
Validate Agent Skill / validate (push) Has been cancelled
feat: fork marketingskills → HVAC Marketing Skills for Compendium
- Forked from coreyhaines31/marketingskills v1.1.0 (MIT license)
- Removed 4 SaaS-only skills (churn-prevention, paywall-upgrade-cro, onboarding-cro, signup-flow-cro)
- Reworked 2 skills (popup-cro → hvac-estimate-popups, revops → hvac-lead-ops)
- Adapted all 28 retained skills with HVAC industry context and Compendium integration
- Created 10 new HVAC-specific skills:
  - hvac-content-from-data (flagship DB integration)
  - hvac-seasonal-campaign (demand cycle marketing)
  - hvac-review-management (GBP review strategy)
  - hvac-video-repurpose (long-form → social)
  - hvac-technical-content (audience-calibrated writing)
  - hvac-brand-voice (trade authenticity guide)
  - hvac-contractor-website-audit (discovery & analysis)
  - hvac-contractor-website-package (marketing package assembly)
  - hvac-compliance-claims (EPA/rebate/safety claim checking)
  - hvac-content-qc (fact-check & citation gate)
- Renamed product-marketing-context → hvac-marketing-context (global)
- Created COMPENDIUM_INTEGRATION.md (shared integration contract)
- Added Compendium wrapper tools (search, scrape, classify)
- Added compendium capability tags to YAML frontmatter
- Updated README, AGENTS.md, CLAUDE.md, VERSIONS.md, marketplace.json
- All 38 skills pass validate-skills.sh
- Zero dangling references to removed/renamed skills

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 21:05:49 -03:00

2.8 KiB

PostHog

Open-source product analytics with session replay and feature flags.

Capabilities

Integration Available Notes
API Capture API, Query API, Feature Flags API
MCP - Not available
CLI posthog CLI for local development
SDK JavaScript, Python, Ruby, Go, etc.

Authentication

  • Type: API Key (Personal or Project)
  • Header: Authorization: Bearer {api_key}
  • For capture: Project API Key in payload

Common Agent Operations

Capture event

POST https://app.posthog.com/capture/

{
  "api_key": "{project_api_key}",
  "event": "signup_completed",
  "distinct_id": "user_123",
  "properties": {
    "plan": "pro",
    "$current_url": "https://example.com/signup"
  }
}

Batch events

POST https://app.posthog.com/batch/

{
  "api_key": "{project_api_key}",
  "batch": [
    {"event": "pageview", "distinct_id": "user_1"},
    {"event": "signup", "distinct_id": "user_2"}
  ]
}

Get person by distinct_id

GET https://app.posthog.com/api/projects/{project_id}/persons/?distinct_id=user_123

Authorization: Bearer {api_key}

Query events (HogQL)

POST https://app.posthog.com/api/projects/{project_id}/query/

{
  "query": {
    "kind": "HogQLQuery",
    "query": "SELECT event, count() FROM events WHERE timestamp > now() - interval 7 day GROUP BY event ORDER BY count() DESC LIMIT 10"
  }
}

Get feature flag value

POST https://app.posthog.com/decide?v=3

{
  "api_key": "{project_api_key}",
  "distinct_id": "user_123"
}

Get insights

GET https://app.posthog.com/api/projects/{project_id}/insights/

Authorization: Bearer {api_key}

Get session recordings

GET https://app.posthog.com/api/projects/{project_id}/session_recordings/

Authorization: Bearer {api_key}

JavaScript SDK

// Initialize
posthog.init('PROJECT_API_KEY', {
  api_host: 'https://app.posthog.com'
});

// Identify user
posthog.identify('user_123', {
  email: 'user@example.com',
  plan: 'pro'
});

// Track event
posthog.capture('signup_completed', {
  method: 'email'
});

// Check feature flag
if (posthog.isFeatureEnabled('new-pricing')) {
  // Show new pricing
}

Key Features

  • Event tracking - Product analytics
  • Session replay - Watch user sessions
  • Feature flags - Control feature rollout
  • A/B testing - Built-in experiments
  • HogQL - SQL-like query language
  • Self-hostable - Run on your infrastructure

When to Use

  • Product analytics with privacy focus
  • Session replay for UX insights
  • Feature flag management
  • Self-hosted analytics needs
  • Open-source requirements

Rate Limits

  • Cloud: 10,000 events/second
  • Self-hosted: Unlimited

Relevant Skills

  • analytics-tracking
  • ab-test-setup