posthog-deploy-integration

Featured

Deploy PostHog to Vercel, Docker (self-hosted), and Cloud Run. Covers Next.js reverse proxy, server-side capture in edge functions, self-hosted PostHog setup, and platform-specific environment configuration. Trigger: "deploy posthog", "posthog Vercel", "posthog production deploy", "posthog Cloud Run", "posthog self-hosted", "posthog Docker".

DevOps & Infrastructure 2,266 stars 315 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# PostHog Deploy Integration ## Overview Deploy PostHog analytics to production platforms. Covers Next.js with Vercel (reverse proxy, server-side capture, edge functions), self-hosted PostHog with Docker, and Google Cloud Run deployment patterns. ## Prerequisites - PostHog project API key (`phc_...`) - PostHog personal API key (`phx_...`) for server features - Platform CLI installed (`vercel`, `docker`, or `gcloud`) ## Instructions ### Step 1: Next.js + Vercel Deployment ```bash set -euo pipefail # Set environment variables in Vercel vercel env add NEXT_PUBLIC_POSTHOG_KEY production # phc_... (public) vercel env add NEXT_PUBLIC_POSTHOG_HOST production # /ingest (if using proxy) vercel env add POSTHOG_PERSONAL_API_KEY production # phx_... (server-only) vercel env add POSTHOG_PROJECT_ID production # Project ID number ``` ```typescript // next.config.js — Reverse proxy to bypass ad blockers module.exports = { async rewrites() { return [ { source: '/ingest/static/:path*', destination: 'https://us-assets.i.posthog.com/static/:path*', }, { source: '/ingest/:path*', destination: 'https://us.i.posthog.com/:path*', }, ]; }, }; ``` ```typescript // app/providers.tsx — Client-side PostHog with proxy 'use client'; import posthog from 'posthog-js'; import { PostHogProvider } from 'posthog-js/react'; import { useEffect } from 'react'; export function PHProvider({ children }: { children: React.R...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

posthog-ci-integration

Configure PostHog CI/CD with GitHub Actions: unit tests with mocked PostHog, integration tests against a dev project, and deployment annotations. Trigger: "posthog CI", "posthog GitHub Actions", "posthog automated tests", "CI posthog", "posthog pipeline".

2,266 Updated today
jeremylongshore
AI & Automation Featured

posthog-prod-checklist

Production readiness checklist for PostHog integrations: SDK configuration, graceful degradation, health checks, shutdown hooks, and rollback procedures. Trigger: "posthog production", "deploy posthog", "posthog go-live", "posthog launch checklist", "posthog production ready".

2,266 Updated today
jeremylongshore
Web & Frontend Solid

integration-nextjs-app-router

PostHog integration for Next.js App Router applications

359 Updated today
majiayu000
AI & Automation Featured

posthog-install-auth

Install and configure PostHog SDKs with authentication. Use when setting up posthog-js (browser), posthog-node (server), or configuring API keys for a new PostHog integration. Trigger: "install posthog", "setup posthog", "posthog auth", "configure posthog API key", "posthog init".

2,266 Updated today
jeremylongshore
AI & Automation Featured

posthog-reference-architecture

Production PostHog architecture: event taxonomy, SDK layering, feature flag strategy, analytics module layout, and data pipeline integration patterns. Trigger: "posthog architecture", "posthog best practices", "posthog project structure", "how to organize posthog", "posthog design".

2,266 Updated today
jeremylongshore