3 Replies Latest reply on Jul 5, 2017 1:28 AM by zhengquanz32073933

    mbox.js works while at.js failed

    zhengquanz32073933

      Hi guys,

       

      On my site, when I implement at.js in head, it didn't work. But if I implement mbox.js in head, it worked.

      I'm just wondering why it will happen, for at.js is a new method?

       

      thanks,

      Zhengquan Zhou

        • 1. Re: mbox.js works while at.js failed
          zhengquanz32073933 Level 1

          In addition, both under mbox.js and at.js, I can load html content in Adobe Target, but I can't see changes in experience under at.js.

          • 2. Re: mbox.js works while at.js failed
            ParitMittal Level 5

            Hi Zhengquan,

             

            The at.js fires the global mbox request from the HEAD of the document and so HTML content can't be rendered there. Depending on use case there should be several options available for adding HTML with the visual composer:

            1. Use the code editor > custom code section and uncheck the "add to head" option.
            2. Find an element on the page just above to the place you want to add HTML and choose the insert element option.

             

            The global mbox was designed for the visual composer so you may find those options work better for you. However, if you find that you must use the form composer you have these options available.

            1. Use global mbox and create an html offer but write a script to insert the HTML content you are trying load directly from the global mbox to somewhere on the body. Keep in mind you'll need to time the execution of your script to be after the DOM element you are manipulating is available.
            2. Add a regional mbox to the page (this would be in the body around the content you want to change) and then select that mbox in the location dropdown for the form composer. Create an regular HTML offer.

             

            Here's a help doc on adding a regional mbox to your page: mboxCreate(mbox,params)

             

             

            Regards

            Parit Mittal

            • 3. Re: mbox.js works while at.js failed
              zhengquanz32073933 Level 1

              Hi Parit,

               

              I'm still wondering why mbox.js works while at.js not?

              For both of them are put ahead of </head>.