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

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.

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.

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

Container overlap or visual conflicts:

  • If you experience overlapping containers or anchor ad conflicts, see our Container Conflicts troubleshooting guide

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