(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?
You can get it via php or the CMS script you use, this will depend.
Thanks for the PHP tip. What would be a solution for non-PHP pages (CGI, etc.)? Is there a Javascript solution?
The site is built in wordpress and I use OpenX to serve the ads. Any help would be greatly appreciated.
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?
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 .... .... 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: After 30 minutes the alert has gone away.
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
=)
Some suggested that we do not mess with the code until Google addresses the issue. But my earnings have taken a big hit.
If you use DFP Small business as Ad Server and vBulletin you need to add this: