Skip to content

katsuo5/pbjs-debugger

Repository files navigation

PBJS Debugger

PBJS Debugger is a tool to debug pages with Prebid.js + Google Publisher Tag implemented.

DEMO

prebid example page

Error

Error

Prebid Config

Prebid Config

Show All Bids

Show All Bids

AdUnit Event Log

AdUnit Event Log

Usage

Snippets

Open the Chrome Dev Tools. In the Sources tab, next to Content Scripts, click the » button and you can add Snippets.

(async function () {
  function importTag() {
    const scriptEl = document.createElement("script");
    scriptEl.src = "https://katsuo5.github.io/pbjs-debugger/index.min.js";
    scriptEl.async = true;
    document.getElementsByTagName("head")[0].appendChild(scriptEl);
  }

  async function waitForTimeout(milliseconds) {
    return new Promise((r) => setTimeout(r, milliseconds));
  }

  googletag.openConsole();

  await waitForTimeout(1000);

  if (!window.pbjsDebugger) {
    importTag();
  } else {
    window.pbjsDebugger.printSummary();
  }
})();

Note

License

MIT license.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published