From b5015b82c21a285bad866d2277282b7f1ad19c8a Mon Sep 17 00:00:00 2001 From: Alf Eaton Date: Thu, 17 Oct 2024 14:31:09 +0100 Subject: [PATCH] Move Hotjar to the editor page (#21132) GitOrigin-RevId: efb2c7841af76084566341b6c5f0afac9a965331 --- services/web/app/src/Features/Project/ProjectController.js | 1 + .../web/app/src/Features/StaticPages/HomeController.mjs | 7 ------- services/web/frontend/js/pages/ide.tsx | 1 + services/web/frontend/js/pages/marketing/homepage.js | 1 - 4 files changed, 2 insertions(+), 8 deletions(-) diff --git a/services/web/app/src/Features/Project/ProjectController.js b/services/web/app/src/Features/Project/ProjectController.js index 1c8f73d242..e152a60f10 100644 --- a/services/web/app/src/Features/Project/ProjectController.js +++ b/services/web/app/src/Features/Project/ProjectController.js @@ -340,6 +340,7 @@ const _ProjectController = { 'write-and-cite', 'write-and-cite-ars', 'default-visual-for-beginners', + 'hotjar', 'spell-check-client', ].filter(Boolean) diff --git a/services/web/app/src/Features/StaticPages/HomeController.mjs b/services/web/app/src/Features/StaticPages/HomeController.mjs index 30304ae7e4..a7cd8e42c4 100644 --- a/services/web/app/src/Features/StaticPages/HomeController.mjs +++ b/services/web/app/src/Features/StaticPages/HomeController.mjs @@ -6,7 +6,6 @@ import ErrorController from '../Errors/ErrorController.js' import SessionManager from '../Authentication/SessionManager.js' import { expressify } from '@overleaf/promise-utils' import logger from '@overleaf/logger' -import SplitTestHandler from '../SplitTests/SplitTestHandler.js' const __dirname = new URL('.', import.meta.url).pathname @@ -35,12 +34,6 @@ async function home(req, res) { page: req.path, }) - try { - await SplitTestHandler.promises.getAssignment(req, res, 'hotjar') - } catch { - // do nothing - } - res.render('external/home/website-redesign/index') } else { res.redirect('/login') diff --git a/services/web/frontend/js/pages/ide.tsx b/services/web/frontend/js/pages/ide.tsx index 37abd93008..a939504790 100644 --- a/services/web/frontend/js/pages/ide.tsx +++ b/services/web/frontend/js/pages/ide.tsx @@ -1,5 +1,6 @@ import '../utils/webpack-public-path' // configure dynamically loaded assets (via webpack) to be downloaded from CDN import '../infrastructure/error-reporter' // set up error reporting, including Sentry +import '../infrastructure/hotjar' // set up Hotjar import ReactDOM from 'react-dom' import IdeRoot from '@/features/ide-react/components/ide-root' diff --git a/services/web/frontend/js/pages/marketing/homepage.js b/services/web/frontend/js/pages/marketing/homepage.js index 47a368ec97..47b0e7e55e 100644 --- a/services/web/frontend/js/pages/marketing/homepage.js +++ b/services/web/frontend/js/pages/marketing/homepage.js @@ -1,5 +1,4 @@ import '../../marketing' -import '../../infrastructure/hotjar' // set up Hotjar function homepageAnimation(homepageAnimationEl) { function createFrames(word, { buildTime, holdTime, breakTime }) {