# Direct Integration (n360ortb)

n360ortb Direct Integration is a lightweight JavaScript library (\~9KB gzipped) that provides direct access to Nexx360's server-side header bidding stack. It enables publishers to run real-time auctions across multiple SSPs with minimal client-side overhead.

## Key Benefits

* **Lightweight**: Only \~9KB gzipped, minimal impact on page performance
* **Server-side Header Bidding**: All auction logic runs on Nexx360 servers
* **Easy Integration**: Simple API with just three main methods
* **Flexible**: Works standalone or with Google Ad Manager (GAM)
* **Works with and without SafeFrame**: The display library auto-detects whether GAM serves creatives in a friendly iframe or a SafeFrame and adapts automatically — no configuration change needed
* **Privacy Compliant**: Built-in support for GDPR/TCF, GPP, and US Privacy

## Integration Modes

n360ortb supports two integration approaches:

### 1. Standalone Integration

Render ads directly without an ad server. Best for:

* Simple ad implementations
* Custom ad rendering solutions
* Testing and development

### 2. GAM Integration

Integrate with Google Ad Manager for full ad server functionality. Best for:

* Publishers already using GAM
* Complex ad operations with direct campaigns
* Unified auction with AdX competition

## Quick Start

Here's a minimal example to get started:

```html
<head>
  <!-- Load the n360ortb library -->
  <script>
  !function(){if(!window.n360ortb){window.n360ortb={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="https://lib.nexx360.io/nexx360ortb/api.js";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(n,t)}function e(n,t){window.n360ortb.que.push([n,t])}}();
  </script>

  <script>
    // Initialize the library
    n360ortb.init({
      currency: 'EUR'
    });

    // Fetch bids for your ad slots
    n360ortb.fetchBids({
      slots: [
        {
          tagId: 'your-tag-id',
          divId: 'ad-container',
          sizes: [[300, 250], [300, 600]]
        }
      ]
    }, function(bids) {
      // Handle the bid response
      console.log('Bids received:', bids);
    });
  </script>
</head>
```

## Next Steps

* [Installation](/integration-methods/direct-integration-n360ortb/installation.md) - Detailed setup instructions
* [API Reference](/integration-methods/direct-integration-n360ortb/api-reference.md) - Complete API documentation
* [Standalone Integration](/integration-methods/direct-integration-n360ortb/standalone-integration.md) - Render ads without an ad server
* [GAM Integration](/integration-methods/direct-integration-n360ortb/gam-integration.md) - Integrate with Google Ad Manager


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.nexx360.io/integration-methods/direct-integration-n360ortb.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
