From 6ea97443deb0f716249928beef4558dbe81b0a07 Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Fri, 3 Oct 2025 13:33:48 +0300 Subject: [PATCH] docs: improved analytics and tracking (#13671) * docs: improved analytics and tracking * remove detailed feedback component * remove ignore build script for api reference * improvements * fix pathname --- .../components/DetailedFeedback/index.tsx | 83 ------------ .../components/Feedback/index.tsx | 23 ++++ .../Operation/DescriptionSection/index.tsx | 11 +- .../components/Tags/Section/index.tsx | 10 +- .../api-reference/instrumentation-client.ts | 7 + www/apps/api-reference/markdown/admin.mdx | 35 +---- www/apps/api-reference/markdown/store.mdx | 39 +----- www/apps/api-reference/package.json | 1 + www/apps/api-reference/providers/index.tsx | 2 - www/apps/api-reference/vercel.json | 3 +- www/apps/book/instrumentation-client.ts | 7 + www/apps/book/package.json | 1 + www/apps/book/providers/index.tsx | 2 - www/apps/cloud/instrumentation-client.ts | 7 + www/apps/cloud/package.json | 1 + www/apps/cloud/providers/index.tsx | 2 - www/apps/resources/instrumentation-client.ts | 7 + www/apps/resources/package.json | 1 + www/apps/resources/providers/index.tsx | 2 - www/apps/ui/instrumentation-client.ts | 7 + www/apps/ui/package.json | 1 + www/apps/ui/providers/index.tsx | 2 - www/apps/user-guide/instrumentation-client.ts | 7 + www/apps/user-guide/package.json | 1 + www/apps/user-guide/providers/index.tsx | 2 - www/packages/docs-ui/package.json | 2 +- .../docs-ui/src/components/Feedback/index.tsx | 45 ++++--- .../docs-ui/src/components/Rating/index.tsx | 16 ++- .../Sidebar/Top/MedusaMenu/index.tsx | 98 -------------- .../docs-ui/src/providers/Analytics/index.tsx | 122 ++++++++++-------- .../src/providers/LearningPath/index.tsx | 32 +++-- www/yarn.lock | 16 ++- 32 files changed, 214 insertions(+), 381 deletions(-) delete mode 100644 www/apps/api-reference/components/DetailedFeedback/index.tsx create mode 100644 www/apps/api-reference/components/Feedback/index.tsx create mode 100644 www/apps/api-reference/instrumentation-client.ts create mode 100644 www/apps/book/instrumentation-client.ts create mode 100644 www/apps/cloud/instrumentation-client.ts create mode 100644 www/apps/resources/instrumentation-client.ts create mode 100644 www/apps/ui/instrumentation-client.ts create mode 100644 www/apps/user-guide/instrumentation-client.ts delete mode 100644 www/packages/docs-ui/src/components/Sidebar/Top/MedusaMenu/index.tsx diff --git a/www/apps/api-reference/components/DetailedFeedback/index.tsx b/www/apps/api-reference/components/DetailedFeedback/index.tsx deleted file mode 100644 index be37ae727b..0000000000 --- a/www/apps/api-reference/components/DetailedFeedback/index.tsx +++ /dev/null @@ -1,83 +0,0 @@ -"use client" - -import { useState } from "react" -import { Label, TextArea, useAnalytics, useModal, ModalFooter } from "docs-ui" - -const DetailedFeedback = () => { - const [improvementFeedback, setImprovementFeedback] = useState("") - const [positiveFeedback, setPositiveFeedback] = useState("") - const [additionalFeedback, setAdditionalFeedback] = useState("") - const { loaded, track } = useAnalytics() - const { closeModal } = useModal() - - return ( - <> -
-
- -