Prebid.js is open source software that is offered for free as a convenience. While it is designed to help companies address legal requirements associated with header bidding, we cannot and do not warrant that your use of Prebid.js will satisfy legal requirements. You are solely responsible for ensuring that your use of Prebid.js complies with all applicable laws. We strongly encourage you to obtain legal advice when using Prebid.js to ensure your implementation complies with all laws where you operate.
Note: recommended modules are now checked by default. Please uncheck them as desired.
Note: If you receive an error during download you most likely selected a configuration that is not supported. Verify that each bidder / module is available in the selected version. Also please note that even though you can download older versions of Prebid.js, Prebid only supports the most recent major version. Within a month or so after a major release (e.g. 3.x), we won’t patch the previous major release (e.g. 2.x).
Alternatively, you can build Prebid.js from the source code. For instructions, see the Prebid.js README on GitHub.
If your project is already built with a JavaScript bundler, you can install Prebid.js from npm and bundle it with the rest of your code.
npm install prebid.js
Instead of choosing modules with --modules or the checkboxes above, you choose them by importing them, using their names from Prebid’s modules directory:
import pbjs from 'prebid.js';
import 'prebid.js/modules/rubiconBidAdapter';
import 'prebid.js/modules/userId'; // parent module of sharedIdSystem
import 'prebid.js/modules/sharedIdSystem';
pbjs.processQueue();
For complete webpack + SWC and Bun examples, see Usage (as a npm dependency) in the Prebid.js README.