Skip to content

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

Use SmartAdServer bidder directly - simplest configuration.

"bids": [
{
"bidder": "smartadserver",
"params": {
"siteId": 123456,
"pageId": 654321,
"formatId": 151978,
"domain": "https://prg.smartadserver.com"
}
}
]
ParameterTypeRequiredDescription
siteIdNumberYesYour unique site identifier provided by HighVibes Media
pageIdNumberYesUnique identifier for the specific page or page type
formatIdNumberYesAd format identifier for your placement
domainStringYesAlways use: "https://prg.smartadserver.com"
  • 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)

Section titled “Dynamic GAM Slot Sizing (Size Exclusivity)”

For publishers who want to restrict certain ad sizes to specific winning bidders, you can dynamically modify GAM slot definitions based on auction results. This prevents other bidders from competing on sizes that should be exclusive to particular demand sources.

Use Cases:

  • Reserve premium sizes (like 300x250) for high-value bidders only
  • Allow standard sizes for general competition while restricting special formats
  • Implement bidder-specific size strategies

Implementation:

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
    });
}

Benefits:

  • Size Control: Only winning bidders get access to premium sizes
  • Revenue Optimization: Prevents low-value bidders from competing on high-value inventory
  • Format Exclusivity: Reserve special ad formats for specific demand partners

Considerations:

  • Implement in the bidsBackHandler (initAdserver) function after auction completion
  • Always destroy existing slots before recreating with new sizes
  • Test thoroughly to ensure proper ad rendering
  • Monitor performance impact of dynamic slot creation

Twin AdUnit Codes Optional

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, and formatId with your HighVibes account contact.

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.

Current Setup Note: Our current implementation uses Equativ’s SmartAdServer platform to deliver direct insertions rather than real-time bidding (RTB). This means that bids are pre-configured based on your placement settings rather than dynamically calculated for each auction. In the future, we plan to adapt to Equativ’s new adapter that will support full RTB capabilities for more dynamic bidding optimization.

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

Contact your HighVibes Media account manager to receive your unique:

  • siteId - Your website’s unique identifier
  • pageId - Specific identifier for each page type
  • formatId - Ad format identifier for your placement

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.

Bids not participating in auction:

  • Verify Equativ’s SmartAdServer adapter is included in your Prebid.js build
  • Check that siteId, pageId, and formatId are 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

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');
siteId: 123456, pageId: 654321
image-wave

© 2026 HighVibes Media GmbH