From 66aebfc4929062c1ec1fd20d64a15f5b96d03c7d Mon Sep 17 00:00:00 2001 From: Blaine Gunn Date: Thu, 24 Oct 2024 12:59:02 -0600 Subject: [PATCH] test 1 --- acrobat/blocks/verb-widget/verb-widget.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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,