Cover image for project: PostHog IN PROGRESS

Technical summary

PostHog for NEXUS mirrors core track_event calls to PostHog's Capture API with 9 configurable events, pseudonymized distinct IDs via SHA-256+workspace salt, 3-layer property sanitization, and read-only access to PostHog dashboards, event definitions, and feature flags via Personal API Key. Configuration lives in admin_configs (zero MySQL tables), with automatic credential sync every 12h via cronjob, US/EU/custom host resolution, and a 4-tab Alpine.js UI with connection test and event toggles. Feature flags remain managed in NEXUS core (feature_flag() / Analytics → Flags).

Executed scope

  • plugin.php (51 lines): tab registered under "SEO & Marketing" with activity icon, doc, after_track_event filter, and 8 API actions.
  • backend.php (850 lines): host resolution (US/EU/custom), posthog_capture() with 8s curl timeout, posthog_api_get() with Bearer token, posthog_sync_project_credentials() (auto-imports Project ID + API Key from Personal API), property sanitization, stats counters, cron posthog_cron_check() with 12h throttle.
  • tab.php (499 lines): Alpine.js 4-tab UI (Dashboards, Events, Flags PH, Configuration), orange theme, connection test button, event toggle pills, masked API key inputs, KPI cards (today forwarded, total, capture/API status).
  • cli.php (20 lines): CLI entrypoint for hub cronjob sync.
  • cronjob.json: posthog_sync job with tick: true, runs posthog_sync_project_credentials().
  • fastr.json: /posthog slash command returning stats via posthog_stats.
  • doc.md (64 lines): author's technical documentation (PT).
  • icon.svg: PostHog hedgehog brand icon.

GitHub progress (issues)

Real-time panel with latest repository issues.

abertas (amostra): -- fechadas (amostra): -- base: -- ultimas issues

carregando andamento...

Real results

Server-side integration between NEXUS and PostHog: core events mirrored via Capture API with 9 configurable events, workspace-pseudonymized distinct IDs, 3-layer property sanitization and read-only access to dashboards, event definitions and feature flags — configuration in admin_configs with zero MySQL tables.

Architecture and organization

Execution and operations

The project follows reproducible execution flow with technical validation in production-like environments.

Screenshots

Talk about this project

Apply this implementation pattern in your environment and accelerate delivery with technical consistency.