Make capturing according to serverless

This commit is contained in:
2025-07-06 20:23:54 +03:00
parent 1e099d88ae
commit 963ac7111f
6 changed files with 31 additions and 19 deletions

View File

@@ -82,7 +82,7 @@ export default defineOAuthStravaEventHandler({
user: userPayload,
});
posthog.identify({
posthog.identifyImmediate({
distinctId: String(user!.id),
properties: {
name: user!.name,
@@ -90,7 +90,7 @@ export default defineOAuthStravaEventHandler({
},
});
posthog.capture({
posthog.captureImmediate({
distinctId: String(user!.id),
event: "user logged in",
});