Current Known Issues
This article contains information on any current known issues that might affect your use of our products.
Known System Issues for Publisher Products
Issues with envelopeModuleReady Event Listener and Recommended Solutions
Some customers implementing ATS for Web may experience issues where the ATS library executes the envelopeModuleReady event listener before the envelope module (for creating and storing identity envelope) is fully loaded. This may cause dependent functionalities to not execute as intended, such as ats.setAdditionalData
for passing identifiers directly to the library.
Recommended Solution
To make sure envelopeModuleReady
is able to catch the event, you must make sure the event listener is registered before the ATS.js library is loaded. To do this, place the envelopeModuleReady
code higher up on the page before the ATS.js script tag.
For example:
window.addEventListener("envelopeModuleReady", () => { console.log('We are in the event listener') window.atsenvelopemodule.setAdditionalData({ 'type': 'email', 'id': "test@liveramp.com" }); }); <script async defer src="https://xxx-wrapper.privacymanager.io/xxx-modules/[config-id]/xxx.js"></sc ript>
Other Solutions
If the recommended solution does not suit your needs, we have developed the following methods:
Interim patch
We have released a patch that adjusts the behavior of the envelopeModuleReady
event to dispatch multiple times—initially as usual, and then two more times after 1 second. This ensures that the subsequent dispatches will provide additional opportunities for the event listener to catch the event and function.
Window Storage Check
If you don't have control over the script loading order, you can perform a window storage check. After ATS.js is loaded, periodically check with a limited number of attempts for a storage item with the key envelopeModuleReady
and a value of true
. This value confirms that the envelope module is fully operational and can help manage timing issues effectively.
if (identifier) { let timesChecked = 0; const interval = setInterval(() => { if (window.envelopeModuleReady) { console.log('Calling ATS- setAdditionalData function!'); window.atsenvelopemodule.setAdditionalData({type:"email", id:identifier}); clearInterval(interval); } else { console.log('ATS not ready!'); if (timesChecked === 5) { console.log('We have tried to check envelopeModuleReady property ' + timesChecked + ' times, but there is no envelope module!'); clearInterval(interval); } ++timesChecked; } }, 1000 ) }
Future Fix
We’re currently working on a feature that lets you manually adjust the loading time of the ATS.js library directly in Console. Keep yourself updated by checking the Release Notes page for the release of this feature.