Back to Bidders

Magnite

Features

Bidder Code magnite Prebid.org Member yes
Prebid.js Adapter yes Prebid Server Adapter no
Media Types display, video, native Multi Format Support will-bid-on-any
TCF-EU Support yes IAB GVL ID 52
GPP Support tcfeu, usnat, usstate_all, usp DSA Support yes
USP/CCPA Support yes COPPA Support yes
Supply Chain Support yes Demand Chain Support check with bidder
Safeframes OK yes Supports Deals yes
Floors Module Support yes First Party Data Support yes
Endpoint Compression check with bidder ORTB Blocking Support yes
User IDs all Privacy Sandbox check with bidder

Registration

The Magnite adapter requires setup and approval from the Magnite team, even for existing accounts. Please reach out to your account manager or header-bidding@magnite.com for more information.

Bid Params

Name Scope Description Example Type
accountId required The publisher account ID 14062 integer
siteId required A unique ID for your site 70608 integer
zoneId required A unique ID for your site’s ad placements 498816 integer

First Party Data

Publishers should use the ortb2 method of setting First Party Data. The following fields are supported:

  • ortb2.site.ext.data.*
  • ortb2.site.keywords
  • ortb2.site.content.data[]
  • ortb2.user.ext.data.*
  • ortb2.user.data[]

The Magnite exchange supports IAB standard taxonomies for contextual and audience segments.

Example first party data available to all bidders and all ad units:

pbjs.setConfig({
  ortb2: {
    site: {
      keywords: "kw1,kw2",
      ext: {
        data: {
          prodtype: ["tech","mobile"]
        }
      }
    },
    user: {
      ext: {
        data: {
          ucat: ["new"]
        }
      }
    }
  }
});

Example of first party data available only to the Magnite bidder across all ad units:

pbjs.setBidderConfig({
  bidders: ["magnite"],
  config: {
    ortb2: {
      site: {
        keywords: "kw1,kw2",
        ext: {
          data: {
            prodtype: ["tech","mobile"]
          }
        }
      },
      user: {
        ext: {
          data: {
            ucat: ["new"]
          }
        }
      }
    }
  }
});

Media Types

Banner ads are supported with standard IAB sizes.

var bannerAdUnit = {
    code: 'test-div',
    mediaTypes: {
        banner: {
            sizes: [[300, 250], [728, 90]]
        }
    },
    bids: [{
        bidder: 'magnite',
        params: {
            accountId: 14062,
            siteId: 70608,
            zoneId: 498816
        }
    }]
};

Video

The Magnite adapter supports standard OpenRTB video parameters for both instream and outstream contexts.

var videoAdUnit = {
    code: 'myVideoAdUnit',
    mediaTypes: {
        video: {
            context: 'instream',
            playerSize: [640, 480],
            mimes: ['video/mp4', 'video/x-ms-wmv'],
            protocols: [2, 5],
            maxduration: 30,
            linearity: 1,
            api: [2]
        }
    },
    bids: [{
        bidder: 'magnite',
        params: {
            accountId: 14062,
            siteId: 70608,
            zoneId: 498816
        }
    }]
};

Outstream video is also supported. We recommend discussing video demand with your Magnite account representative.

Native

The Magnite adapter supports native ads using the ORTB Native spec. We recommend version 1.2, but versions 1.0 and 1.1 are also supported.

Native Version Required Fields
1.0 and 1.1 layout, adunit, assets
1.2 context, plcmttype, assets, eventtrackers. privacy is a recommended field.

Here’s an example using ORTB Native 1.2:

var nativeAdUnit = {
    code: 'myNativeAdUnit',
    mediaTypes: {
        native: {
            ortb: {
                ver: "1.2",
                context: 2,
                plcmttype: 11,
                privacy: 1,
                assets: [{
                    id: 1,
                    required: 1,
                    img: {
                        type: 3,
                        w: 150,
                        h: 50
                    }
                }],
                eventtrackers: [{
                    event: 1,
                    methods: [1, 2]
                }]
            }
        }
    },
    bids: [{
        bidder: 'magnite',
        params: {
            accountId: 14062,
            siteId: 70608,
            zoneId: 498816
        }
    }]
};

Configuration

User Sync

Add the following code to enable user syncing. By default, Prebid.js turns off user syncing through iframes. Magnite recommends enabling iframe-based user syncing to improve match rates and bid performance.

pbjs.setConfig({
    userSync: {
        iframeEnabled: true
    }
});

Migration from Rubicon

The Magnite adapter (bidder: "magnite") is designed as the next-generation replacement for the Rubicon adapter (bidder: "rubicon"). It uses a modern OpenRTB integration that is simpler and easier to maintain.

Key points for migrating:

  • The bid params (accountId, siteId, zoneId) remain the same.
  • The adapter accepts configuration from both magnite and rubicon config namespaces during the transition.
  • Update bidder: "rubicon" to bidder: "magnite" in your ad unit configurations.

Preserving Existing GAM Line Items

If you are migrating from the Rubicon adapter and your Google Ad Manager (GAM) line items rely on bidder-specific key-value targeting (e.g., hb_bidder=rubicon or hb_pb_rubicon), you can avoid updating your ad server setup by aliasing the Magnite adapter as rubicon. This causes bids from the Magnite adapter to be reported under the rubicon bidder code, preserving compatibility with your existing line items.

pbjs.aliasBidder('magnite', 'rubicon');

Then use the alias in your ad unit configuration:

var adUnit = {
    code: 'test-div',
    mediaTypes: {
        banner: {
            sizes: [[300, 250]]
        }
    },
    bids: [{
        bidder: 'rubicon',
        params: {
            accountId: 14062,
            siteId: 70608,
            zoneId: 498816
        }
    }]
};

With this approach, Prebid.js will use the Magnite adapter under the hood but send targeting keys as hb_bidder=rubicon, hb_pb_rubicon, etc., so your existing GAM line items continue to work without changes.

The rubicon alias is not included as a default alias of the Magnite adapter by design. This allows publishers to include both the Magnite and Rubicon adapters in the same Prebid.js build for A/B testing during migration. However, for production use after migration, the recommended approach is to build Prebid.js with only the Magnite adapter (without the Rubicon adapter) and use pbjs.aliasBidder('magnite', 'rubicon') as shown above. This avoids potential conflicts between the two adapters.

"Send All Bids" Ad Server Keys

These are the bidder-specific keys that would be targeted within GAM in a Send-All-Bids scenario. GAM truncates keys to 20 characters.
hb_pb_magnite hb_bidder_magnite hb_adid_magnite
hb_size_magnite hb_source_magnite hb_format_magnite
hb_cache_host_magnit hb_cache_id_magnite hb_uuid_magnite
hb_cache_path_magnit hb_deal_magnite

Back to Bidders