Prebid Analytics Adapter

The Prebid analytics adapter sends auction telemetry from an existing Prebid.js installation to Bidkernel. Use it when you run your own Prebid stack and only want Bidkernel's analytics — no changes to your ad serving, wrapper, or line items are required. Sites using the full Bidkernel SDK do not need it; the SDK reports the same events automatically.

Installation Link to section

Add the adapter script to your pages, then enable it through the standard Prebid analytics API with the property ID from your dashboard:

html
<script async src="https://by.bidkernel.io/analytics.js"></script>
<script>
  window.pbjs = window.pbjs || {};
  pbjs.que = pbjs.que || [];
  pbjs.que.push(function () {
    pbjs.enableAnalytics([
      {
        provider: "bidkernel",
        options: {
          propertyId: "YOUR-PROPERTY-UUID",
        },
      },
    ]);
  });
</script>

Script order does not matter: the adapter registers itself through the Prebid command queue, so it works whether it loads before or after Prebid.

Options Link to section

OptionDefaultDescription
propertyId— (required)The UUID of the Bidkernel property receiving the events.
endpointorigin of analytics.jsIngest endpoint origin. Only needed when events should flow through a different domain than the one serving the script.
auctionEnabledtrueReport auction lifecycle events (auctions, bid requests, responses, no-bids, timeouts, wins, render failures).
errorsEnabledtrueReport error events, capped at 50 per session.
warningsEnabledtrueReport warning-level events.
logLevelINFOConsole log verbosity: DEBUG, INFO, WARN, or ERROR.

How It Works Link to section

The adapter listens to Prebid events (auctionInit, bidRequested, bidResponse, noBid, bidTimeout, bidWon, adRenderFailed, and more), batches them — up to 20 events or 10 seconds, whichever comes first — and posts them as a compact binary payload to the ingest endpoint. Remaining events are flushed with sendBeacon when the page is hidden, and single-page-application route changes start a new pageview.

Events are only accepted from domains configured on the property, so verify your property's domain before testing. Data appears in the Prebid Analytics report builder, typically within a few minutes; the available metrics and dimensions are listed in the Analytics & Reporting Reference.

Trying It Without Code Changes Link to section

The Bidkernel Prebid Analytics browser extension hooks into any page's existing Prebid.js installation and shows a live sidebar of auction events. Enter a property ID in the extension to forward those events to Bidkernel — the same data path as this adapter — and the report builder fills with real data from your site without any script changes or deployment. Create a property for the site's domain first; events are only accepted from domains configured on the property.

Renamed Prebid Globals Link to section

If your Prebid build uses a renamed global, declare it before the adapter script loads:

html
<script>window._bidkernelPbjsGlobal = "myPbjs";</script>
<script async src="https://by.bidkernel.io/analytics.js"></script>

Confirm Action