> ## Documentation Index
> Fetch the complete documentation index at: https://docs.topsort.com/llms.txt
> Use this file to discover all available pages before exploring further.

# GAM Demand Mediation

> Monetize unsold banner inventory by automatically returning Google Ad Manager tags when no Topsort demand is available

export const ChangelogActions = () => {
  return <>
      <style>{`
        .changelog-actions {
          display: flex;
          justify-content: center;
          gap: 12px;
          margin-top: 2rem;
          padding-top: 1.5rem;
          border-top: 1px solid #e5e7eb;
        }
        
        [data-theme="dark"] .changelog-actions {
          border-top-color: #374151;
        }
        
        .changelog-btn {
          display: inline-flex;
          align-items: center;
          gap: 6px;
          padding: 8px 16px;
          border-radius: 9999px;
          border: 1px solid #d1d5db;
          background: transparent;
          color: #6b7280;
          font-size: 14px;
          cursor: pointer;
          transition: all 0.2s ease;
        }
        
        .changelog-btn:hover {
          border-color: #9ca3af;
          background: #f9fafb;
        }
        
        [data-theme="dark"] .changelog-btn {
          border-color: #4b5563;
          color: #9ca3af;
        }
        
        [data-theme="dark"] .changelog-btn:hover {
          border-color: #6b7280;
          background: #1f2937;
        }
      `}</style>
      <div className="changelog-actions">
        <button className="changelog-btn" onClick={() => {
    const btn = event.target.closest("button");
    btn.innerHTML = "❤️ Like";
    btn.style.borderColor = "#ec4899";
  }}>
          🤍 Like
        </button>
        <button className="changelog-btn" onClick={() => {
    const btn = event.target.closest("button");
    navigator.clipboard.writeText(window.location.href);
    const originalContent = btn.innerHTML;
    btn.innerHTML = "✓ Copied";
    btn.style.borderColor = "#22c55e";
    btn.style.color = "#22c55e";
    setTimeout(() => {
      btn.innerHTML = originalContent;
      btn.style.borderColor = "";
      btn.style.color = "";
    }, 2000);
  }}>
          ↗ Share
        </button>
      </div>
    </>;
};

<div className="cl-badge-group">
  <Badge color="gray" size="sm" icon="calendar">
    March 19, 2026
  </Badge>

  <Badge color="blue" size="sm" icon="server">
    Ad Server
  </Badge>

  <Badge color="green" size="sm" icon="sparkles">
    New Feature
  </Badge>
</div>

## The Problem

Banner ad slots don't always have Topsort demand. When no vendor campaigns target a given placement, the slot goes unfilled and the marketplace earns nothing from that impression, leaving revenue on the table.

## The Solution

GAM demand mediation connects Google Ad Manager (GAM) to the Topsort auction flow for enabled banner ad slots. When the auction endpoint has no Topsort demand for a banner request, it returns a GAM tag (a snippet of JavaScript) instead of an empty result. The marketplace renders the tag, which displays a programmatic banner ad from GAM, earning incremental revenue from otherwise unfilled inventory.

**No wasted impressions.** Banner slots that would have gone unfilled now generate revenue through GAM open auction or direct deals.

**Same auction endpoint.** No new API integration required. The existing auctions endpoint returns the GAM tag in the winner's `asset` field when GAM demand mediation is triggered.

**Topsort-managed configuration.** Topsort handles the GAM setup, placement mapping, and passback tag generation. The marketplace only needs to render the returned tag.

## How It Works

<Steps>
  <Step title="Auction request">
    The marketplace sends a banner auction request to the Topsort auction endpoint as usual.
  </Step>

  <Step title="No Topsort demand">
    If no Topsort campaigns bid on the slot, the auction routes to GAM demand via mediation.
  </Step>

  <Step title="GAM tag returned">
    The auction response includes a GAM snippet in the winner's asset array. The content field contains a string containing a GAM passback tag to render the GAM ad.
  </Step>

  <Step title="Marketplace renders the tag">
    The marketplace parses the GAM snippet from the response and renders it on the page, displaying a programmatic banner ad.
  </Step>
</Steps>

<div
  style={{
margin: "3rem 0",
height: "3px",
background:
  "linear-gradient(to right, transparent, #00ff88 20%, #00d4ff 40%, #8280ff 60%, #ff6b9d 80%, transparent)",
borderRadius: "2px",
opacity: "0.6",
}}
/>

Available now for eligible marketplaces. A typical integration takes a few days of a marketplace engineer's time. Contact your Topsort account team to get started, or see the [Third Party Demand](/en/knowledge-base/ad-server/auctions/demand-mediation) documentation for full details.

<ChangelogActions />
