Repository navigation
feat(cloud): PostHog analytics for trial conversion - #5825
Merged
Merged
Conversation
Cloud-only (IS_CLOUD). Server-side events for signup, trial, servers, deployments and Stripe billing; frontend identify/group and session replay limited to trial and no-plan users.
imrja8
approved these changes
Oct 31, 2026
1 of 3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds PostHog to Dokploy Cloud to understand why trials don't convert. Everything is gated by
IS_CLOUD; self-hosted loads and sends nothing.Server-side events
user_signed_up,trial_started,server_createdserver_setup_succeeded/failed,deployment_succeeded/failed(single hook inupdateDeploymentStatus)subscription_activated(checkout/trial_converted),trial_ended,subscription_canceledfrom the Stripe webhook. A trial cancelled because the customer paid through checkout is not counted as lost.$session_id(PostHogtracing_headersfor tRPC,onRequesthook for better-auth) so they link to the replay.Frontend
posthog-jsinitialized only whensettings.getPostHogConfigreturns a key (cloud).identifyby Dokploy user id +organizationgroup;reseton logout.getBillingStatusnow returnsisEnterpriseCloudto exclude those accounts.🤖 Generated with Claude Code


Confidence Score: 5/5
The reviewed changes appear safe to merge.Summary
Adds cloud-only PostHog events and trial session replay.
Reviews (2) · Last reviewed commit: "feat(tracking): enhance PostHog event ca..." · Reviewed by Greptile