diff --git a/acrobat/blocks/verb-widget/verb-widget.js b/acrobat/blocks/verb-widget/verb-widget.js index 557e17ee..91f53c70 100644 --- a/acrobat/blocks/verb-widget/verb-widget.js +++ b/acrobat/blocks/verb-widget/verb-widget.js @@ -87,7 +87,6 @@ export default async function init(element) { return; } - const ENV = getEnv(); const { locale } = getConfig(); const ppURL = window.mph['verb-widget-privacy-policy-url'] || `https://www.adobe.com${locale.prefix}/privacy/policy.html`; const touURL = window.mph['verb-widget-terms-of-use-url'] || `https://www.adobe.com${locale.prefix}/legal/terms.html`; @@ -270,6 +269,17 @@ export default async function init(element) { } }); + window.addEventListener('beforeunload', () => { + const date = new Date(); + date.setTime(date.getTime() + 1 * 60 * 1000); + const cookieExp = `expires=${date.toUTCString()}`; + if (exitFlag) { + document.cookie = `UTS_Redirect=${Date.now()};domain=.adobe.com;path=/;expires=${cookieExp}`; + // adobe.com:acrobat:online:sign-pdf:transition + verbAnalytics('acom-redirect', VERB); + } + }); + // Errors, Analytics & Logging const lanaOptions = { sampleRate: 1,