Răsfoiți Sursa

Remove paywall-prompt event tracking from compile controller (#6241)

GitOrigin-RevId: cab36fd1f2a79166c39b801a29155f1ef64edc00
Alf Eaton 4 ani în urmă
părinte
comite
341d012cea

+ 4 - 0
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

+ 1 - 8
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