Prebid Client-Side Integration
Prebid.js integration allows you to include HighVibes Media in your header bidding setup via Equativ’s SmartAdServer adapter. This method provides real-time bidding competition and can increase overall ad revenue through programmatic auctions.
Best For:
- Publishers using Prebid.js for header bidding
- Advanced programmatic monetization strategies
- Multiple demand source competition
- Real-time bidding optimization
Integration Scripts
Section titled “Integration Scripts”Use SmartAdServer bidder directly - simplest configuration.
"bids": [ { "bidder": "smartadserver", "params": { "siteId": 123456, "pageId": 654321, "formatId": 151978, "domain": "https://prg.smartadserver.com" } }]Use after registering alias - provides cleaner configuration.
First register the alias:
pbjs.aliasBidder("smartadserver", "highvibes");Then use in adUnits:
{ "bidder": "highvibes", "params": { "siteId": 123456, "pageId": 654321, "formatId": 151978, "domain": "https://prg.smartadserver.com" }}Reference implementation - shows key components but not a complete setup.
var adUnits = [ { code: 'test-div', mediaTypes: { banner: { sizes: [[800, 250], [970, 250]] } }, bids: [ { bidder: 'smartadserver', params: { siteId: 123456, pageId: 654321, formatId: 151978, domain: 'https://prg.smartadserver.com' }, }, ] }];
pbjs.que.push(function () { pbjs.addAdUnits(adUnits); pbjs.setConfig({ userSync: { filterSettings: { iframe: { bidders: ['smartadserver'], filter: 'include' } } } });});Note: This is a reference example showing the essential configuration. A complete Prebid.js implementation requires additional setup including page loading, auction management, and ad rendering logic.
Configuration Parameters
Section titled “Configuration Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
siteId | Number | Yes | Your unique site identifier provided by HighVibes Media |
pageId | Number | Yes | Unique identifier for the specific page or page type |
formatId | Number | Yes | Ad format identifier for your placement |
domain | String | Yes | Always use: "https://prg.smartadserver.com" |
Advanced Configuration
Section titled “Advanced Configuration”Supported Ad Sizes
Section titled “Supported Ad Sizes”800x250,970x250,300x165,300x250- Include only the sizes you intend to target in the adUnit
- Confirm sizes are enabled for your placement with your account manager
Dynamic GAM Slot Sizing (Size Exclusivity) Advanced
Section titled “Dynamic GAM Slot Sizing (Size Exclusivity) ”Some advanced publishers modify GAM slot sizes based on which bidder wins the Prebid auction. While this can provide size exclusivity, it has significant risks.
Example concept:
- HighVibes wins auction for a placement
- Your code detects the win
- Dynamically add premium size (like 300x250) to the GAM slot
- Risk: GAM might run its own auction for that new size
Implementation Example:
function initAdserver() {
if (window.pbjs.initAdserverSet) return;
window.pbjs.initAdserverSet = true;
window.googletag.cmd.push(function() {
// Check auction results before setting up GAM slots
const bidsResponse = window.pbjs.getBidResponses();
// Example: Add 300x250 to sticky banner only if HighVibes wins
if (bidsResponse['Sticky_Banner']) {
const stickyBids = bidsResponse['Sticky_Banner'].bids || [];
const highVibesWin = stickyBids.find(bid =>
bid.bidder === 'highvibes' &&
bid.statusMessage === 'Bid available' &&
bid.cpm > 0
);
// Conditionally recreate slot with exclusive size
if (highVibesWin && window.gptadslots[29]) {
console.log('HighVibes won - adding exclusive 300x250 size');
window.googletag.destroySlots([window.gptadslots[29]]);
window.gptadslots[29] = window.googletag.defineSlot(
"/path/to/ad/unit",
[[320, 50], [300, 250]], // Add exclusive size
"Sticky_Banner"
).addService(window.googletag.pubads());
}
}
// Continue with normal targeting setup
window.pbjs.setTargetingForGPTAsync && window.pbjs.setTargetingForGPTAsync();
// ... rest of ad serving logic
});
}
Key Risks:
- GAM internal auctions can override Prebid winners
- Complex GAM line item setup required
- Timing conflicts between auction completion and slot modification
- Potential revenue leakage if not configured properly
If you pursue this approach:
- Work with experienced programmatic developers
- Test extensively in development environment
- Monitor revenue closely for any unexpected drops
- Consider simpler alternatives like pre-defining all sizes in GAM slots
Twin AdUnit Codes
Section titled “Twin AdUnit Codes”If your page uses multiple bidders with different size support, you can register two adUnits with the same code. This lets HighVibes participate in the auction for sizes other bidders may not support.
const adUnits = [{
code: 'gpt_unit_/ad_placement_1',
mediaTypes: { banner: { sizes: [[970,90],[728,90]] } },
bids: [{ bidder: 'otherBidder', params: {/* ... */} }]
},{
code: 'gpt_unit_/ad_placement_1',
mediaTypes: { banner: { sizes: [[800,250],[970,250]] } },
bids: [{ bidder: 'highvibes', params: { siteId: 123456, pageId: 654321, formatId: 151978, domain: 'https://prg.smartadserver.com' } }]
}];
pbjs.addAdUnits(adUnits);
Notes:
- Prebid will send separate bidRequests per adUnit/bidder. A bidder present in multiple adUnits can receive multiple requests; Prebid uses the highest bid when setting targeting.
- Use this pattern when HighVibes should bid on sizes that other bidders do not request for the same page slot.
- Still configure and confirm the
siteId,pageId, andformatIdwith your HighVibes account contact.
How It Works
Section titled “How It Works”HighVibes Media participates in your Prebid.js auction through Equativ’s SmartAdServer bidder adapter. When an auction occurs, the SmartAdServer system receives the bid request and HighVibes Media ads are delivered through Equativ’s infrastructure. The highest bid wins and gets served to your users.
Integration Note: We use the SmartAdServer adapter for optimal compatibility with our ad delivery platform. This provides stable, reliable performance for your Prebid.js setup.
Implementation Guide
Section titled “Implementation Guide”Step 1: Download Prebid.js
Section titled “Step 1: Download Prebid.js”Download a custom Prebid.js build that includes Equativ’s SmartAdServer adapter and recommended modules:
Included Modules:
- Equativ SmartAdServer Bid Adapter Required
- Supply Chain Object Recommended
- Currency module Recommended
- Price Floors Optional
- Consent management modules
Step 2: Get Your Credentials
Section titled “Step 2: Get Your Credentials”Contact your HighVibes Media account manager to receive your unique:
siteId- Your website’s unique identifierpageId- Specific identifier for each page typeformatId- Ad format identifier for your placement
Step 3: Configure AdUnits
Section titled “Step 3: Configure AdUnits”Add HighVibes Media as a bidder in your Prebid.js adUnits configuration using Equativ’s SmartAdServer adapter.
Step 4: Set Up Alias Optional
Section titled “Step 4: Set Up Alias ”Register a “highvibes” alias for cleaner configuration and reporting.
Troubleshooting
Section titled “Troubleshooting”Common Issues
Section titled “Common Issues”Bids not participating in auction:
- Verify Equativ’s SmartAdServer adapter is included in your Prebid.js build
- Check that
siteId,pageId, andformatIdare correct - Ensure supported ad sizes are configured in mediaTypes
Console errors:
- Check browser console for Prebid.js errors during auction
- Verify all required parameters are included in bidder configuration
- Ensure alias is registered before adding adUnits (if using alias approach)
No bid responses:
- Confirm your placement is active with HighVibes Media
- Check that your site’s traffic volume meets minimum requirements
- Verify ad sizes match what’s configured in your placement
Ad not displaying despite bid response:
- Critical: Ensure GAM slot definition includes all the same sizes you’ve configured in Prebid mediaTypes (e.g., if Prebid mediaTypes has
[320, 100], GAM slot must also include[320, 100]) - The sizes you’re bidding on in Prebid must be pre-approved in your GAM slot configuration
- Ensure the DOM element for the ad slot exists
- Size mismatch between Prebid mediaTypes and GAM slot definitions is the most common cause of ads not rendering even with successful bids
Container overlap or visual conflicts:
- If you experience overlapping containers or anchor ad conflicts, see our Container Conflicts troubleshooting guide
Debugging Tools
Section titled “Debugging Tools”Use Prebid.js debugging tools to troubleshoot:
// Enable debug mode
pbjs.setConfig({ debug: true });
// Check auction results
pbjs.getAdUnits();
pbjs.getBidResponses();
// Check specific bidder responses
pbjs.getBidResponsesForAdUnitCode('Sticky_Banner');
Documentation References
Section titled “Documentation References”- Prebid SmartAdServer Adapter
- Equativ (SmartAdServer) Documentation
- Prebid Twin AdUnit Reference
- Prebid Alias Reference
© 2026 HighVibes Media GmbH