Web page freeze due to Exchange script in GTM

Issue description

The web page does not load or freezes after adding the Acoustic Exchange Enablement key in the Google Tag Manager (GTM) tag.


Make the following changes to your Acoustic Exchange Enablement Code.

  1. Open your GTM tag and go to the location where you had added the Exchange Enablement scripts.
  2. Comment out the Exchange Enablement scripts, as shown in the following example:
<!--<script type="text/javascript" src="//lib-us-3.brilliantcollector.com/common/ubxCapture.js">
   <script> ubxCapture.setTenantID("WRTP",channelID);</script>
   <script type="text/javascript">ubxCapture.setID("4a7d5bda-b5d4-4cd4-ad10-d18df45f976f");
  1. After you have commented out the scripts, add the following code snippet.
    var url = '//lib-us-3.brilliantcollector.com/common/ubxCapture.js';
    var captureId = “<<CaptureID>>";
    var ubxScript = document.createElement("script")
    ubxScript.type = "text/javascript";
    if(ubxScript.readyState) {  // only required for IE <9
    ubxScript.onreadystatechange = function() {
       if ( ubxScript.readyState === "loaded" || ubxScript.readyState === "complete" )
       ubxScript.onreadystatechange = null;
    } else {  //Others
    ubxScript.onload = function() {
      ubxScript.src = url;
      function setCaptureId(){
        var s1 = document.createElement('script');
        s1.innerHTML =  'ubxCapture.setTenantID("WRTP",<<channelID>>);';
        var s2 = document.createElement('script');
        s2.innerHTML =  'ubxCapture.setID("<<captureId>>");';

In the code snippet:

  • Replace CAPTUREID with the CaptureID shown in your Enablement script.
  • Replace CHANNELTENANTID with the channel tenant ID.
  1. Next, save the GTM tag and publish the updates.
  2. Verify that your web page loads properly and does not freeze.