From eead9b07b3d6a26b84946cdf51dfe53ff26a2665 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Thu, 7 Oct 2021 12:15:05 +0100 Subject: [PATCH] fix user ping event --- packages/server/src/api/controllers/analytics.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/server/src/api/controllers/analytics.js b/packages/server/src/api/controllers/analytics.js index e6e5d6a748..0c0761840e 100644 --- a/packages/server/src/api/controllers/analytics.js +++ b/packages/server/src/api/controllers/analytics.js @@ -21,9 +21,12 @@ exports.endUserPing = async ctx => { return } - posthogClient.capture("budibase:end_user_ping", { - userId: ctx.user && ctx.user._id, - appId: ctx.appId, + posthogClient.capture({ + event: "budibase:end_user_ping", + distinctId: ctx.user && ctx.user._id, + properties: { + appId: ctx.appId, + }, }) ctx.body = {