From 341d012ceafe7e6f079f92dff1d765cf3aec2af9 Mon Sep 17 00:00:00 2001 From: Alf Eaton Date: Mon, 10 Jan 2022 13:59:22 +0000 Subject: [PATCH] Remove paywall-prompt event tracking from compile controller (#6241) GitOrigin-RevId: cab36fd1f2a79166c39b801a29155f1ef64edc00 --- .../frontend/js/features/pdf-preview/util/compiler.js | 4 ++++ .../web/frontend/js/shared/context/compile-context.js | 9 +-------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/services/web/frontend/js/features/pdf-preview/util/compiler.js b/services/web/frontend/js/features/pdf-preview/util/compiler.js index b188704633..3c60b75d58 100644 --- a/services/web/frontend/js/features/pdf-preview/util/compiler.js +++ b/services/web/frontend/js/features/pdf-preview/util/compiler.js @@ -100,6 +100,10 @@ export default class DocumentCompiler { const compileTimeClientE2E = performance.now() - t0 const { firstRenderDone } = trackPdfDownload(data, compileTimeClientE2E) this.setFirstRenderDone(() => firstRenderDone) + + // unset the error before it's set again later, so that components are recreated and events are tracked + this.setError(undefined) + data.options = options if (data.clsiServerId) { this.clsiServerId = data.clsiServerId diff --git a/services/web/frontend/js/shared/context/compile-context.js b/services/web/frontend/js/shared/context/compile-context.js index b78723c42e..9551e34f76 100644 --- a/services/web/frontend/js/shared/context/compile-context.js +++ b/services/web/frontend/js/shared/context/compile-context.js @@ -12,11 +12,7 @@ import useScopeValueSetterOnly from '../hooks/use-scope-value-setter-only' import usePersistedState from '../hooks/use-persisted-state' import useAbortController from '../hooks/use-abort-controller' import DocumentCompiler from '../../features/pdf-preview/util/compiler' -import { - send, - sendMB, - sendMBSampled, -} from '../../infrastructure/event-tracking' +import { send, sendMBSampled } from '../../infrastructure/event-tracking' import { buildLogEntryAnnotations, handleOutputFiles, @@ -273,9 +269,6 @@ export function CompileProvider({ children }) { 'editor-click-feature', 'compile-timeout' ) - sendMB('paywall-prompt', { - 'paywall-type': 'compile-timeout', - }) } break