Introduction

Nexx360 provides a lightweight library that allows a direct connexion to the server side stack.

Example

<html>

<head>
  <link rel="icon" type="image/png" href="/favicon.png">
  <title>Nexx360 Direct call</title>
  <script async src="https://securepubads.g.doubleclick.net/tag/js/gpt.js"></script>
  <script>
    window.googletag = window.googletag || {cmd: []};
    googletag.cmd.push(function() {
      googletag.defineSlot('/21805930009/nexx360_display_test',  [[300, 600], [300, 250]], 'div-1').setTargeting('ctype', ['divers']).addService(googletag.pubads());
      googletag.pubads().enableSingleRequest();
      googletag.enableServices();
      googletag.pubads().disableInitialLoad();
    });
  </script>
  <!-- This is n360tag snippet, to be included in header -->
  <script>
  !function(){if(!window.n360tag){window.n360tag={init:function(){e("init",arguments)},fetchBids:function(){e("fetchBids",arguments)},setDisplayBids:function(){},targetingKeys:function(){return[]},que:[]};var n=document.createElement("script");n.async=!0,n.src="//cdn.nexx360.io/nexx360_direct_call.js";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(n,t)}function e(n,t){window.n360tag.que.push([n,t])}}();
  </script>
          
  <script>
      n360tag.init({
        gdpr: {
          cmpTimeout: 1000,
        },
        currency: 'USD',
      });

      n360tag.fetchBids({
        slots: [
          {
            tagId: 'testnexx',
            divId: 'div-1',
            sizes: [[300, 600]]
          }
        ],
      }, function (bids) {
        n360tag.setDisplayBids();
        googletag.pubads().refresh();
        console.log(bids);
      });
  </script>
</head>
<body>
    <h2>Nexx360 Direct Call</h2>
    <p>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Quibusdam amet rem delectus iusto recusandae, quod minima perferendis molestiae impedit et earum dolorum ipsa, autem nostrum est aspernatur in. Cumque, recusandae.
    amet rem delectus iusto recusandae, quod minima perferendis molestiae impedit et earum dolorum ipsa, autem nostrum est aspernatur in. Cumque, recusandae.
    </p>
    <h5>Div-1</h5>
    <div id="div-1">
    <script>
      googletag.cmd.push(function() { googletag.display('div-1'); });
    </script>
    </div>
</body>

</html>

Last updated