Announcement

Collapse
No announcement yet.

'Adroll' and the 'adding acatalog' issue again

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    'Adroll' and the 'adding acatalog' issue again

    Please can someone kindly check this for me?

    Client has been give this code by Adroll http://www.adroll.com/

    Code:
    <script type="text/javascript">
    adroll_adv_id = "5RXXXXXXXXXXXXXXXXXXXX";
    adroll_pix_id = "2KXXXXXXXXXXXXXXXXXXXX";
    (function () {
    var oldonload = window.onload;
    window.onload = function(){
       __adroll_loaded=true;
       var scr = document.createElement("script");
       var host = (("https:" == document.location.protocol) ? "https://s.adroll.com" : "http://a.adroll.com");
       scr.setAttribute('async', 'true');
       scr.type = "text/javascript";
       scr.src = host + "/j/roundtrip.js";
       ((document.getElementsByTagName('head') || [null])[0] ||
        document.getElementsByTagName('script')[0].parentNode).appendChild(scr);
       if(oldonload){oldonload()}};
    }());
    </script>
    Sellerdeck was adding 'acatalog' on the home page ( scr.src = host + "/j/roundtrip.js"; became scr.src = host + "acatalog//j/roundtrip.js"; )

    I have therefore edited the code thus:

    Code:
    <script type="text/javascript">
    adroll_adv_id = "5RXXXXXXXXXXXXXXXXXXXX";
    adroll_pix_id = "2KXXXXXXXXXXXXXXXXXXXX";
    (function () {
    var oldonload = window.onload;
    window.onload = function(){
       __adroll_loaded=true;
       var scr = document.createElement("script");
       var host = (("https:" == document.location.protocol) ? "https://s.adroll.com" : "http://a.adroll.com");
       scr.setAttribute('async', 'true');
       scr.type = "text/javascript";
       scr.src = host + "/j/roundtrip"+"."+"js";
       ((document.getElementsByTagName('head') || [null])[0] ||
        document.getElementsByTagName('script')[0].parentNode).appendChild(scr);
       if(oldonload){oldonload()}};
    }());
    </script>
    Is that correct or have I made a gaff?

    Thank you.
    Last edited by graphicz; 09-Dec-2013, 02:51 PM. Reason: Typo
    Jonathan Chappell
    Website Designer
    SellerDeck Website Designer
    Actinic to SellerDeck upgrades
    Graphicz Limited - www.graphicz.co.uk

    #2
    The line
    Code:
    scr.src = host + "/j/roundtrip"+"."+"js";
    Looks fine to me. Try it and see.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Thanks Norman
      Jonathan Chappell
      Website Designer
      SellerDeck Website Designer
      Actinic to SellerDeck upgrades
      Graphicz Limited - www.graphicz.co.uk

      Comment

      Working...
      X