Java Script (JS) Pixel Tracker Without Redirect for routers

Head:


<script
  src="https://code.jquery.com/jquery-3.3.1.min.js"
  integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
  crossorigin="anonymous"></script>

---------------------------------------------------------------------------

Body:



<script>
        function getQueryParameters(str) {

            return (str || document.location.search).replace(/(^\?)/, '').split("&").map(function (n)


{ return n = n.split("="), this[n[0]] = n[1], this }.bind({}))[0];

        }
        $(function () {
            var querystring = getQueryParameters();
            var newquery = JSON.stringify(querystring).replace(/:/g, '=').replace(/{/g, "").replace(/}/g, "").replace(/,/g, "&").replace(/['"]+/g, '');
      var click_url = "http://traffic.focuusing.com/router"?
      var used_sign = "?";
      if (click_url.indexOf(used_sign) != -1) {
        used_sign = "&";
      }
      if(newquery == "")
        used_sign="";
      var new_url= click_url + used_sign + newquery;
      $('<iframe style="display:none;" src="'+new_url+'" frameborder="0" scrolling="no" ></iframe>').appendTo('body');
        });
    </script>

Feedback and Knowledge Base