Nexx360 Documentation
  • Nexx360 solutions
  • Nexx360 account
    • Account creation
    • Account settings
      • Add and manage users
      • Configure bidders
      • Create blocklists
      • Implement throttling
  • General configuration
    • Introduction
    • Add and manage websites
    • Add and manage tagIds
    • Bid reductions
    • Cookie Sync script
    • Available bidders
  • Prebid Adapter
    • Introduction
    • Update Prebid with Nexx360 Adapter
    • Multiformat bids
  • VAST / CTV
    • Introduction
    • Create VAST Config
    • Build VAST ad tag
    • Connect the Google Ad Manager (GAM) account
    • Cookie Sync
    • Sample CTV Tag
  • Native
    • Introduction
    • Native Configs
    • GET
    • POST
    • Sample Response
  • Direct Call
    • Introduction
    • API Reference
    • Microsoft AST Example
    • Google Ad Manager Example
      • Connect the Google Ad Manager (GAM) account
  • AMP Nexx360
    • Introduction
    • Ad Server setup
    • Add rtc-config object to amp-ad units
  • OpenRTB
    • Introduction
    • Video Example
    • Mobile Example
    • Cookie Sync
  • Inapp
    • Introduction
    • Request Exemple
    • Google Ad Manager setup
  • API Management
    • Introduction
    • Connexion
    • Sites
      • Create a new site
      • Update site
      • Get Site
      • List Sites
    • TagIds (Stored requests)
      • Create a new tagId (stored request)
      • Update tagId (stored request)
      • Get tagId (Stored request)
      • List tagIds (Stored requests) by site
  • API Campaign
    • Introduction
    • Connexion
    • Orders
      • Create a new order
      • Update order
      • Get Order
      • List Orders
    • Line Items
      • Create a Line Item
      • Update Line Item
      • Get Line Item
      • List Line Items by Order
    • Creatives
      • Create a Creative
      • Update Creative
      • Get Creative
      • List Creatives by Line Items
  • Legacy - Direct call Nexx360
    • Introduction
    • Nexx Web features
      • Smart autorefresh
      • Incontent injection
        • Automated injection
        • Dynamic injection
      • Lazy Loading
      • Non-consent traffic monetisation
    • Integrate Nexx Web script on your site
      • Integration with GAM adserver
        • Nexx Web tag
        • Connect the Google Ad Manager (GAM) account
      • Integration with Xandr adserver
  • Nexx360 console
  • Nexx360 site
Powered by GitBook
On this page
  • Example
  • AdServer Creative

Was this helpful?

  1. Direct Call

Google Ad Manager Example

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>

AdServer Creative

<script>
		var w = window;
		for (i = 0; i < 10; i++) {
			w = w.parent;
			if (w.n360tag) {
				try {
					w.n360tag.renderAd(document, "%%PATTERN:n360ad_adid%%\");
					break;
				} catch (e) {
					continue;
				}
			}
		}
</script>

PreviousMicrosoft AST ExampleNextConnect the Google Ad Manager (GAM) account

Last updated 8 months ago

Was this helpful?