title: Unable to make tracking pixel send data to api
body: <p>I'm trying to use this <a href="https://github.com/dockwa/openpixel" rel="nofollow noreferrer">library</a> to implement a tracking pixel.</p>
  
  <p>I'm testing in my localhost machine with Apache.</p>
  
  <p>I have a index.html page at htdocs/openpixel/index.html</p>
  
  <p>with the following content:</p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
  
      Test Pixel
      &lt;/head&gt;
  
      &lt;body&gt;
  
          Test Pixel
  
      &lt;!-- Start Open Pixel Snippet --&gt;
      &lt;script&gt;
      !function(e,t,n,p,o,i,a,s,c){e[o]||(a=e[o]=function(){a.process?a.process.apply(a,arguments):a.queue.push(arguments)},a.queue=[],a.t=1*new Date,s=t.createElement(n),s.async=1,s.src=p+"?t="+Math.ceil(new Date/i)*i,c=t.getElementsByTagName(n)[0],c.parentNode.insertBefore(s,c))}(window,document,"script","http://127.0.0.1/openpixel/v1/openpixel.js","opix",864e5),opix("init","ID-123"),opix("event","pageload");
      &lt;/script&gt;
      &lt;!-- End Open Pixel Snippet --&gt;
  
  
      &lt;/body&gt;
  
  
  &lt;/html&gt;
  </code></pre>
  
  <p>This is openpixel.js, where it should send the data to an endpoint</p>
  
  <pre><code>...
      window.onload = function () {
        var aTags = document.getElementsByTagName('a');
        for (var i = 0, l = aTags.length; i &lt; l; i++) {
          aTags[i].onclick = function (e) {
            if (Url.externalHost(this)) {
              Config.externalHost = { link: this.href, time: now() };
            }
          }.bind(aTags[i]);
        }
      };
      }(window, document, window["opix"], "opix", "http://localhost:3000/pixel_data", 1));
  ...
  </code></pre>
  
  <p>I also created an endpoint api in Node.JS to receive this pixel. When I test it with a browser get resquest it is responding.</p>
  
  <pre><code>app.get('/pixel_data', function(req, res) {
  
          console.log(req.query);
  
      });
  </code></pre>
  
  <p>The problem is when I access pixel.html, the endpoint /pixel_data is logging nothing. I'm trying to understand the problem here.</p>