diff --git a/unitylibs/core/workflow/workflow-acrobat/action-binder.js b/unitylibs/core/workflow/workflow-acrobat/action-binder.js index 30aac13..757e1a8 100644 --- a/unitylibs/core/workflow/workflow-acrobat/action-binder.js +++ b/unitylibs/core/workflow/workflow-acrobat/action-binder.js @@ -278,6 +278,7 @@ export default class ActionBinder { await this.dispatchErrorToast('verb_cookie_not_set', 200, 'Not all cookies found, redirecting anyway', true); await new Promise(r => setTimeout(r, 500)); } + this.block.dispatchEvent(new CustomEvent(unityConfig.trackAnalyticsEvent, { detail: { event: 'redirectComplete', data: this.redirectUrl } })); window.location.href = this.redirectUrl; } catch (e) { await this.showSplashScreen(); @@ -533,6 +534,7 @@ export default class ActionBinder { ), ); let assetData = null; + const startTime = new Date(); try { await this.showSplashScreen(true); const blobData = await this.getBlobData(file); @@ -611,6 +613,9 @@ export default class ActionBinder { if (!verified) return; const validated = await this.handleValidations(assetData); if (!validated) return; + const endTime = new Date(); + const uploadTime = (endTime - startTime) / 1000; + this.block.dispatchEvent(new CustomEvent(unityConfig.trackAnalyticsEvent, { detail: { event: 'uploadTime', data: { uploadTime } } })); this.block.dispatchEvent(new CustomEvent(unityConfig.trackAnalyticsEvent, { detail: { event: 'uploaded' } })); } @@ -636,6 +641,7 @@ export default class ActionBinder { setTimeout(() => { this.updateProgressBar(this.splashScreenEl, 95); if (!this.redirectUrl) return; + this.block.dispatchEvent(new CustomEvent(unityConfig.trackAnalyticsEvent, { detail: { event: 'redirectComplete', data: this.redirectUrl } })); window.location.href = this.redirectUrl; }, 2500); }