Prebid.js Integration
Armanet supports integration with Prebid.js using the Freedom Ad Network adapter. Learn more supported versions, configuration, and network options on this page.
What is Prebid.js?
Prebid.js is the most widely used open-source header bidding solution for publishers. It allows multiple demand sources (SSPs, DSPs, networks) to compete in real-time for ad impressions on your site.
By integrating Armanet via Prebid.js, you can:
- Maximize yield by competing alongside other bidders.
- Use a transparent, community-maintained open-source bidding framework.
- Maintain control over auction logic and reporting.
Supported Versions
Armanet requires the following minimum versions of Prebid.js:
- Prebid.js 10: 10.6.0+
- Prebid.js 9: 9.53.2+
Earlier versions are not supported.
Downloading Prebid.js
There are two ways to integrate Prebid.js:
1. Use the Hosted Build
You can download a hosted build from the official Prebid.js download page. Make sure to include the Freedom Ad Network adapter in your build.
2. Build from Source
Clone the Prebid.js repository and include the Freedom Ad Network adapter module in your build configuration.
git clone https://github.com/prebid/Prebid.js.git
cd Prebid.js
npm install
# Build Prebid.js with our adapter
gulp build --modules=fanBidAdapter
This generates a custom prebid.js build with only the modules you need.
Adapter Details
The Armanet integration uses the Freedom Ad Network adapter:
- Adapter documentation: Freedom Ad Network – Prebid Docs
- Bidder code:
freedomadnetwork
Configuration Example
Here’s how to configure a Prebid.js ad unit with Armanet:
var adUnits = [
{
code: '/123456789/header-bid-tag-1',
mediaTypes: {
banner: {
sizes: div_1_sizes
}
},
bids: [{
bidder: 'freedomadnetwork',
params: {
placementId: 'c28c54cb-f63e-4637-8c12-56bcfb775e9c',
network: 'YOUR_NETWORK', // can be 'armanet', 'fan', or 'test'
}
}]
}
];
Don't forget to include Armanet SDK in the <head> section of your page using the following code:
<head>
<script src="https://assets.armanet.us/armanet-pxl.js" defer></script>
</head>
Parameters
- placementId – The Ad Unit ID from your Armanet dashboard.
- network – The network to target:
armanet– Standard Armanet inventoryfan– Freedom Ad Network inventorytest– Development/test environment