SOLVED: Can’t insert code in head section with injections in Designer

I am trying to insert a script in the head section via injections in Designer.
i already have some code there and sometimes it works sometimes it doesn’t  

now it doesn’t. When I press submit it just returns and when I refresh the code is gone  I have tried to disable all caches, tried different browsers. Same result

Does any of you have an idea of what causes then problem and how to fix it? And is there a manual alternative way of inserting the code while wait for the system to let me do it through injections?

  • 684
  • More
Replies (9)
    • Maybe it's problem with cache?
      Try clear cache from studio and clear browser cache too

      • I already did that. actually disabled it completely. Rebooted computer tried different computers and browsers. Same result

        • What the code you try insert through Injections? Can you post code here and I try it on my own UNA installation?

          • Sure. It a pixel code for an advertising system. Here it is

            <script type="text/javascript">

                adroll_adv_id = "HYRPSHBSNVDRZGCZ6O32LT";

                adroll_pix_id = "MF5SIIMG6VEGLPSP53EDYE";

                adroll_version = "2.0";

                (function(w, d, e, o, a) {

                    w.__adroll_loaded = true;

                    w.adroll = w.adroll || [];

                    w.adroll.f = [ 'setProperties', 'identify', 'track' ];

                    var roundtripUrl = "https://s.adroll.com/j/" + adroll_adv_id

                            + "/roundtrip.js";

                    for (a = 0; a < w.adroll.f.length; a++) {

                        w.adroll[w.adroll.f[a]] = w.adroll[w.adroll.f[a]] || (function(n) {

                            return function() {

                                w.adroll.push([ n, arguments ])

                            }

                        })(w.adroll.f[a])

                    }

                    e = d.createElement('script');

                    o = d.getElementsByTagName('script')[0];

                    e.async = 1;

                    e.src = roundtripUrl;

                    o.parentNode.insertBefore(e, o);

                })(window, document);

                adroll.track("pageView");

            </script>

            • I haven't any idia why it not work. I check that on my UNA and it work properly

              • Thank you very much for verifying

                • Hello EducatedSingles !

                  Possible, your host has too strict mod_security settings, see example here https://una.io/page/view-discussion?id=4867 

                  • SOLVED: I contacted our hosting provider and they whitelisted mod_security rule

                    Mod_Security is a server-side web application firewall that is designed to block attempts of possibly malicious injections of various snippets into your website scripts; however, in some cases these blocks are false-positive.

                    • You are absolutely right, whitelisting the rule, solved the problem. Thank you

                      Login or Join to comment.