Why my ad manager doesn't work with prebid.js

476 Views Asked by At

I really need your help with prebid.js. I have already read a lot of information about it, but there are still questions.

What I need to do: add an advertise block (div) on my website.

What I've done:

  1. downloaded the prebid.js file with several advertising providers from here http://prebid.org/download.html
  2. registered the site with GoogleAdManager
  3. following this video http://prebid.org/adops/step-by-step.html

    • created 'line item' 200*200
    • create 'creative' and pass code from the video

.

<script>
   try {
     window.top.pbjs.renderAd(document, '%%PATTERN:hb_adid%%');
   } catch (e) {}
</script>

(actually there are another code under the video and I don't know which is correct but have already tried both)

    <script src = "https://cdn.jsdelivr.net/npm/prebid-universal-creative@latest/dist/creative.js"></script>
    <script>
      var ucTagData = {};
      ucTagData.adServerDomain = "";
      ucTagData.pubUrl = "%%PATTERN:url%%";
      ucTagData.targetingMap = %%PATTERN:TARGETINGMAP%%;
      ucTagData.hbPb = "%%PATTERN:hb_pb%%";

      try {
        ucTag.renderAd(document, ucTagData);
      } catch (e) {
        console.log(e);
      }
    </script>
  • follow all other steps

    1. after that I go to AdManager -> ad units -> select my unit -> tag, then copy these two pieces of code to my site
      AdManager -> ad units -> select my unit -> tag
    2. deploy changes

And after all when I opened my site I saw my block with advertise in it.

What is the problem? I think that it this advertise is provided not by Prebid.js but by GoogleAdSense because when I switch to debug mode ('?pbjs_debug=true' to site url) the only thing that I found is:

    Prebid INFO: Prebid.js v3.2.0 loaded
    amp-inabox.js:132 Powered by AMP ⚡ HTML – Version 1912050130240 https://www.[mysite].com/prebid?pbjs_debug=true

Tere are no logs about bid requests and bid responces. I think that it's because of wrong code in my 'creative' but it is provided by official site...

Please tell me what I did wrong.

0

There are 0 best solutions below