DashForDevsDocs
DocsNewsAPI v1
dashfordevs.comSign in

© 2026 DashForDevs

DocsNewsdashfordevs.comLegalStatus
DocsAnalytics & TrackingPostHog
Introduction
Getting Started
Authentication
Products
Categories
Cart
Checkout
Blog
Reviews
Webhooks
Customers
Orders
Inventory
Shipping
Discounts
Affiliates
Email
Media & Files
Analytics & Tracking
Storefront ViewsGoogle Analytics (GA4)PostHogUTM TrackingConversion FunnelThoughtMetricFirst-Party Analytics (Insights)
Locations
Tax
Global Data
SEO
Error Handling
Geography
Finance
Automations
Page Types
Surveys
Billing & Subscriptions
Storefront Payments
SDK Reference
REST API
Storefront Architecture
Notifications
Security
Team & Permissions
Migrations & Import
Calendar & Appointments
Contact Forms
AI Bots
Dashboard API
Deployment
Changelog
Troubleshooting
Recipes
CLI & Deployment
Image Pipeline
White-label Platforms
Records Engine
Platform Modules
Platform Security
Site Keys & Client Sites
Use Cases
Operations

PostHog

PostHog analytics integration.

Updated March 29, 2026

On this page
  • Overview
  • Setup
  • Automatic Integration
  • Debug Mode
  • Next Steps

Overview

PostHog provides product analytics, session recordings, feature flags, and A/B testing. DashForDevs integrates natively with PostHog for detailed storefront analytics.

Setup

  1. Create a PostHog project at posthog.com
  2. Copy your project API key
  3. Go to Settings → Analytics in the dashboard
  4. Paste your PostHog API key
  5. Save

Automatic Integration

The SDK's tracking module automatically sends events to PostHog when configured:

typescript
import dash from "@/lib/dash"

// Initialize tracking (loads PostHog automatically)
await dash.tracking.init()

// All tracking events go to PostHog
dash.tracking.capture("viewed_product", { product: "Blue Dream" })
dash.tracking.identify("cust_abc123", { email: "customer@example.com" })

Debug Mode

typescript
// Show debug overlay
dash.tracking.debug()

Next Steps

  • Storefront Views — Built-in view tracking
  • UTM Tracking — Campaign attribution
PreviousGoogle Analytics (GA4)NextUTM Tracking

On this page

  • Overview
  • Setup
  • Automatic Integration
  • Debug Mode
  • Next Steps