Skip to content

Commit dc55a27

Browse files
msukkariclaude
andcommitted
feat(web): add PostHog events for user creation and Ask GitHub login wall
- Add `wa_user_created` event fired on successful user sign-up - Add `wa_askgh_login_wall_prompted` event fired when an unauthenticated user attempts to ask a question on Ask GitHub and is shown the login modal - Add debug logging to server-side PostHog event capture Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ac42507 commit dc55a27

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

packages/web/src/app/[domain]/askgh/[owner]/[repo]/components/landingPage.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import type { IdentityProviderMetadata } from "@/lib/identityProviders";
1414
import { Descendant, Transforms } from "slate";
1515
import { useSlate } from "slate-react";
1616
import { useCallback, useEffect, useMemo, useState, useRef } from "react";
17+
import { captureEvent } from "@/hooks/useCaptureEvent";
1718

1819
const PENDING_MESSAGE_KEY = "askgh_pending_message";
1920

@@ -55,6 +56,7 @@ export const LandingPage = ({
5556
// Intercept submit to check auth status
5657
const handleSubmit = useCallback((children: Descendant[]) => {
5758
if (!isAuthenticated) {
59+
captureEvent('wa_askgh_login_wall_prompted', {});
5860
// Store message in sessionStorage to survive OAuth redirect
5961
sessionStorage.setItem(PENDING_MESSAGE_KEY, JSON.stringify(children));
6062
setIsLoginModalOpen(true);

packages/web/src/lib/posthogEvents.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,8 @@ export type PosthogEventMap = {
231231
userId: string,
232232
},
233233
//////////////////////////////////////////////////////////////////
234+
wa_askgh_login_wall_prompted: {},
235+
//////////////////////////////////////////////////////////////////
234236
wa_demo_docs_link_pressed: {},
235237
wa_demo_search_example_card_pressed: {
236238
exampleTitle: string,

0 commit comments

Comments
 (0)