From 6575da7d994166cf81ac54b31f695362eac90892 Mon Sep 17 00:00:00 2001 From: Dmitry S Date: Sat, 20 Jan 2024 11:31:07 -0500 Subject: [PATCH] (core) Add event for thumbsUp/thumbsDown ratings for HelpCenter articles Summary: This corresponding change in HelpCenter will report this event: https://github.com/gristlabs/grist-help/pull/303 Test Plan: Tested locally that the telemetry event is received by the server and logged. Reviewers: georgegevoian Reviewed By: georgegevoian Differential Revision: https://phab.getgrist.com/D4168 --- app/common/Telemetry.ts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/app/common/Telemetry.ts b/app/common/Telemetry.ts index f007b897..ce696078 100644 --- a/app/common/Telemetry.ts +++ b/app/common/Telemetry.ts @@ -401,6 +401,30 @@ export const TelemetryContracts: TelemetryContracts = { }, }, }, + ratedHelpCenterArticle: { + category: 'HelpCenter', + description: 'Sent by HelpCenter when user clicks thumbs-up or thumbs-down', + minimumTelemetryLevel: Level.full, + retentionPeriod: 'indefinitely', + metadataContracts: { + url: { + description: 'The URL of the visited page.', + dataType: 'string', + }, + rating: { + description: 'Feedback from user ("thumbsUp" or "thumbsDown")', + dataType: 'string', + }, + userId: { + description: 'The id of the user that triggered this event.', + dataType: 'number', + }, + altSessionId: { + description: 'A random, session-based identifier for the user that triggered this event.', + dataType: 'string', + }, + }, + }, documentCreated: { description: 'Triggered when a document is created.', minimumTelemetryLevel: Level.limited, @@ -1414,6 +1438,7 @@ export const TelemetryEvents = StringUnion( 'beaconArticleViewed', 'beaconEmailSent', 'beaconSearch', + 'ratedHelpCenterArticle', 'documentCreated', 'documentForked', 'documentOpened',