# Introduction

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](https://developer.nexx360.io/direct-integration-n360ortb/installation) - Detailed setup instructions
* [API Reference](https://developer.nexx360.io/direct-integration-n360ortb/api-reference) - Complete API documentation
* [Standalone Integration](https://developer.nexx360.io/direct-integration-n360ortb/standalone-integration) - Render ads without an ad server
* [GAM Integration](https://developer.nexx360.io/direct-integration-n360ortb/gam-integration) - Integrate with Google Ad Manager
