Google Adsense Warning about Rejected Ad Requests

(written by jca2112)

Google just sent out an email warning publishers they need to fix "Rejected ad requests" errors by August 15, 2012. The warning also appears in the Adsense interface (if you have any rejected ad errors).

If you visit the How to fix these errors page, the fix involves using a Google adsense tag (or Google Doubleclick for Publishers tag, etc.) to tell Adsense the page where the ad has been placed. Example tag:

googletag.pubads().set("page_url", "URL");

My question:

How do you replace "URL" in the above example with the current page’s url?

This entry was posted in AdSense Placements and tagged , , , , . Bookmark the permalink.

20 Responses to Google Adsense Warning about Rejected Ad Requests

  1. JamesColin says:
    The URL should be like this:
    https://myurl.com/fullpath
    by replacing it with your current page's URL.

    You can get it via php or the CMS script you use, this will depend.
    • jca2112 says:
      by replacing with your current page's url, you can get it via php or the CMS script you use, this will depend.
      How would you get it from any (dynamically created) page? We have a lot of vBulletin / vBAdvanced pages, but it would need to work on any dynamic page regardless of the CMS, script, software, etc.
      • PJS1984 says:
        I desperately need the answer to this as well....How do you replace 'page_url' with the current page's url on a dynamically generated page? This is my first post...any help would be greatly appreciated.
  2. JamesColin says:
    with php variable
    $_SERVER['REQUEST_URI']
    PHP: $_SERVER - Manual
    • jca2112 says:
      with php variable $_SERVER['REQUEST_URI']

      Thanks for the PHP tip. What would be a solution for non-PHP pages (CGI, etc.)? Is there a Javascript solution?
    • Bridges says:
      where are you placing this code?
  3. PJS1984 says:
    Thanks so much, I'm just trying it out now. Out of interest does anyone know if the message warning publishers to fix "Rejected ad requests" errors by August 15 was sent out to all publishers?
  4. PJS1984 says:
    I tried using the code provided but for some reason when I use it it breaks the site in internet explorer. The whole layot gets completely jumbled. It seems fine in Chrome and firefox just not in IE.

    The site is built in wordpress and I use OpenX to serve the ads. Any help would be greatly appreciated.
  5. intluser says:
    Hello,

    I have ad sense as by bottom tier catch all network. Hence, I am receiving the rejected ad calls notice. Usually, it is three or four networks ahead of the adsense in the chain.

    What do I do to fix this? Is there a way to hard code the URL within the ad code?
  6. admin says:
    What adserver are you using?
    • intluser says:
      I'm using AOL's Adtech lite ad serving solution.
  7. admin says:
    Maybe you should ask for support there. Adserver seem to be the problem with this error.
  8. eder says:
    I got this message too. I edited my js code by adding the parameter below
    google_page_url = "https://DOMAIN.com/x.php";
    Now I have a question: if my changes fixed the issues, will alert disappear?
  9. eder says:
    Yes... it disappeared! I just needed to add the parameter mentioned above. Anyway thank you, guys.
  10. eder says:
    If your banner is placed on a page with no content, you have to do what I did:

    Place the google_page_url parameter on javascript parameters(last line is the best place). In my case, I passed a value via GET through an iframe tag:

    .... content of website ....
    <iframe src="banner.php?id=<?php echo $_GET['id']; ?>"></iframe>
    .... content of website ....

    So, by this way, I can get the value passed via GET method and use it on banner.php to tell to google_page_url which URL is exactly being visited.

    Code of file banner.php:
    <script type="text/javascript"><!-- 
    google_ad_client = "xxxxxxxxxxxxx"; 
    /* 300x250, criado 12/10/10 */ 
    google_ad_slot = "xxxxxxxxxxx"; 
    google_ad_width = 300; 
    google_ad_height = 250; 
    google_page_url = "https://www.xxxxx.com.br/xxxxx.do?id=<?php echo $_GET['id']; ?>"; 
    //--> 
    </script>
    After 30 minutes the alert has gone away.
  11. Bridges says:
    eder, Thanks for the info! I'm not sure if I can set it up like you did as I'm using vBulletin software. Do you think just this will work?
    google_page_url = "https://www.xxxxx.com/xxxxx.do?id=<?php echo $_SERVER['REQUEST_URI']; ?>";
    • eder says:
      Well, you have to take a look at yours URLs on vBulletin to know how it works and use this information to make changes on code that I posted. Buuut...

      vBulletin is written in PHP, so I guess it will work fine, but like I said, you have to change the GET variables which are passed on URL.

      If you need I can help you, just add me on facebook.com/EderConceitual

      =)
  12. jeanius says:
    hmm I have added google_page_url = "https://mysitesurl.com"; still the alert has not gone yet and its been over hours. Do I need to be more specific with the url? and im using Wordpress.

    Some suggested that we do not mess with the code until Google addresses the issue. But my earnings have taken a big hit.
    • Bridges says:
      you need the full page of the url
  13. admin says:
    Just in case someone needs it.

    If you use DFP Small business as Ad Server and vBulletin you need to add this:
    googletag.pubads().set("page_url", "https://www.yourdomain.com/forum/{vb:raw relpath}");
    

Leave a Reply

Your email address will not be published. Required fields are marked *

*