> For the complete documentation index, see [llms.txt](https://developers.panxo.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.panxo.ai/integrations/native/signal-ortb-native.md).

# Signal ( oRTB/Native )

## Google Tag Manager (Recommended)

{% hint style="success" %}
**Recommended Integration Method**\
GTM integration requires no code changes to your website and allows easy enable/disable without deployments.
{% endhint %}

### Setup Steps

{% stepper %}
{% step %}

### Get Your Script from Dashboard

* Log into your Panxo dashboard at `app.panxo.ai`
* Navigate to **Settings → Integration**
* Copy your integration script (format: `<script async src="https://cdn.panxo.ai/o/{hash}"></script>`)

{% hint style="info" %}
**Your Script:**\
Each property receives a unique hash-based script URL. This hash is automatically generated and displayed in your dashboard. Simply copy the complete script tag.
{% endhint %}
{% endstep %}

{% step %}

### Create GTM Tag

In Google Tag Manager, create a new **Custom HTML** tag and paste your script:

{% code title="Custom HTML (example)" %}

```html
<script async src="https://cdn.panxo.ai/o/6c6cfb20039e1773"></script>
```

{% endcode %}

Example Script Format:

| Component | Description                         | Example                                   |
| --------- | ----------------------------------- | ----------------------------------------- |
| **URL**   | Hash-based script URL               | `https://cdn.panxo.ai/o/6c6cfb20039e1773` |
| **Hash**  | Unique identifier for your property | `6c6cfb20039e1773`                        |

{% hint style="warning" %}
**Important:** Use the exact script provided in your dashboard. Each property has a unique hash that cannot be shared or reused.
{% endhint %}
{% endstep %}

{% step %}

### Configure Trigger

* Set trigger to fire on **"All Pages"** or specific pages
* Use **"Page View"** trigger type
  {% endstep %}

{% step %}

### Test & Publish

* Use GTM Preview mode to verify script loads
* Publish container when ready
  {% endstep %}
  {% endstepper %}

### Verification

{% hint style="info" %}
**Verification Checklist:**

* Script appears in Network tab as `/o/{hash}` (e.g., `/o/6c6cfb20039e1773`)
* Dashboard shows "Script Verified" status in real-time (verification happens immediately after script integration)
  {% endhint %}

***

## Direct Script Integration

**When to Use:**

* If you don't use GTM
* Need more control over script placement
* WordPress sites (consider plugin instead)

### Setup

Add to your `<head>` section using the script from your dashboard:

{% code title="Example (head)" %}

```html
<head>
  <!-- Other head content -->
  <script async src="https://cdn.panxo.ai/o/6c6cfb20039e1773"></script>
</head>
```

{% endcode %}

{% hint style="warning" %}
**Important Notes:**

* Use the exact script provided in your dashboard (Settings → Integration)
* Each property has a unique hash-based URL
* Place in `<head>` for early detection
* `async` attribute ensures non-blocking load
* Script auto-initializes when DOM is ready
  {% endhint %}

***

## WordPress Plugin

**When to Use:**

* WordPress-powered sites
* Want automatic `ads.txt` management
* Prefer plugin-based integration
* Zero-configuration setup

### Installation

{% stepper %}
{% step %}
Go to **WordPress admin → Plugins → Add New**
{% endstep %}

{% step %}
Search for **"Panxo AI Monetization"**
{% endstep %}

{% step %}
Click **"Install Now"** and **"Activate"**
{% endstep %}
{% endstepper %}

**Plugin URL:** [WordPress.org Plugin Directory](https://wordpress.org/plugins/panxo-ai-monetization/)

### Automatic Configuration

{% hint style="success" %}
**Zero-Configuration Setup**\
The plugin handles everything automatically. Setup completes in less than 1 minute.
{% endhint %}

**What the Plugin Does Automatically:**

* Registers your WordPress site with Panxo
* Creates your property
* Integrates the Panxo script into `<head>`
* Updates your `ads.txt` file with required entries
* Begins the learning process

### Verification

* Dashboard shows **"Script Verified"** and **"Ads.txt Verified"** when complete
* Monitor learning phase progress from WordPress dashboard

***

## Prebid.js / OpenRTB Integration

**When to Use:**

* Already using Prebid.js for header bidding
* Want Panxo to compete in your existing auction
* Running a multi-SSP setup
* Direct OpenRTB integration

{% hint style="info" %}
**Best For:** Publishers with existing Prebid infrastructure who want to add AI traffic monetization to their demand stack.
{% endhint %}

### Prerequisites

From your Panxo Dashboard (Settings > OpenRTB/Prebid):

1. **Endpoint Key** - A unique hash for your property (e.g., `06dc70992da98be6`)
2. **Signal Script URL** - `https://cdn.panxo-sys.com/o/{ENDPOINT_KEY}`

{% hint style="warning" %}
**Important Domain:** For Prebid/OpenRTB, use `cdn.panxo-sys.com` (NOT cdn.panxo.ai). This is required for proper cookie syncing.
{% endhint %}

### Steps

{% stepper %}
{% step %}

### Install Signal Script

The Signal script **must load before** Prebid.js:

{% code title="head (signal + prebid)" %}

```html
<head>
  <!-- Panxo Signal Script - MUST load before Prebid -->
  <script async src="https://cdn.panxo-sys.com/o/YOUR_ENDPOINT_KEY"></script>
  
  <!-- Prebid.js -->
  <script async src="prebid.js"></script>
</head>
```

{% endcode %}

The Signal script:

* Creates user identity (`panxo_uid`) in localStorage
* Detects AI-referred traffic
* Enables Panxo to bid on your inventory
  {% endstep %}

{% step %}

### Configure Prebid Ad Unit

{% code title="adUnits example" %}

```javascript
var adUnits = [{
  code: 'ad-slot-1',
  mediaTypes: {
    banner: {
      sizes: [[300, 250], [728, 90], [320, 50]]
    }
  },
  bids: [{
    bidder: 'panxo',
    params: {
      propertyKey: '06dc70992da98be6'  // Your endpoint key (same hash as Signal script)
    }
  }]
}];
```

{% endcode %}
{% endstep %}

{% step %}

### Initialize Prebid

{% code title="Prebid initialization" %}

```javascript
var pbjs = pbjs || {};
pbjs.que = pbjs.que || [];

pbjs.que.push(function() {
  pbjs.addAdUnits(adUnits);
  
  pbjs.requestBids({
    timeout: 2000,
    bidsBackHandler: function() {
      var winner = pbjs.getHighestCpmBids('ad-slot-1')[0];
      if (winner) {
        renderAd(winner);
      }
    }
  });
});

function renderAd(bid) {
  var container = document.getElementById('ad-slot-1');
  var iframe = document.createElement('iframe');
  iframe.width = bid.width;
  iframe.height = bid.height;
  iframe.frameBorder = '0';
  container.appendChild(iframe);
  iframe.contentWindow.document.open();
  iframe.contentWindow.document.write(bid.ad);
  iframe.contentWindow.document.close();
}
```

{% endcode %}
{% endstep %}
{% endstepper %}

### Bid Parameters

| Parameter     | Required | Description                                       |
| ------------- | -------- | ------------------------------------------------- |
| `propertyKey` | Yes      | Your endpoint key hash (e.g., `06dc70992da98be6`) |
| `floor`       | No       | Minimum CPM in USD                                |

### How Bidding Works

{% hint style="info" %}
**AI-Only Bidding**\
Panxo only bids when AI traffic is detected. You'll only receive bids for users coming from ChatGPT, Perplexity, Claude, etc.
{% endhint %}

1. Signal script loads and creates `panxo_uid` in localStorage
2. Signal script detects if user came from AI and stores signal
3. Prebid requests bids from all configured bidders
4. Panxo adapter reads `panxo_uid` and sends OpenRTB request
5. Panxo server checks if user has AI signal and returns bid
6. If Panxo wins auction, ad is displayed

### Expected Performance

| Metric    | Typical Value          |
| --------- | ---------------------- |
| CPM       | $5 - $15               |
| Fill Rate | 5-15% of total traffic |

{% hint style="success" %}
**Why Low Fill Rate is Normal**\
Panxo targets only AI traffic (typically 5-15% of visits). This focused approach delivers premium CPMs without affecting your other demand sources.
{% endhint %}

### Full Example

{% code title="Full example (HTML)" %}

```html
<!DOCTYPE html>
<html>
<head>
  <!-- 1. Panxo Signal Script (MUST load first) -->
  <script async src="https://cdn.panxo-sys.com/o/06dc70992da98be6"></script>
  
  <!-- 2. Prebid.js -->
  <script async src="prebid.js"></script>
  
  <script>
    var pbjs = pbjs || {};
    pbjs.que = pbjs.que || [];
    
    pbjs.que.push(function() {
      pbjs.addAdUnits([{
        code: 'banner-ad',
        mediaTypes: { banner: { sizes: [[300, 250], [728, 90]] } },
        bids: [{
          bidder: 'panxo',
          params: { propertyKey: '06dc70992da98be6' }
        }]
      }]);
      
      pbjs.requestBids({
        timeout: 2000,
        bidsBackHandler: function() {
          var winner = pbjs.getHighestCpmBids('banner-ad')[0];
          if (winner) {
            var container = document.getElementById('banner-ad');
            var iframe = document.createElement('iframe');
            iframe.width = winner.width;
            iframe.height = winner.height;
            iframe.frameBorder = '0';
            container.appendChild(iframe);
            iframe.contentWindow.document.open();
            iframe.contentWindow.document.write(winner.ad);
            iframe.contentWindow.document.close();
          }
        }
      });
    });
  </script>
</head>
<body>
  <div id="banner-ad"></div>
</body>
</html>
```

{% endcode %}

### Testing

Enable Prebid debug mode:

{% code title="Enable debug" %}

```javascript
pbjs.setConfig({ debug: true });
```

{% endcode %}

Check browser console for:

* `Panxo: Sending bid request` - Request sent
* `Panxo: Bid received` - Bid returned
* `Panxo: User ID not found` - Signal script not loaded

Verify Signal script:

{% code title="Check panxo\_uid" %}

```javascript
console.log(localStorage.getItem('panxo_uid'));
// Should show: "d9433353-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
```

{% endcode %}

### Troubleshooting

<details>

<summary>No bids received?</summary>

1. Verify Signal script URL uses `cdn.panxo-sys.com` (NOT cdn.panxo.ai)
2. Check localStorage for `panxo_uid` (DevTools > Application > Local Storage)
3. Verify endpoint key matches between Signal script and Prebid params
4. Panxo only bids if user has AI signal (came from AI recently)

</details>

<details>

<summary>Low fill rate?</summary>

* This is expected - Panxo only bids on AI-referred traffic
* Check AI traffic percentage in your Panxo dashboard

</details>

<details>

<summary>Need help?</summary>

* Email: <support@panxo.ai>
* Dashboard: app.panxo.ai

</details>
